[AI] AAAHogEx

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
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

xarick wrote: 23 Apr 2023 13:36 You nearly got 5000 vehicles of all types, amazing!
But then, Excessive cpu usage.
Thank you for your report. This is a great test! :o
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: [AI] AAAHogEx

Post by Redirect Left »

xarick wrote: 23 Apr 2023 13:36 You nearly got 5000 vehicles of all types, amazing!
That is really impressive for an OTTD AI! I never really was able to let AI's stretch their legs all that much in my mass testing for suitability. I couldn't risk them all going nuts and slowing down the computers I used for testing, so they had 2k max trains, 1k max RV's (these really killed the CPU cycles more than anything from the show frame rate window), just 50 planes, and 250 ships.
It's a shame due to the single threaded nature of OpenTTD, I can't offload each AI and relevant maths for its units/pathfinding to a separate core/thread for each one, it'd be fantastic to let all AI stretch their legs on a giant map with the max 5k of each unit possible for everyone. Would probably be the first time my i9-12900 had actually been pumped to 100% usage :lol:

I've also noticed AAAHogEx using more sensible routing lately, so you also managed to do a decent job at getting its sometimes unwieldy routes in order.
I'm tempted to start a game where the only goal is: Get more money than AAAHogEx. Unfortunately that is probably a pipe dream, it seems pretty unbeatable in that way!
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
TheDarkGiganotosaur
Engineer
Engineer
Posts: 29
Joined: 24 Mar 2010 15:49
Location: Portugal

Re: [AI] AAAHogEx

Post by TheDarkGiganotosaur »

Wow! Having around 5000 vehicles of each type (around 20000 vehicles in total) is far too much... and no player could've built these too many vehicles, let alone compete with this AI. Must be a new record in the history of OpenTTD for an AI-controlled player to go that far and eventually break the game's limits. Well done! Image
The Dark Giganotosaur, the ghastly dinosaur (currently in human form)
"My favorite type of transport vehicles? Trains and streetcars/trams." | My Music | My Arts (TBA)
Windows 10 x64 (NEVER USED) | Knoppix 8.1+ x64 | Linux Mint 20.3 Xfce x64
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

Thank you all for your help!
Redirect Left wrote: 25 Apr 2023 07:15 I'm tempted to start a game where the only goal is: Get more money than AAAHogEx. Unfortunately that is probably a pipe dream, it seems pretty unbeatable in that way!
I tried it out and this AI knocked me out in terms of profitability. If you win, please report back how you won! :bow:
Daktyl
Engineer
Engineer
Posts: 1
Joined: 29 Apr 2023 20:38

Re: [AI] AAAHogEx

Post by Daktyl »

Just got this error. What happened is that one of the stations got removed between first and second lane of tracks got laid down and after script finished placing last tile of track script crashed
OpenTTDAIError.png
OpenTTDAIError.png (40 KiB) Viewed 3377 times
EDIT: Ok, looks like it was somehow caused by "took control over" when I was spectating this AI. When I'm not doing it it seems to perform stable
Attachments
AAAHogEx, 1943-06-01.sav
(659.02 KiB) Downloaded 76 times
ahyangyi
Engineer
Engineer
Posts: 18
Joined: 05 Feb 2010 07:34

Re: [AI] AAAHogEx

Post by ahyangyi »

The AI seems to refuse to work if I disable all types of transportation except trams. Of course, I tested with NewGRF providing trams (either 2cc tram or Road Hog).

Can AAAHogEx love Road Hogs?
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: [AI] AAAHogEx

Post by Redirect Left »

Hello, tis I, the AI tester again!*
Using the newest relase on BaNaNaS, the AI does some... interesting moves.
2023-05-24 01_49_08-OpenTTD 13.1.png
2023-05-24 01_49_08-OpenTTD 13.1.png (194.86 KiB) Viewed 3129 times

*I really should setup an AI macro to do this for me
Attachments
odd routing.sav
(3.89 MiB) Downloaded 78 times
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
YottaMxt
Engineer
Engineer
Posts: 2
Joined: 01 May 2023 12:43

Re: [AI] AAAHogEx

Post by YottaMxt »

Hello,

So I don't know if it happens with all NewGRFs, but when I add a car NewGRF which isn't in the list AAAHogEx crashes instantly after beggining its construction. Currently, it does crash with Eyecandy road vehicles, Funny cars and generic cars.

Here is an image of the debug window: Image

Thanks in advanced.
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: [AI] AAAHogEx

Post by Auge »

Hello
YottaMxt wrote: 27 May 2023 16:13 So I don't know if it happens with all NewGRFs, but when I add a car NewGRF which isn't in the list AAAHogEx crashes instantly after beggining its construction.
Do you add the Cars-Set before starting a new game or from within the running game?

Tschö, Auge
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: [AI] AAAHogEx

Post by uzurpator »

The Hog crashes in tropical climate when trying to make a copper ore route ( at least, that is what the log suggests ). Only new grf used was tropic refurbishment. Yes - all those crashed AIs are hogx and the log is the same for each of them.

