Terron AI

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Kenionatus
Engineer
Engineer
Posts: 2
Joined: 09 Jun 2012 12:48

Re: Terron AI

Post by Kenionatus » 09 Jun 2012 12:52

Bug report:
See added picture.
Attachments
absturtz.ki.terron.png
absturtz.ki.terron.png (14.45 KiB) Viewed 3626 times

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 10 Jun 2012 11:21

hmm, what is your openttd version?

Kenionatus
Engineer
Engineer
Posts: 2
Joined: 09 Jun 2012 12:48

Re: Terron AI

Post by Kenionatus » 10 Jun 2012 11:31

OpenTTD 1.0.4
for ubuntu natty

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 10 Jun 2012 11:47

yes, i checked and 1.0.4 don't have that field for class AIIndustryType class.
i've made AI with 1.1 in mind which does have it.
See
1.0.4 version http://noai.openttd.org/docs/1.0.4/clas ... yType.html
vs 1.1 http://noai.openttd.org/docs/1.1.0/clas ... yType.html

there can be workaround in this particular case, but i don't know how many other compatibility issues you may face further, so sorry but all i can is to recommend you 1.1 or higher openttd version :(

frosch
OpenTTD Developer
OpenTTD Developer
Posts: 979
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Terron AI

Post by frosch » 10 Jun 2012 12:20

You should set the API version to "1.1" in info.nut then :)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 10 Jun 2012 13:01

now i wonder how could i missed that :p

@Kenionatus you can try to change missed fields references to their values which seen in 1.1 link i posted, maybe version difference will not be so crucial after all.

imortal98
Engineer
Engineer
Posts: 9
Joined: 09 Mar 2010 22:12

Open TTD- AMG AI Tournament #1 [Winner Terron AI ]

Post by imortal98 » 26 Oct 2012 21:29

Hey Just wanted to congratulate you on winning the Open TTD- AMG AI Tournament #1 that i made.

Very nice AI , will be sure to use it A LOT from now on .

Image

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 28 Oct 2012 06:04

Thanks.
It's strange that you didn't use Aviators NewGRF though. This one is a must IMO because default planes brings just too much money.

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 22 Nov 2012 19:07

Well, it seems new version is almost ready. I've made everything i wanted before moving to trains.
AI looks stable enough but surely needs more testing. OpenTTD version 1.2.3 is required.

Most noticeable new features are road networks planning and raw resources gathering through transfer.
First one means that AI can find and build roads(starting from mines or farms) needed to e.g. supply specific town with goods or food. Opens many new possibilities but currently isn't free of problems.
The second feature looks like kind of network too and similar to already existing passengers transfer. You can see how it works in the picture below.
feature_screen.png
feature_screen.png (145.84 KiB) Viewed 3170 times
Readme(with AI settings description) and changelog are available from in-game AIs selection screen if you need them.

Edit: old file removed, new version on bananas.
Last edited by svetovoi on 26 Nov 2012 13:33, edited 2 times in total.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Terron AI

Post by Zuu » 22 Nov 2012 20:01

I wanted to test your new release but the last version on Bananas appear to be version 203.

Is there any reason why you didn't update it on Bananas?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 23 Nov 2012 05:17

Still beta, what can I say.
Optimization awaits, as do new awesome bugs. Particularly saving/loading with new truck mode has own issues.
And there is also gamescripts. Maybe i'll use SCP and add scripts support before going to bananas.

Plus I can't specify 1.2.x as version requirement in info.nut(). AI disappears from selection menu. Am i missed something? :?
AI says it needs 1.2 currently. Very important issue because I experienced game crash(!) with earlier OpenTTD versions. Seemed like AIEngine.GetMaximumOrderDistance was the cause(btw i saw similar bug reported in AIAI thread). Free access from bananas can create a lot of problems for 1.2 users.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Terron AI

Post by Zuu » 23 Nov 2012 08:16

You can set 1.2.x as minimum version on Bananas. As for info.nut, there you should set 1.2 as API version. Have a look in the API or eg. any of my AIs for examples on how to do that.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 26 Nov 2012 13:30

Thanks, Zuu.

Tweaked version is on the content server.

Steffl
Engineer
Engineer
Posts: 103
Joined: 23 Feb 2010 15:44

Re: Terron AI

Post by Steffl » 05 Dec 2012 19:27

Hi,
last night I ran a little test game to test some AIs. Terron AI was very good. It takes the lead short after start and keeped it all the game. But when I later tried to load a savegame, Terron crashed.

Here's a screenshot and the save game file:
terron crashed.png
(177.78 KiB) Downloaded 7 times
Attachments
s.sav
savegame
(2.01 MiB) Downloaded 91 times

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 06 Dec 2012 13:04

Thank you very much.
I fixed the bug. And several other problems.
New AI version(206) available on Bananas.

Mastermind
Engineer
Engineer
Posts: 1
Joined: 12 Dec 2012 13:20

Re: Terron AI

Post by Mastermind » 12 Dec 2012 13:22

Hello,

Could you please tell me what I'm doing wrong?

Image

Thanks in advance!

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Terron AI

Post by Kogut » 12 Dec 2012 13:54

Unpack .gz archive, Openttd can read .tar but not other formats.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 12 Dec 2012 17:32

I could accidentally remove lib dependency.
I'll take a look tomorrow.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Terron AI

Post by Zuu » 12 Dec 2012 21:40

Is it the AI version of the library that you have downloaded?

Eg. if you open library.nut in a text editor, can "AILibrary" be found in the file? If you find "GSLibrary" instead, you have the Game Script version of the library.

svetovoi wrote:I could accidentally remove lib dependency.
I'll take a look tomorrow.
Since version 3 of that library is now the current version for AIs, the dependency of version 2 can no longer be set in the Bananas web UI. The changes from version 2 to 3 are non-breaking. So all you need to do is to update all import statements in your code to reference version 3 and then set the dependency in bananas to version 3.


Edit: The fact that you cannot set old libraries as dependency is a known issue. Its something that I personally would like to see change to something better to avoid issues like this one. However so far noone have made a patch to solve the issue. The web UI is written in Django (Python).
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi » 13 Dec 2012 09:14

Thanks for report, Mastermind, I've uploaded new version.
Zuu wrote:The fact that you cannot set old libraries as dependency is a known issue. Its something that I personally would like to see change to something better to avoid issues like this one.
Sure, would be nice.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest