List of good AI & AI testing.

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

AAAHogEx
Traffic Manager
Traffic Manager
Posts: 131
Joined: 30 Jan 2022 15:37
Location: Japan

Re: AI Thoughts, listings & Upkeeping of them

Post by AAAHogEx »

Redirect Left wrote: 19 Mar 2023 03:59 In the instance I wrote it down, it was in a large city that was absolutely rammed with vehicles from different AI. So granted that one was a chaotic scenario as lots of AI built there (perhaps at the start it was the highest population town so everyone ran for it). The only stop that was causing slow downs was from AAAHOGEX, with the other stops slightly out of the way of the flow of traffic (either by design, or i think more likely coincidence). So its possible i was a bit harsh there based on one thing.
One thing that's nice though, whilst it does spam stops around towns, it does actually use them all, and they're orientated the correct way for the road grid, which some AI struggle with, a lot build excess stations and don't use them.
Thank you for your reply. As far as I know, AI can't get any information about vehicles of other companies, so it's almost impossible to design AI not to block other companies because it's impossible to determine if AI is blocking them or not. Unfortunately, AAAHogEx seems to have blocked other companies in this case, but I have witnessed the opposite situation many times where AAAHogEx vehicles are blocked by other AIs.
3. Sometimes builds truck & bus stops outside of the city roads, leading to visual oddities.
This issue is indeed unsightly and will be corrected.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

Redirect Left wrote: 18 Mar 2023 23:05 I'm currently writing up a HTML page of it all.
First draft is done, I'm using this as my working document now instead of the OpenOffice .odt file. For now the page is here

This is also proving to be more enjoyable than I expected, also I'm now on test 11, which seems to be the first to produce 0 crashes in any AI! It's been a long road, but much data was provided, and many numbers were crunched. I've still got a few AI to test, and a few AI to use by themselves to see who is doing what mostly with buoys.
I look forward to any further AI updates, or new AI's.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
HGus
Engineer
Engineer
Posts: 126
Joined: 12 May 2013 22:28
Location: Argentina

Re: AI Thoughts, listings & Upkeeping of them

Post by HGus »

A fix for Pathzila bug, posted by Steffl: viewtopic.php?p=1054388#p1054388
My own fix to an annoying bug in MailAI: viewtopic.php?p=1254974#p1254974
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

HGus wrote: 20 Mar 2023 09:51 A fix for Pathzila bug, posted by Steffl: viewtopic.php?p=1054388#p1054388
My own fix to an annoying bug in MailAI: viewtopic.php?p=1254974#p1254974
Interesting, I never ran into either of these in testing (yet). Either way, I have updated the page with links to fixes.

I've got a few AI left to check, and current tests are surprisingly smooth, even though its the first time I have thrown some of these in together, LuDiAI (without the fix), BorkAI, CivilAI & DumbAI, no crashes or (major, lots of abandoned stations all around though) oddities after 30 years. I did have the latest AAAHogEx in there, but there's been another update for that, so, one for the next test, hah.

I'm hoping to create the #1 go to thing for figuring AI's out, because honestly it seems there's no specific place for that, that lays out all the AI, and any actual downsides you may run into by your choice, or for people who just want to go straight to really good AI that generally speaking, is very nice and only infrequently breaks instead of having a looming timebomb of an AI that will eventually always crash, in 5 months or 15 years.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
AAAHogEx
Traffic Manager
Traffic Manager
Posts: 131
Joined: 30 Jan 2022 15:37
Location: Japan

Re: AI Thoughts, listings & Upkeeping of them

Post by AAAHogEx »

I was looking at the table and noticed that NoCab is recommended, but I have the impression that NoCAB is more unstable than NoNoCAB. In fact, I just tried it with 1024x1024,no NewGRFs at hand, similar to the test condition, but Save failed and stopped at 8 years. Is it a coincidence?
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