Also - as an observation - the best way to fight a Hog is to run it against others of her kind. They crowd around the same resource and cannibalize themselves. I provide a screenshot of four of them duking it at each other on one route and it is a theme in this savegame - there are bound to be more opportunities there - it is 4046x4096 map after all.

Lastly - on those 4k vs 4k maps Hog takes a loooooooong while to start building stuff. Years sometimes.
Attachments
hogx_dead.PNG
(874.03 KiB) Not downloaded yet
hogx_vs_hogx.PNG
(2.07 MiB) Not downloaded yet
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: [AI] AAAHogEx

Post by uzurpator »

Another crash. This time i let 15 hogs duke it out on 4k x 4k map. Most got to ~500trains and they keep going.
Attachments
hogx_Dead2.PNG
(1.1 MiB) Not downloaded yet
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: [AI] AAAHogEx

Post by uzurpator »

I unshackled the best - allowed it to run 20 tile trains and gosh darn it it's going to run 20 tile trains.
Attachments
ebin_hog.PNG
(743.6 KiB) Not downloaded yet
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: [AI] AAAHogEx

Post by Redirect Left »

uzurpator wrote: 26 Dec 2023 10:28 I unshackled the best - allowed it to run 20 tile trains and gosh darn it it's going to run 20 tile trains.
That's something I noticed in my mass testing, AAAHogEx is really adaptive and seems to make use of as many settings as it can.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

Daktyl wrote: 29 Apr 2023 20:41 Just got this error. What happened is that one of the stations got removed between first and second lane of tracks got laid down and after script finished placing last tile of track script crashed
OpenTTDAIError.png

EDIT: Ok, looks like it was somehow caused by "took control over" when I was spectating this AI. When I'm not doing it it seems to perform stable
Thank you for your report.
I apologize for the delay in addressing this issue, as I was occupied with a major task until now. However, I have now released a fixed version for this problem.

With the completion of that large task, I am now able to address other issues that may arise.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

ahyangyi wrote: 20 May 2023 17:15 The AI seems to refuse to work if I disable all types of transportation except trams. Of course, I tested with NewGRF providing trams (either 2cc tram or Road Hog).
Thanks for your report. There was an issue where disabling Roads would inadvertently also disable Trams, not just in RoadHogs. I am reporting that this has been fixed and released in version 54.
ahyangyi wrote: 20 May 2023 17:15 Can AAAHogEx love Road Hogs?
Give it a try! :]
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

Redirect Left wrote: 24 May 2023 00:51 Hello, tis I, the AI tester again!*
Using the newest relase on BaNaNaS, the AI does some... interesting moves.
2023-05-24 01_49_08-OpenTTD 13.1.png
*I really should setup an AI macro to do this for me
Thank you for your report. This issue seems to occur frequently when disused branch lines are dismantled. I am thinking about a solution, but it appears to be a challenging problem.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

YottaMxt wrote: 27 May 2023 16:13 Hello,

So I don't know if it happens with all NewGRFs, but when I add a car NewGRF which isn't in the list AAAHogEx crashes instantly after beggining its construction. Currently, it does crash with Eyecandy road vehicles, Funny cars and generic cars.
Thank you for your report. It seems that the presence of vehicles with a price of 0 was causing crashes. I have released a fixed version as version 55.
Last edited by AAAHogEx on 23 Jan 2024 06:18, edited 1 time in total.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

uzurpator wrote: 22 Dec 2023 07:16 The Hog crashes in tropical climate when trying to make a copper ore route ( at least, that is what the log suggests ). Only new grf used was tropic refurbishment. Yes - all those crashed AIs are hogx and the log is the same for each of them.
uzurpator wrote: 24 Dec 2023 12:48 Another crash. This time i let 15 hogs duke it out on 4k x 4k map. Most got to ~500trains and they keep going.
Thank you for your report. I was unable to reproduce the issue exactly, so I am not certain if it has been fixed, but I have made some adjustments to the suspicious areas and released it as version 56. If the crashes continue, it might be a crash dependent on specific settings, so it would be helpful if you could attach the save data.
uzurpator wrote: 22 Dec 2023 07:16 Also - as an observation - the best way to fight a Hog is to run it against others of her kind. They crowd around the same resource and cannibalize themselves. I provide a screenshot of four of them duking it at each other on one route and it is a theme in this savegame - there are bound to be more opportunities there - it is 4046x4096 map after all.

Lastly - on those 4k vs 4k maps Hog takes a loooooooong while to start building stuff. Years sometimes.
I am aware of this issue as well, but due to structural problems, it is difficult to resolve. At this point, I apologize, but I do not recommend using 4k4k maps or launching multiple instances of AAAHogEx simultaneously.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

I have improved the performance on 4k4k maps. It has been released as version 57.
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: [AI] AAAHogEx

Post by uzurpator »

I am using version 58 and the crash on copper ore service crash remains. Base game - no mods whatsoever. Just a game with 5 Hogs.
Attachments
hog_crash.PNG
(54.26 KiB) Not downloaded yet
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 26 guests