AI Battle Royale

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

Maninthebox
Engineer
Engineer
Posts: 107
Joined: 08 Aug 2008 11:35
Contact:

Re: AI Battle Royale

Post by Maninthebox »

Good to see OtviAI is still doing great. On the todo list are a few new things; one of them being what to do when you've reached the RV-limit which is really putting otviai to a stop now. One possible fix is the second item on the todo list: integrate trains; it's work in progress in a seperate ai at the moment (OtviTrAIn) and what that really needs is a fix on terraforming. More on that after my 3 week holiday in Sweden/Norway :)

More on Rondje in the rondje thread.

KIDS
Engineer
Engineer
Posts: 9
Joined: 05 Aug 2009 11:28

Re: AI Battle Royale

Post by KIDS »

Inspired by this thread, I've set up a game yesterday and left it overnight. 14 AIs were included, including Admiral, Pax, PathZilla, NoCAB and some others. The Admiral seemed the most robust overall, probably because it has three types of vehicles. Almost no crashes (there were a few, but only after many years, and I missed them because I was asleep). Here are some screenshots from 1972.

Btw, the same could be said of human players, but AI really does not have an urge to manage effects of its actions. For example, there is a profitable truck route from a farm to a factory. One AI comes in and sets in a line, then the second, then the third. Eventually the road becomes so clogged that they are all losing money and their vehicles can't even reach the depots for servicing, which further blocks the road, etc. etc. I have a feeling that any game that lasts long enough will see all of the starting AIs going bankrupt and getting replaced as the world gets a bit less messy.

p.s. I'm pleasantly surprised with all of the AIs and I must say I particularly like their airport placement and rail design, which is a massive improvement over the old default AI. Cheers and thank you for all of your work!
Attachments
Observer Transport, 9th Mar 1972.png
Example of cooperative suicide
(198.02 KiB) Downloaded 115 times
Observer Transport, 19th Mar 1972.png
Company positions and profiles of some most successful.
(276.08 KiB) Downloaded 99 times
Observer Transport, 30th Mar 1972.png
Example of cooperative suicide #2
(225.54 KiB) Downloaded 105 times

User avatar
lawton27
Tycoon
Tycoon
Posts: 1418
Joined: 03 Aug 2009 14:29
Location: Manchester

Re: AI Battle Royale

Post by lawton27 »

KIDS wrote:Inspired by this thread, I've set up a game yesterday and left it overnight. 14 AIs were included, including Admiral, Pax, PathZilla, NoCAB and some others. The Admiral seemed the most robust overall, probably because it has three types of vehicles. Almost no crashes (there were a few, but only after many years, and I missed them because I was asleep). Here are some screenshots from 1972.

Btw, the same could be said of human players, but AI really does not have an urge to manage effects of its actions. For example, there is a profitable truck route from a farm to a factory. One AI comes in and sets in a line, then the second, then the third. Eventually the road becomes so clogged that they are all losing money and their vehicles can't even reach the depots for servicing, which further blocks the road, etc. etc. I have a feeling that any game that lasts long enough will see all of the starting AIs going bankrupt and getting replaced as the world gets a bit less messy.

p.s. I'm pleasantly surprised with all of the AIs and I must say I particularly like their airport placement and rail design, which is a massive improvement over the old default AI. Cheers and thank you for all of your work!
That map is massively crowed, this shows sometimes ai's are too intelligent for their own good, maybe an ai writer could make it so the ai conceders how many other ai's are operating the same route?

Yexo
Tycoon
Tycoon
Posts: 3658
Joined: 20 Dec 2007 12:49

Re: AI Battle Royale

Post by Yexo »

lawton27 wrote:That map is massively crowed, this shows sometimes ai's are too intelligent for their own good, maybe an ai writer could make it so the ai conceders how many other ai's are operating the same route?
What do you expect:
KIDS wrote:... 14 AIs were included ...
A map with 14 human companies is very soon crowded too :)

Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: AI Battle Royale

Post by Wasila »

I've just started to use ChooChoo, though I've given myself a decent headstart! It looks like a decent competitor though, I'll see how it goes. Thanks Roujin!

User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: AI Battle Royale

Post by Dustin »

I decided to run an AI shootout today.
  • Denver & Rio Grande RC18
  • ChooChoo 306
  • CluelessPlus 9
  • Convoy Version 11
  • JAMI 3
  • OtviAI 283
  • PathZilla 6
  • PAXLink 13
  • Trans 90713 (is that a version or a U.S. Zip code? :lol: )