AAAHogEx wrote: 20 Mar 2023 12:38 I was looking at the table and noticed that NoCab is recommended, but I have the impression that NoCAB is more unstable than NoNoCAB. In fact, I just tried it with 1024x1024,no NewGRFs at hand, similar to the test condition, but Save failed and stopped at 8 years. Is it a coincidence?
It would certainly make sense for NoNoCAB to be more stable, but in tests only NoNoCAB crashed. You have however raised a very good point. I've so far not actually tested the saving ability. I am presuming autosave covers the saving part, I've not tried to load any of the autosaves though. I guess that's what the next tests are to focus on? I will setup a run with just NoCAB & NoNoCAB in the background with the other main test currently and see if they bug out.

Only thing that has emerged from test 11 (yep, 11 already, rip my electric bill) is LuDiAI fails to check the vehicle limits before it builds a station (or airport) which leads to this. Perhaps this is resolved in LuDiAI AfterFix. (edit: LuDiAI has crashed so that's a bad anyway)
ludai_airports.png
(322.02 KiB) Not downloaded yet
I'm not entirely sure what the 'save function' is, but CoronaAI complains it isn't implemented, although loading a save doesn't crash the AI, but nearly all its RV's are in a depot and... uh stopped. That's odd. Issue is i didn't check if they were in a depot beforehand.
2023-03-20 12_57_48-OpenTTD 13.0.png
2023-03-20 12_57_48-OpenTTD 13.0.png (3.67 KiB) Viewed 9242 times
AAAHogEx wrote: 20 Mar 2023 12:38 In fact, I just tried it with 1024x1024,no NewGRFs at hand
Well this is becoming more complicated every day isn't it. I'll reset my settings to all default (thankfully OpenTTD has that option), and then all I will do going forward is edit vehicle limits (see below) as i think the default is remarkably low, or maybe I'm just a busy builder when not doing AI stuff, disable breakdowns (no one needs that negativity in their lives). That'll fix in case my JGR patchpack settings are bleeding into vanilla OTTD. I did consider testing AI with JGR PP too, as it seems very commonly used, but that seems something to consider later on.
2023-03-20 12_56_42-OpenTTD 13.0.png
2023-03-20 12_56_42-OpenTTD 13.0.png (3.99 KiB) Viewed 9240 times
Annoyingly those settings seem to be save only, so i have to remember to set them each time now, and i cannot find a way to globalise a setting so it affects all new games.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
AAAHogEx
Traffic Manager
Traffic Manager
Posts: 131
Joined: 30 Jan 2022 15:37
Location: Japan

Re: AI Thoughts, listings & Upkeeping of them

Post by AAAHogEx »

Redirect Left wrote: 20 Mar 2023 13:13 It would certainly make sense for NoNoCAB to be more stable, but in tests only NoNoCAB crashed. You have however raised a very good point. I've so far not actually tested the saving ability. I am presuming autosave covers the saving part, I've not tried to load any of the autosaves though. I guess that's what the next tests are to focus on? I will setup a run with just NoCAB & NoNoCAB in the background with the other main test currently and see if they bug out.
In a subsequent follow-up test of NoCAB, I discovered something new: I could run 14 AIs simultaneously on a 1k x 1k map without failure. The previous failure may have been due to the fact that when I ran 3 AIs, the buildable area was too large for NoCAB and the amount of data that had to be saved was too large.
I'm not entirely sure what the 'save function' is, but CoronaAI complains it isn't implemented, although loading a save doesn't crash the AI, but nearly all its RV's are in a depot and... uh stopped. That's odd. Issue is i didn't check if they were in a depot beforehand.
The "save function" is used to save additional information that should be saved by ai. Since scanning the entire map would take an enormous amount of time, ai authors basically implement code in the "save function" to save the results of previous scans. If not used, performance will at least be degraded as previous calculations are lost on each save load, and in some cases it may behave strangely as the AI will no longer keep track of previously created routes, trains, etc.
Wormnest
Engineer
Engineer
Posts: 117
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: AI Thoughts, listings & Upkeeping of them

Post by Wormnest »

NoCAB indeed suffered from problems that really surfaced on larger maps, the main ones that I can remember:
  • Saving all its data structures could take too long. NoNoCab fixes this by 1) saving less data at the cost of having to re-read more info after loading a save and thus being slower to actually do anything; 2) checking the available time we are allowed to use for saving and if we are close to running out, we ditch the remainder of our data, that way we at least don't crash, but will have incomplete data the next time the save is loaded, decreasing our performance.
  • Loading all towns and industries could take a lot of memory and take a lot of time, and if I remember correctly it could cause excessive CPU in the valuator too. We now set a limit on how much we load.
