[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

xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

Re: [AI] AAAHogEx

Post by xarick »

Hi! Got a crash report.
Unnamed, 2025-04-22.png
(370.03 KiB) Not downloaded yet
Unnamed, 2025-05-03.png
(47.18 KiB) Not downloaded yet
Unnamed, 2025-04-21.sav
(17.18 MiB) Downloaded 14 times
Formerly known as Samu
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

xarick wrote: 28 Mar 2024 22:35 Hi! Got a crash report.
Unnamed, 2025-04-22.pngUnnamed, 2025-05-03.pngUnnamed, 2025-04-21.sav
Thank you, xarick. And now the estimate for air lines is wrong.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

Redirect Left wrote: 26 Mar 2024 20:00
LaChupacabra wrote: 26 Mar 2024 19:28 a lot of text lived here, that doesn't need duplicating to scroll peoples fingers to the boneMost o
Most of these (in post 5/5) I don't see in the AI tests i do, possibly because of using vanilla settings & no GRFs.

Here's the main issues i come across when doing the tests.
But its pathfinding is interesting to say the least (see attachment) at times for sure. It also has issues where it buys lots & lots of profitable vehicles, and it may jam up the network with them, and if the jam occurs where the depot is so nothing can get in, it just sits there with that jammed network, rather than building another depot somewhere to use as overflow to get a handle on things. Other AI do this, and sometimes far worse, but AAA does it infrequently.
It also builds entirely new routes, even if the route is for the most part right next to another set of tracks. It often misses the cheaper option to just partially use the other set of tracks and make a junction up stream. It might be a difficulty in AI working that out though, rather than AAA specifically.

It also really likes buoys. I get it, they help with wayfinding. But wow, there's so many of them in such a small area. I haven't witnessed it building any, so I dunno if its just not reusing other buoys from other boat routes nearby, or if its just going all out and building lots so close for same routes, again see attachment for that.

It also really really really likes to steal goods at factories and other such, which is annoying. But its how you get such a competitive player, I guess? With it being AIs only in my test setups, its not a big deal, but i can see an actual player getting frustrated. If the AI was contributing to the goods it produces, that's better. But it sometimes steal outright and doesn't provide any raw resources to have any claim over the output.

Despite these issues i run into with it, it really is a difficult AI to beat, even when it is tripping over itself, no other AI ever beat it. In all of my testing, i would rate it a 10/10 on the competitive scale, if you wanna have the chance of actually losing in terms of profit? This is your goto AI, 100%.
Often the problem with strange tracks is that they do so when aaahogex is blocked by other companies during construction. Also, when there are lots of other companies on the map and space is tight. It is improving a little with each version up, but it's really hard to make it perfect.

The bouys problem is solved with openttd v14, so try it. :wink:

And, there is an option "Avoid secondary industry stealing" to prohibit stealing from the factory, so do it. :D Note, however, that if aaahogex sets up a station first and another company comes in later, he will not pull out.
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 »

AAAHogEx wrote: 29 Mar 2024 03:16 The bouys problem is solved with openttd v14, so try it. :wink:
The most recent round of testing, where the provided image is from, uses RC3 of OTTD 14. My latest batch of tests in the thread I have was done on a mixture of RC2 & RC3, as the latter was released midway through the testing cycle of all the AIs.
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 »

Redirect Left wrote: 29 Mar 2024 04:02
AAAHogEx wrote: 29 Mar 2024 03:16 The bouys problem is solved with openttd v14, so try it. :wink:
The most recent round of testing, where the provided image is from, uses RC3 of OTTD 14. My latest batch of tests in the thread I have was done on a mixture of RC2 & RC3, as the latter was released midway through the testing cycle of all the AIs.
That point is not about the image, it's about the buoy. Could you please check again?
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 »

AAAHogEx wrote: 29 Mar 2024 09:15it's about the buoy. Could you please check again?
What would you like me to check? I'm not sure what you're referring to. But using OpenTTD 14 RC2&3, AAAHogEx was still very buoy happy.
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 »

Redirect Left wrote: 29 Mar 2024 11:25
AAAHogEx wrote: 29 Mar 2024 09:15it's about the buoy. Could you please check again?
What would you like me to check? I'm not sure what you're referring to. But using OpenTTD 14 RC2&3, AAAHogEx was still very buoy happy.
Is the version of aaahogex at 82? I can't reproduce it here, so can you give me the save data?
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 »

OK, can confirm using 82 of AAAHogEx fixed it too, apparently that was changed midway through the tests as well as the release of RC3. Hard to keep up with regularly updated things :lol: :mrgreen:
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

Re: [AI] AAAHogEx

Post by xarick »

AAAHogEx is trapping opponents road vehicles when removing roads.
Attachments
Unnamed, 1975-02-20.sav
(5.84 MiB) Downloaded 19 times
Unnamed, 1975-02-02.png
(775.57 KiB) Not downloaded yet
Formerly known as Samu
User avatar
odisseus
Director
Director
Posts: 564
Joined: 01 Nov 2017 21:19

Re: [AI] AAAHogEx

Post by odisseus »

Well, the AI has no responsibility to cater for other companies' vehicles. The other company is free to build the missing road pieces and free their vehicles.

That said, I don't understand why there's a need to remove any roads at all.

However, if you still choose to remove a stretch of road for whatever reason, here's an idea how to do it safely:
  1. Identify a stretch of road between two junctions that doesn't have any junctions in the middle (dead ends are ok).
  2. Mark each end of that road as one-way, with the permitted direction being outwards.
  3. Pick a tile somewhere in the middle, and mark it as blocked.
  4. Allow some time for the existing traffic to clear the road.
  5. Starting from the middle tile, start marking adjacent tiles as blocked.
  6. Once every tile of the road is blocked, the entire stretch is definitely safe to remove.
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

odisseus wrote: 02 Apr 2024 12:56 Well, the AI has no responsibility to cater for other companies' vehicles. The other company is free to build the missing road pieces and free their vehicles.

That said, I don't understand why there's a need to remove any roads at all.

However, if you still choose to remove a stretch of road for whatever reason, here's an idea how to do it safely:
  1. Identify a stretch of road between two junctions that doesn't have any junctions in the middle (dead ends are ok).
  2. Mark each end of that road as one-way, with the permitted direction being outwards.
  3. Pick a tile somewhere in the middle, and mark it as blocked.
  4. Allow some time for the existing traffic to clear the road.
  5. Starting from the middle tile, start marking adjacent tiles as blocked.
  6. Once every tile of the road is blocked, the entire stretch is definitely safe to remove.
Thanks for the advice. I haven't looked at the savedata yet, but I think it is probably infrastructure maintenance: ON, and AAAHogEx looks at that setting, and if it is ON, it will remove facilities that are no longer needed to save on maintenance costs. If implemented in the way you describe, the AI would be able to prevent most vehicle locks. However, I don't think it is perfect. This is because there could be cases where the roads are congested and vehicles don't move at all. A simpler implementation to prevent other companies' vehicles from locking up might be to roll back the entire roads removing if the road deletion fails even partially. (But even in this case, the rollback itself could fail.) In any case, it is tricky.
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

Re: [AI] AAAHogEx

Post by xarick »

AAAHogEx almost blocks himself with lock placement. Good thing there's a detour just to the north.
Attachments
Unnamed, 1964-07-24.sav
(1.71 MiB) Downloaded 22 times
Unnamed, 1964-09-24.png
(112.89 KiB) Not downloaded yet
Formerly known as Samu
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [AI] AAAHogEx

Post by AAAHogEx »

xarick wrote: 05 Apr 2024 18:50 AAAHogEx almost blocks himself with lock placement. Good thing there's a detour just to the north.
Thank you for your report. If it was completely blocked, it would be confirmed that it was an AI malfunction, but if there was a detour, it is possible that this route was recognized as not being used.
pwhk
Engineer
Engineer
Posts: 1
Joined: 17 Apr 2024 14:50

Re: [AI] AAAHogEx

Post by pwhk »

Testing with some of my GRFs and I found AAAHogEx did this.
Image

(AAAHogEx is the most profitable AI in my testing :) )
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 22 guests