AdmiralAI v25

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

Post Reply
Dimension
Engineer
Engineer
Posts: 8
Joined: 25 Oct 2008 06:20

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Dimension »

AI's loaded trains often go to the way with low reliability.

If it may be possible, can you teach AI to build a depot on the other railway? So loaded train go first to the depot and then go to the next station with full reliability.
Attachments
Untitled-1.jpg
Untitled-1.jpg (244.59 KiB) Viewed 6540 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

XxInNOutxX wrote:Well i tried to load the save file to play and guess what, it crashed on me for some reason. Can u enlighten me pls Yexo? :P I don't think you get what i mean. I meant starting 7 of them and only 1 or 2 manage to start off, the rest just had their values reduced to 1 pound
Loading a savegame indeed crashes NoAI now (will hopefully be fixed in next nightly), but can you still upload the savegame?

What I tried to explain in my last post: If you start AdmiralAI 7 times, they will all try to build the same route, but most of them will fail, so only lose money. You better start only 1 or 2 at a time (that is, untill I fix that issue in AdmiralAI properly).
Dimension wrote:AI's loaded trains often go to the way with low reliability.

If it may be possible, can you teach AI to build a depot on the other railway? So loaded train go first to the depot and then go to the next station with full reliability.
Sure, it already does build a depot on the other track, but that depot will be near to the unload station.
About your game: Do you have breakdowns disabled and maybe also the option "Vehicle need not to service if breakdowns is off"? If not, can you post a savegame too?
XxInNOutxX
Engineer
Engineer
Posts: 61
Joined: 20 Oct 2008 12:50

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by XxInNOutxX »

Hmm ok thanks yexo
Attachments
Prinninghall Transport, 7th Jun 1952.sav
(447.47 KiB) Downloaded 158 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

XxInNOutxX wrote:Hmm ok thanks yexo
That is not a NoAI savegame. Did you download a NoAI nightly and play with that? The AI in your savegame is dumb because it's the 0.6.x and trunk AI.
XxInNOutxX
Engineer
Engineer
Posts: 61
Joined: 20 Oct 2008 12:50

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by XxInNOutxX »

Yes im sure i dlled noai openttd
EDIT: OOPS uploaded the wrong one im super sorry
Attachments
Lardworth Transport, 14th Jan 1931.sav
(362.84 KiB) Downloaded 192 times
Last edited by XxInNOutxX on 26 Oct 2008 15:17, edited 1 time in total.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

XxInNOutxX wrote:Yes im sure i dlled noai openttd
Then you either uploaded the wrong save or you didn't start the NoAI binary. (This save is loadable in 0.6.3, NoAI saves are not)
XxInNOutxX
Engineer
Engineer
Posts: 61
Joined: 20 Oct 2008 12:50

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by XxInNOutxX »

I now uploaded the correct one
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

XxInNOutxX wrote:I now uploaded the correct one
Don't start the AI that many times (max 3) and give them some more years to build a route.
XxInNOutxX
Engineer
Engineer
Posts: 61
Joined: 20 Oct 2008 12:50

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by XxInNOutxX »

Ok thanks btw when do u intend to implement the ability to load AdmiralAI saved games? Just a casual qn :D
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

XxInNOutxX wrote:Ok thanks btw when do u intend to implement the ability to load AdmiralAI saved games? Just a casual qn :D
Of course. I'll fix that in v15.
XxInNOutxX
Engineer
Engineer
Posts: 61
Joined: 20 Oct 2008 12:50

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by XxInNOutxX »

Will be eagerly waiting for v15! :D Good luck on that development of v15 :wink:
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: AdmiralAI (v12 out with train support)

Post by bokkie »

Yexo wrote:Yes, that network was completely build by a branch of AdmiralAI, but not the version you can download here.

I took a look at your delaunay triangulation code, but I found it too slow especially on bigger maps with a lot of towns (try 2048^2 with high towns). I currently use the follow strategy:
1. Only use the top 1/3 biggest towns. This value maybe needs adjusting dependend on the total amount of towns / map size, but for now it's a good estimate.
2. For every town in this list, get the 3 nearest neighbours in all directions (N, E, S, W), and evaluate the connection between them. For the evaluation, get all neighbouring towns, and disallow the connection if it is the long side of a triangle with a big angle, allow it otherwise.