Edit
The crash in NoNoCab was caused by not checking the town influence limits when getting tiles to evaluate for an airport. In this specific case we had an area of 175 by 286 tiles to valuate, which was apparently too much. This should now be fixed in version 8.
HGus
Engineer
Engineer
Posts: 126
Joined: 12 May 2013 22:28
Location: Argentina

Re: AI Thoughts, listings & Upkeeping of them

Post by HGus »

Redirect Left wrote: 20 Mar 2023 13:13 Annoyingly those settings seem to be save only, so i have to remember to set them each time now, and i cannot find a way to globalise a setting so it affects all new games.
Actually, it these settings are set in the main screen (before starting any game) then they are globalised for all new games. "Stored in saves" means that if you modify them in-game, then the changes only affect the current one.
Screenshot_1.png
Screenshot_1.png (5.96 KiB) Viewed 9172 times
Last edited by HGus on 22 Mar 2023 04:55, edited 1 time in total.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

AAAHogEx wrote: 20 Mar 2023 15:50
Redirect Left wrote: 20 Mar 2023 13:13 It would certainly make sense for NoNoCAB to be more stable, but in tests only NoNoCAB crashed. You have however raised a very good point. I've so far not actually tested the saving ability. I am presuming autosave covers the saving part, I've not tried to load any of the autosaves though. I guess that's what the next tests are to focus on? I will setup a run with just NoCAB & NoNoCAB in the background with the other main test currently and see if they bug out.
In a subsequent follow-up test of NoCAB, I discovered something new: I could run 14 AIs simultaneously on a 1k x 1k map without failure. The previous failure may have been due to the fact that when I ran 3 AIs, the buildable area was too large for NoCAB and the amount of data that had to be saved was too large.
Wormnest wrote: 20 Mar 2023 21:35 NoCAB indeed suffered from problems that really surfaced on larger maps, the main ones that I can remember:
  • Saving all its data structures could take too long. NoNoCab fixes this by 1) saving less data at the cost of having to re-read more info after loading a save and thus being slower to actually do anything; 2) checking the available time we are allowed to use for saving and if we are close to running out, we ditch the remainder of our data, that way we at least don't crash, but will have incomplete data the next time the save is loaded, decreasing our performance.
  • Loading all towns and industries could take a lot of memory and take a lot of time, and if I remember correctly it could cause excessive CPU in the valuator too. We now set a limit on how much we load.
Edit
The crash in NoNoCab was caused by not checking the town influence limits when getting tiles to evaluate for an airport. In this specific case we had an area of 175 by 286 tiles to valuate, which was apparently too much. This should now be fixed in version 8.
I ended up having a NoCab-off, just me and NoNoCAB / NoCAB, with v8 of NoNoCAB. I was going to throw in the new version of AAAHogEx, but it tends to dominate and overpower other AIs, so I'll leave that for another day.
For some reason NoCAB ended up sending all its buses to the depot and dumping them there long term, this is a save of this.
NOCABOFF T15.sav
(2.17 MiB) Downloaded 170 times
2023-03-22 04_51_40-Steam.png
2023-03-22 04_51_40-Steam.png (71.02 KiB) Viewed 9169 times
In the race to crash, NoCAB failed first, with a save error, attached below. I am presuming NoCAB is no longer updated? if so I'll mark it as so on the big page of it all.
NOCAB CRASH T15.sav
(2.27 MiB) Downloaded 171 times
As for NoNoCAB I let it run by itself for a further 200 years, and the result was, [dramatic music] - no crash! I was going to leave it to run more, but i was using a secondary machine which is only an i3-10100F so it wasn't the fastest at racking up years.
I feel like I might have to donate to the forum after this thread, i think I've used more attachments here than in all of my previous TT-F life!
HGus wrote: 22 Mar 2023 04:50 Actually, it these settings are set in the main screen (before starting any game) then they are globalised for all new games. They cannot be modified from in-game.
Huh. I have definitely been modifying them in-game, and the AI's have reacted to the new limits when changed. I say reacted, i doubt they're constantly scanning settings, just trying and failing to build for reasons. I will edit them from the main menu before i do anymore testing and see if that helps at all.
Last edited by Redirect Left on 22 Mar 2023 06:09, edited 1 time in total.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
HGus
Engineer
Engineer
Posts: 126
Joined: 12 May 2013 22:28
Location: Argentina