I left out the Nocab and Admiral on purpose. They are really competive, and I wanted to stack up Denver & Rio Grande against the rest of the AI's.



Temperate, 512 * 512, flat, smooth
Start 1950
Inflation On
Easy Difficulty (Custom to allow more AI's but settings same as Easy).
All AI's set to default settings,
except trans which is set to 100 percent of last month transported cargo.
Pathzilla set to fastest speed.
No Newgrfs


PathZilla and PaxLink crashed. Bugs reported in the respective threads.

After 10 years:
Attachments
Shootout, 17th Feb 1960.png
(64.09 KiB) Downloaded 91 times

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: AI Battle Royale

Post by Xander »

Unsurprisingly JAMI died a horrible death.

Although it has inspired me to teach her to set her president to female :)
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: AI Battle Royale

Post by Dustin »

Final Results:

ChooChoo is the King of the Train AIs. :)

OTVI has a bangup start, but stalls out once it hits the RV limit.

FanAI must have crash during the night and got a new start.
Attachments
AI Shootout, 25th Oct 1966.png
(70.98 KiB) Downloaded 72 times
Shootout finale.png
(108.86 KiB) Downloaded 73 times

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

Re: AI Battle Royale

Post by Zuu »

Cool, CluelessPlus managed to take a clear second place in amount of delivered cargo.

Thanks for running the tournament and posting the results.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

Dustin wrote: [*]Trans 90713 (is that a version or a U.S. Zip code?
It's a release date in the format (Y)YMMDD used as version

Interesting results you posted here. I would have indeed guessed a bit different. It also shows IMO that there's always a bit of chance - would be boring otherwise, though.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

Inspired by some recent activity on various AIs I thought I give them a test run all at once again. I setup a plain vanilla style game, temperate map 256 x 1024 tiles without breakdowns and a max loan of 150.000GBP. I included those AI which I remembered some recent activity from and got the versions available from bananas. I let the game run for about 9 ingame years from 1975 to 1984.

It was quite an interesting game to watch. Sadly AIAI crashed straight away and SimpleAI didn't ever build anything else than its HQ. Paxlink and NoCab bancrupted, OTViAI and Pathzilla failed to make profit but survived. The performance of Rondje om de Kerk was unmatched for ~ five years and it steadily increased its profit (but it seemed to buy and sell vehicles on a daily basis) while the other AI didn't continue their initial exponential growth but more or less settled for the monthly profit they reached after about 3 years. After 5 years Rondje got issues, sold most of its vehicles and went into making operational loss. The clear winner of this situation was Convoy which then started its exponential growth, outperforming all other AIs, but also CluelessPlus and AdmiralAI picked up a bit but limited their profitability a bit by their construction / route selection (see their respective threads), but they keep making profit and very slowly also increasing their profitability. Still Rondje accumulated enough wealth in the first 5 years to come in 2nd in the company value graph after 4 years of losses.

So after 10 years of play, Convoy is the clear winner if you count company value, congratulations :-) But all AIs are fun to play with and watch their actions especially as they have completely different focus and aims - company value is not the only thing which matters :-) On the other hand I hope I could provide a few pointers here and there where it might be a good idea to look into possible areas of improvement for the single AIs. Kudos to all those who made this possible :-)

EDIT: savegame available here
Attachments
Performance of all companies
Performance of all companies
CluelessPlus, AdmiralAI and ChooChoo
CluelessPlus, AdmiralAI and ChooChoo
Final map
Final map

Yexo
Tycoon
Tycoon
Posts: 3658
Joined: 20 Dec 2007 12:49

Re: AI Battle Royale

Post by Yexo »

Thanks planetmaker, such testing and the resulting feedback are very important.

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: AI Battle Royale

Post by Brumi »

planetmaker wrote:SimpleAI didn't ever build anything else than its HQ.
Hm... that's sad. :( Although it is optimised to start in 1950, it could start even in the era of maglevs in my tests. Most probably the pathfinder failed multiple times at the start of the game, and after a while it had less than 90,000 GBP.
Maybe next time. :)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

I did it again: a map with a semi-random setup and 14 AIs, the current versions I could get from BaNaNas. Let's say, I was quite surprised at some of the results, mainly that it differed in parts so much from my previous run.

Most notably, AIAI did quite well, increasing its profit steadily. Admiral and Rondje have a good 2nd and 3rd place after 5 years, all others make a profit and most have a decent company value meanwhile even in this very competitive environment. But Rondje seems to have a increasingly difficult time, it's profit starts to drop.

Two things I was a bit surprised: NoCAB's relative low profits and ChooChooAI's failure to build a connection, thus it closed eventually down.

Settings and NewGRFs used: 2cctrainset-r559, HEQS, FISH, egrvts 1.0, Aviators 1.7 with a limit of 500 trains and RV and 25 planes per company, max loan is 500.000; starting year was 1945 in arctic climate.

Attached two screenshots and the savegame after 5 years. You'll need nightly versions of the 2cctrainset and of the Swedish Rails, available from the DevZone

EDIT: here the exact list of AI versions:
AdmiralAI v22
AIAI v15
CluelessPlust v21
NoCAB v485 (is that actually the latest...?)
OtviAI v312
Rondje v313
SimpleAI v4
trAIns v2
trans v100307
wrightAI v3
rocketAI v1
Attachments
Storbyn Transport, 14-03-1951.png
Storbyn Transport, 14-03-1951.png (228.3 KiB) Viewed 2821 times
Storbyn Transport, 22-07-1951.png
Storbyn Transport, 22-07-1951.png (185.24 KiB) Viewed 2821 times
autosave10.sav
5 years into the savegame
(815.96 KiB) Downloaded 62 times
Last edited by planetmaker on 02 Jul 2010 11:19, edited 1 time in total.

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

Re: AI Battle Royale

Post by Kogut »

What happened with AIAI's company value?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

Just two brief overviews, map size is 512^2.

EDIT: sorry... AIAI was there. Why company value dropped: no idea. Here it is coming back - and it's dominating. Probably re-structuring.

Another big note of interest: there were only two AI which built actual train connections: SimpleAI and TrAIns. They are not making big profit with it, but they are doing ok. They even do profit with that, given that the 2cctrainset is not a trainset which is know for cheap engines :-) Kudos for that.
Attachments
Storbyn Transport, 27-10-1952.png
infrastructure owners
infrastructure owners
AIAI company value (a tad later, though)
AIAI company value (a tad later, though)
Storbyn Transport, 11-12-1952.png (127.26 KiB) Viewed 2818 times

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

Re: AI Battle Royale

Post by Kogut »

Probably statues.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

Here the savegame after 15 years.
Attachments
battleAI_15years.sav
(907.44 KiB) Downloaded 64 times

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: AI Battle Royale

Post by fanioz »

planetmaker wrote:I did it again: a map with a semi-random setup and 14 AIs, the current versions I could get from BaNaNas. Let's say, I was quite surprised at some of the results, mainly that it differed in parts so much from my previous run.
Very well.
Looks like on company league table no.12 was still "the old" FanAI, which is shouldn't be available on Bananas. :D
planetmaker wrote:Settings and NewGRFs used: 2cctrainset-r559, HEQS, FISH, egrvts 1.0, Aviators 1.7 with a limit of 500 trains and RV and 25 planes per company, max loan is 500.000; starting year was 1945 in arctic climate.
Hard setting huh ? :lol: Oh...poor Trans Chubby, she couldn't do well with Aviators (and other GRF's too)

And ....congratulation to AIAI 8)
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9406
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AI Battle Royale

Post by planetmaker »

fanioz wrote:
planetmaker wrote:I did it again: a map with a semi-random setup and 14 AIs, the current versions I could get from BaNaNas. Let's say, I was quite surprised at some of the results, mainly that it differed in parts so much from my previous run.
Very well.
Looks like on company league table no.12 was still "the old" FanAI, which is shouldn't be available on Bananas. :D
planetmaker wrote:Settings and NewGRFs used: 2cctrainset-r559, HEQS, FISH, egrvts 1.0, Aviators 1.7 with a limit of 500 trains and RV and 25 planes per company, max loan is 500.000; starting year was 1945 in arctic climate.
Hard setting huh ? :lol: Oh...poor Trans Chubby, she couldn't do well with Aviators (and other GRF's too)

And ....congratulation to AIAI 8)
Well, I checked for bananas, made sure that I had all recent AI versions and then added them, basically randomly, giving preference those names which I recalled activity from, filling all spots. So maybe I should have replaced that spot by roadrunner in retroperspective :-)

Concerning the settings: I don't think they were particularily hard. Granted, it was a mountanous map and 2cctrainset, which doesn't have the cheapest prices, but everything else was very friendly to the player, like high starting money, permissive authorities, smooth economy, no breakdowns, 1/1 plane speed. Basically it were the map settings I usually play with, which make for a nice map and nice game in my eyes.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: djsider and 17 guests