Page 1 of 10

[AI] AAAHogEx

Posted: 30 Jan 2022 17:15
by AAAHogEx
Hello, everyone!

Please allow me to introduce a new AI for OpenTTD. This AI understands the supply chain on the map and builds optimal transportation routes. To do this, it has a full-fledged feeder system and estimating capabilities. This makes it highly profitable, and it can handle complex industry sets such as FIRS ECS and YETI which have been difficult to handle in the past.
As we have just released it to the Bananas, I am paying close attention to its stability, but there may be some problems yet. It would be great if you could test it and report back to me.

Note: This AI is very powerful, so it is recommended for beginners to slow down its operation using the following method. In the settings before starting the game, set the value of "#opcodes before scripts are suspended" to a lower number (for example, 2000).
ss 2024-01-23 121836.png
ss 2024-01-23 121836.png (10.64 KiB) Viewed 5451 times
Settings

Avoid removing water
Option to avoid interfering with other players' ship routes.

Force to start handling the fright, once the funds are stabilized
This AI builds based on profitability, so it may only handle passengers and mail in some environments. Option to avoid that.

Avoid secondary industry stealing
You don't have to be sad when someone steals the products of the factory you were growing.

Supported NewGRFs

station set
Industrial Stations Renewal (recommend)

vehicle set
2cc/JapanSet/North American/Dutch/UK/Czech/Iron Horse/eGRVTS/HEQS/AV8/FISH/SailingShips/NuTracks etc

industry replacement set
FIRS/ECS/YETI/NAIS etc

Please let me know if there are any NewGRFs that do not work well.
Or it's not on the list, but report that it's working is also welcome!

github: https://github.com/rei-artist/AAAHogEx

Image

Re: [AI] AAAHogEx

Posted: 30 Jan 2022 21:55
by Wormnest
Good to see a new AI appearing! It was doing great until it crashed, apparently while building a train route.

Image

Re: [AI] AAAHogEx

Posted: 31 Jan 2022 00:30
by AAAHogEx
Wormnest wrote: 30 Jan 2022 21:55 Good to see a new AI appearing! It was doing great until it crashed, apparently while building a train route.
Thanks for reporting this! It seems to happen when the AI fails to create the first train after building the train route.

I've uploaded the fix as v2 to bananas. However, this time it seems that a suitable engine could not be found. This should only happen under rare conditions, as it should be searched for before the route construction. So I am curious as to why it happened. I hope there is some save data or something.

Re: [AI] AAAHogEx

Posted: 31 Jan 2022 23:49
by AAAHogEx
version 3 released!

・Fixed a crash when an industry is closed.
・Recursively calculate routes that use industries and reflect them in route building priorities.
・Moved stations closer to industries.
・Added support for trains with more than double heading. :D
aaahogex-ss2-2.jpg
aaahogex-ss2-2.jpg (42.35 KiB) Viewed 24012 times

Re: [AI] AAAHogEx

Posted: 02 Feb 2022 00:12
by AAAHogEx
version 4 released!

・Support for 2cc Multiple Unit Wagon
・Fixed an issue where reusing bridges would fail.
・Changed the timing of retrieving trains to depot to return trip only.
・Changed YETI's building priority calculation from stockpile to supply.
・Trams support! :D

Put in a nice trams NewGRFs and let's play!
aaahogex-ss5-2.jpg
aaahogex-ss5-2.jpg (118.78 KiB) Viewed 24011 times

Re: [AI] AAAHogEx

Posted: 02 Feb 2022 11:05
by GreyGhost
Hello, your AI stubbornly ignores the ban on trucks and aviation. He builds an airport and then goes bankrupt. I understand it's because I forbade him to build airplanes.
It works fine with the ECS mod and Japanes set. But alas, only in 1900. Until airports appeared. If you create a game when there is already an airport, then he will desperately try to build only them.
Also, it is not clear to me how he takes the cargo from the enterprise if the raw materials are not delivered to the enterprise?).
But I'm still very happy! That such a beautiful game is not forgotten!!)

Re: [AI] AAAHogEx

Posted: 02 Feb 2022 13:24
by AAAHogEx
Thanks for your valuable report!
So far the only way to ban aircraft in this AI is to set max-aircraft-per-company to 0. I have implemented the check here and it should work fine. The same for trucks, etc.
https://wiki.openttd.org/en/Archive/Man ... er-company

Perhaps it is this setting that is not working well?
https://wiki.openttd.org/en/Archive/Man ... r-computer
I haven't implemented this one at all, I'll look into it!

I saw a game on Steam that I used to play over 10 years ago and got nostalgic and played it. Then I noticed that the game had a nice AI system implemented, and I was having fun with all the great AIs... So, I couldn't resist creating this AI. I too am glad that there are people playing this game. :wink:

Re: [AI] AAAHogEx

Posted: 03 Feb 2022 01:45
by AAAHogEx
version 6 released!

・Add option 'Avoid secondary industry stealing' 8)
・Fix the problem when the following settings are used: Competitors->Disable [trains/road vehicles/aircraft/ships] for computer
・Fix the problem with sending passengers to Oil Rig to grow.

By the way, I keep getting beaten up by this AI. :oops: :oops: :oops:

Re: [AI] AAAHogEx

Posted: 03 Feb 2022 03:52
by odisseus
I have left this AI running over 30 or so years, and it has built quite a network indeed. Great job!

Re: [AI] AAAHogEx

Posted: 03 Feb 2022 05:26
by AAAHogEx
odisseus wrote: 03 Feb 2022 03:52 I have left this AI running over 30 or so years, and it has built quite a network indeed. Great job!
Thanks for the compliment! :D
The speed of PathFinder in this AI is one of the fastest in AI as far as I know, so that seems to have worked in its favor.

Re: [AI] AAAHogEx

Posted: 07 Feb 2022 03:30
by AAAHogEx
version 7 released!

・Support variable platform length
・Made the bus stop for feeders from the town closer to the station
・Some minor performance improvements
・Some minor bug fixes

If you set Settings->Limitations->Maximum length of trains to 8 or more, it will make longer trains. :D :D :D
Enjoy!

Image

Re: [AI] AAAHogEx

Posted: 07 Feb 2022 05:27
by AAAHogEx
version 10 released!

・Solved a rare crash problem related to the town bus. :P

Re: [AI] AAAHogEx

Posted: 10 Feb 2022 02:18
by AAAHogEx
version 12 released!

・Change the structure of the source station to be more realistic.
・Support 90° turns. (Settings->Vehicles->Routing->Forbid trains from making 90° turns)
・Fix minor bugs and improve performance.

Image

Re: [AI] AAAHogEx

Posted: 08 Mar 2022 11:56
by AAAHogEx
version 13 released!

・Support setting 'Limitations -> Allow joining stations not directly adjacent' disabled
・More train transfers :D
・Improve rail layout
・Improve pathfinder performance
・Increase tunnel availability
・Fix: Possibility of bankruptcy when there is a refitable locomotive

aaahogex-ss28-3.jpg
aaahogex-ss28-3.jpg (236.66 KiB) Viewed 22804 times

Re: [AI] AAAHogEx

Posted: 24 Mar 2022 04:49
by AAAHogEx
Version 15 released!

Not compatible previus version saved data
Support: Multiple types of cargo in one train
Fix: Rail tracks sink under the water
Fix: Trains can get lost when extending the line
Fix: The length of the train sometimes exceeds the platform when 'Limitations->Maximum length of trains' is set to 8 or longer

Turn on the setting 'Put as many different types of freight as possible into one train'
Image

Re: [AI] AAAHogEx

Posted: 26 Mar 2022 16:27
by krokots
Really amazing AI. Would it be possible to add an option to disable trams for the AI?

The AI have sometimes problems when constructing tracks. I don't know what happened here, but this is a failed line and all the trains are stuck. I'll post some other problems when I find them.

Re: [AI] AAAHogEx

Posted: 27 Mar 2022 06:43
by AAAHogEx
krokots wrote: 26 Mar 2022 16:27 Really amazing AI. Would it be possible to add an option to disable trams for the AI?

The AI have sometimes problems when constructing tracks. I don't know what happened here, but this is a failed line and all the trains are stuck. I'll post some other problems when I find them.
Thanks for reporting back!

What version are you trying? The latest version 15 eliminates one of the possibilities for this to happen, so if you are not up to date, please try it. However, it is not compatible with save data of the old version, so you will have to start a new game to get the new version.
(Please click '?' icon and then go to 'AI/Game Script Debug' to check the version of the AI you are running.)

I'll add the tram disabled option to the work list!

Re: [AI] AAAHogEx

Posted: 03 Apr 2022 16:05
by coyoteelabs
Thanks for the great AI.

I found a problem with it. I'm using Andrew's Conveyor Belts mod. The AI established a truck route (using the conveyor belts) and used town generated roads as part of the route resulting in a route that didn't work.

The AI should check if the roads are compatible before using them.

In the attachment, the part highlighted in yellow was added by me to allow the AI route to work. The ends of the added route are where the AI connected with the town roads.

Re: [AI] AAAHogEx

Posted: 05 Apr 2022 01:33
by AAAHogEx
coyoteelabs wrote: 03 Apr 2022 16:05 Thanks for the great AI.

I found a problem with it. I'm using Andrew's Conveyor Belts mod. The AI established a truck route (using the conveyor belts) and used town generated roads as part of the route resulting in a route that didn't work.

The AI should check if the roads are compatible before using them.

In the attachment, the part highlighted in yellow was added by me to allow the AI route to work. The ends of the added route are where the AI connected with the town roads.
Cool newgrf! Looks like a factorio.
I will address this in the next release. Looking forward to it.

Thank you for your valuable report.

Re: [AI] AAAHogEx

Posted: 18 Apr 2022 14:41
by AAAHogEx
Version 16 released!
  • Support: Multiple road types(supported newgrfs: RattRoads, CONVEYOR BELT etc)
    aaahogex-ss35.png
    aaahogex-ss35.png (592.87 KiB) Viewed 20153 times
  • Support: Settings->Accounting->"Infrastracture maintenance"
    • Consider maintenance costs when planning routes
    • Remove rails on deficit route
  • Support: Pathfinding to avoid mountains when traction is weak
    aaahogex-ss36.jpg
    aaahogex-ss36.jpg (84.07 KiB) Viewed 20153 times
  • Support: Disable trams option
  • Support: 3 or more bus stops in a large city
  • Fix: Issue about one station with multiple industries
  • Other minor bug fixes and improvements