Re: AI Thoughts, listings & Upkeeping of them

Post by HGus »

Redirect Left wrote: 22 Mar 2023 04:55
HGus wrote: 22 Mar 2023 04:50
Redirect Left wrote: 20 Mar 2023 13:13 Annoyingly those settings seem to be save only, so i have to remember to set them each time now, and i cannot find a way to globalise a setting so it affects all new games.
Actually, it these settings are set in the main screen (before starting any game) then they are globalised for all new games. They cannot be modified from in-game.
Huh. I have definitely been modifying them in-game, and the AI's have reacted to the new limits when changed. I say reacted, i doubt they're constantly scanning settings, just trying and failing to build for reasons. I will edit them from the main menu before i do anymore testing and see if that helps at all.
Sorry the mistake. I mean the global settings cannot be modified from in-game. I corrected the original post.
Wormnest
Engineer
Engineer
Posts: 117
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: AI Thoughts, listings & Upkeeping of them

Post by Wormnest »

Redirect Left wrote: 22 Mar 2023 04:55 I am presuming NoCAB is no longer updated? if so I'll mark it as so on the big page of it all.
Yes, NoCAB hasn't been updated in a long time, that's why I started NoNoCab to fix the crashes with an otherwise interesting AI.
Redirect Left wrote: 22 Mar 2023 04:55 As for NoNoCAB I let it run by itself for a further 200 years, and the result was, [dramatic music] - no crash!
Glad to hear that :D I try to detect and recover from all unexpected conditions, but with the amount of settings OpenTTD has that's not always easy, especially if a new limit gets introduced like the excessive CPU.

P.S. I see that you haven't covered my other AI: WormAI yet. I updated that one too since it had one known issue that could crash it.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

Wormnest wrote: 22 Mar 2023 15:12 P.S. I see that you haven't covered my other AI: WormAI yet. I updated that one too since it had one known issue that could crash it.
I've now got around to more AI, and WormAI works correctly. It also tops the income graph if its not against something like AAAHogEx, which seems to be the AI that is undefeatable in terms of profit, at least by any other AI.
Some of its routing is a bit odd, but it works.
2023-03-24 14_01_03-OpenTTD 13.0.png
2023-03-24 14_01_03-OpenTTD 13.0.png (87.89 KiB) Viewed 9091 times
I have run into an AI that seems to crash, without actually giving an error. So I've no idea what to mark that error as.
2023-03-24 13_52_49-OpenTTD 13.0.png
2023-03-24 13_52_49-OpenTTD 13.0.png (25.41 KiB) Viewed 9093 times
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Wormnest
Engineer
Engineer
Posts: 117
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: AI Thoughts, listings & Upkeeping of them

Post by Wormnest »

Redirect Left wrote: 24 Mar 2023 14:00 I've now got around to more AI, and WormAI works correctly. It also tops the income graph if its not against something like AAAHogEx, which seems to be the AI that is undefeatable in terms of profit, at least by any other AI.
Some of its routing is a bit odd, but it works.
Cool. Yes, there's definitely room for improvements there.
Redirect Left wrote: 24 Mar 2023 14:00 I have run into an AI that seems to crash, without actually giving an error. So I've no idea what to mark that error as.
It seems that RockeAI only connects 5 cities with 5 buses and then stops. So it doesn't crash in the usual way, it just ends, but since AI's are supposed to keep on running forever I guess it is considered a crash.
xarick
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 26 Feb 2015 00:52

Re: AI Thoughts, listings & Upkeeping of them

Post by xarick »

HGus wrote: 20 Mar 2023 09:51 A fix for Pathzila bug, posted by Steffl: viewtopic.php?p=1054388#p1054388
My own fix to an annoying bug in MailAI: viewtopic.php?p=1254974#p1254974
I think Steffl went on to create a Pathzilla successor, Roadrunner
Formerly known as Samu
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: AI Thoughts, listings & Upkeeping of them