With this algorithm I can plan a network on 2048^2 with high towns in about 5 game days. Creating all signals so I can view the networks takes way longer of course. FYI, the screenshots shown above where created less than 5 years after the start of the game and all planned connections are build.

Besides this, I created several functions to cluster nearby towns, but those are currently not in use. I might run this clustering first and connect all clusters instead of only big cities.

@zutty: I'll clean up my network building code and send it to you.
Seeing your post in the cargodest topic, have you already merged the branch mentioned above (i.e. is your current build 'cargodest-proof')? Would be fun to play against AI with cargodest :)!
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v12 out with train support)

Post by Yexo »

bokkie wrote:Seeing your post in the cargodest topic, have you already merged the branch mentioned above (i.e. is your current build 'cargodest-proof')? Would be fun to play against AI with cargodest :)!
I have not yet merge my cargodest branch. However, the current version will work with cargodest, it it only builds point-to-point routes and those aren't affected by cargodest.
Dimension
Engineer
Engineer
Posts: 8
Joined: 25 Oct 2008 06:20

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Dimension »

Please, Yexo, do anything with railroad depots.
Attachments
1.jpg
1.jpg (324.52 KiB) Viewed 1663 times
Dimension
Engineer
Engineer
Posts: 8
Joined: 25 Oct 2008 06:20

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Dimension »

hm... It has happen because trains can not go forward. Some error with signals or else.
Attachments
random.sav
(530.81 KiB) Downloaded 151 times
2.PNG
2.PNG (98.85 KiB) Viewed 5842 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

Dimension wrote:Please, Yexo, do anything with railroad depots.
I'll have a look at it before I release the next version.
Dimension wrote:hm... It has happen because trains can not go forward. Some error with signals or else.
If you set "show pbs reservations" to on, you can see that the tile in front of the first train is reserved. I have no idea by which train, but this is a bug with pbs, not with my AI (all signals are correct, this situation should never happen).
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by bokkie »

AdmiralAI doesn't seem to take into account that with PBI's steel mills, only transporting coal to it isn't really a good idea. Other than that, it seems to be quite smart!
Geen naam, 20 Mrt 1947.png
Geen naam, 20 Mrt 1947.png (54.93 KiB) Viewed 5549 times
EDIT: also, it's having problems circumventing this sawmill.
Geen naam, 21 Jul 1951.png
Geen naam, 21 Jul 1951.png (110.22 KiB) Viewed 5535 times
Savegame attached, I haven't found out how to show errors/debug info/whatever.
Attachments
Geen naam, 19 Jul 1951.sav
(297.21 KiB) Downloaded 705 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

bokkie wrote:AdmiralAI doesn't seem to take into account that with PBI's steel mills, only transporting coal to it isn't really a good idea. Other than that, it seems to be quite smart!
The AI has no way of knowing that steelmill also requires iron ore. The only way it can find out is by trying and I've not implemented that yet.
EDIT: also, it's having problems circumventing this sawmill.
My best guess is that the sawmill wasn't there when the pathfinding started.
Savegame attached, I haven't found out how to show errors/debug info/whatever.
You can open the ai debug panel under the question mark in the main menubar.

Thanks for your report :D
User avatar
ShadowSpawn
Transport Coordinator
Transport Coordinator
Posts: 300
Joined: 24 Jul 2007 14:37
Location: Spehss

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by ShadowSpawn »

the unnamed guy in the pic is the admiral AI but i haven't got any ''new transport company started building in some town'' message so it hasn't really started yet. in another game with the admiral AI it started immediatly with a cargo route but it builded only the two station and no track. I am using DB set Xl, AV8, eGRVTS and some other smaller grf's with version r14552 noai. no vehicles are disabled for the computer.
Attachments
Hawthorn Transport Co., 22nd Aug 1933.png
(244.62 KiB) Downloaded 118 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI (v14 out): busses, trucks, trams, trains, planes

Post by Yexo »

blain wrote:the unnamed guy in the pic is the admiral AI but i haven't got any ''new transport company started building in some town'' message so it hasn't really started yet. in another game with the admiral AI it started immediatly with a cargo route but it builded only the two station and no track. I am using DB set Xl, AV8, eGRVTS and some other smaller grf's with version r14552 noai. no vehicles are disabled for the computer.
Can you post a screenshot of the AI Debug Panel (found under the question mark in the main toolbar) when this happens again?
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Baidu [Spider] and 38 guests