Post by Redirect Left »

xarick wrote: 24 Mar 2023 17:48 I think Steffl went on to create a Pathzilla successor, Roadrunner
Yes, although it came up as one of the ones prone to crashing in the tests, it was in the first batch of ones I did.

I've updated the description of the error with RocketAI to specify it appears to be doing it intentionally.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: List of good AI & AI testing.

Post by Redirect Left »

Its June update time, which yes, is something i've only just decided to start doing in months where there are any meaningful AI changes to help keep people aware of good AI, and track as new ones or updates to AI's are released.
I've done some more tests, using updated AI, and an AI i somehow missed off the initial ones, Mungo.

So first off, newly tested AI:
Mungo. Was going so well, but eventually got a fail as it doesn't handle save/load sequence, crashing with a GetLocation error, shame as it did prove stable without save/load. If you never intend to save & reload, it does seem to work as well as intended.

Updated versions of SuperSimpleAI, AAAHogEx & RailwAI passed and were as stable as before, maintaining their 'good'/tick label. ChooChoo randomly threw an error, but its author Michiel was quick to patch it, so good work there.

I've also filled in more links to GitHub or TT-F pages where found, and I also corrected the link to Xarick's fix for CPU evaluator issues, it linked to a thread rather than the specific post in the thread, which is only very minorly helpful, rather than helpful. I also moved linked images all to a local folder instead of hoping external image sources won't die for example images.

In other news, I'd really appreciate it if people were able to link people looking for AI here, and maybe together we can get a single place for AI info going that is as up to date as possible always. If there's anything you want me to add or test, let me know and I'll set my spare computer doing some tests! I've a lot of spare time, and plenty of surplus processing power doing nothing but science tasks usually.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
AdmiralEllis
Engineer
Engineer
Posts: 20
Joined: 22 Jan 2023 23:17

Re: List of good AI & AI testing.

Post by AdmiralEllis »

Is your site still up? It's throwing an error for me.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: List of good AI & AI testing.

Post by Redirect Left »

AdmiralEllis wrote: 27 Jul 2023 15:54 Is your site still up? It's throwing an error for me.
Hi, I'm so sorry for that. I had forgotten to renew the SSL certificate, apparently my automated stuff wasn't capturing that address, but was for all the others pointed to the same server.

It should now work as expected, and any feedback on it is appreciated to help improve the listings.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7337
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: List of good AI & AI testing.

Post by Redirect Left »

So the monthly updates went well, turns out not a lot changes in the AI world of OpenTTD.

However, this week I've tested a lot more road based AIs i missed out in the inital tests, and for one of them, it's very competitive whilst only using road vehicles & planes!

Here we go;
Snake: A very good performing road & air AI. This is basically the AAAHogEx of road & air transport, it will very quickly expand and offer a challenge if you are also only using road & air. It builds what is arguably too many road depots. Despite these problems, it does not crash, so i would recommend it still, although original author is no longer active on TT-F.
UberSwarm: Pretty good! It rapidly builds a large amount of road vehicles, but it never reaches massive income with them, unlike Snake.
CPU: Poor performing, but stable. By default this AI leaves a lot of spam messages around. You can disable this in its settings, untick "debug messages" to stop this behaviour. You must set this setting BEFORE the ai becomes active in game, once the AI company is formed, this setting panel is unavailable, as far as i can tell. Also CPU has a habit of doing... whatever this is.
RoadAi: It tries, but doesn't get far. It also doesn't crash though. Sometimes fails to build anything with the error of timed out to find path, used 500 of 500 loops.
SmallTownAI: Crashes (expecting integer, but given null).

As these AI are mostly heavily road based, you may want to expand your setting for maximum road vehicles to 1,000 or higher rather than the default of 500. It will help these AI significantly if you're wanting a basic road based competitor. Snake AI seems to handle around 550 planes & 2500 road vehicles fine before slowing down on a well sized map (512 by 1024 used in testing) So if your system can handle that many units, go for it!

The site has been updated at the usual place to reflect these findings too. As always, let me know if you spot a mistake, or want me to investigate an AI further, or think of an AI i've missed.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest