RoadRunner AI
Moderator: OpenTTD Developers
RoadRunner AI
Hi together,
today I want proudly present....
An AI, which depends on the Pathzilla AI. First I only want to fix some bugs, to get PathZilla to run with new OpenTTD-Versions, but then I can't stop to change things in this AI...
So here it is, which many improvements:
Transports all kinds of cargo,
Better calculation of the required fleet size,
Better protection of going bankrupt,
and many little other things...
Ok, have fun with it and if you find any bugs (I don't hope so), please report it in this thread. I will try to fix them if possible.
And last but not least many many thanks to George Weller for writing the original AI PathZilla. Good work, guy.
today I want proudly present....
An AI, which depends on the Pathzilla AI. First I only want to fix some bugs, to get PathZilla to run with new OpenTTD-Versions, but then I can't stop to change things in this AI...
So here it is, which many improvements:
Transports all kinds of cargo,
Better calculation of the required fleet size,
Better protection of going bankrupt,
and many little other things...
Ok, have fun with it and if you find any bugs (I don't hope so), please report it in this thread. I will try to fix them if possible.
And last but not least many many thanks to George Weller for writing the original AI PathZilla. Good work, guy.
- Attachments
-
- RoadRunner-9.tar
- RoadRunner AI - Version 9
- (460 KiB) Downloaded 1047 times
Last edited by Steffl on 30 Jun 2013 14:04, edited 23 times in total.
Re: RoadRunner AI
Sorry to say, but I've already found a bug. In this town RoadRunner builds 2 bus stops and a truck stop, but doesn't check that there is a route through the town.
Just look at the roads in the town and you'll see what I mean.
Just look at the roads in the town and you'll see what I mean.
Re: RoadRunner AI
Hi kirky_D,
thanks for testing my AI and for the bug report.
Have you modified something on the game settings? I always thought all roads inside a town are connected to the center. I can't promise you, that I can fix this bug. I think I would have to make bigger changes in the station placement algorithm. I hope the AI sees, that there is no profit on this bus service and then closes it down.
thanks for testing my AI and for the bug report.
Have you modified something on the game settings? I always thought all roads inside a town are connected to the center. I can't promise you, that I can fix this bug. I think I would have to make bigger changes in the station placement algorithm. I hope the AI sees, that there is no profit on this bus service and then closes it down.
Re: RoadRunner AI
Actually, the center tile do not always need to be covered road. By default it has road, but it could have been demolished so that a house is placed there later. The player/AI who did that do not need to have done this to be evil.
Another case when you could get the same problem as you got in the screenshot if if the AI find a station location in a nearby town which is not connected by road. This problem has been present both in earlier CluelessPlus and PAXLink versions. You need to do path finding from your bus/truck stops to the tile where you path find from town to town or to the front tile of another bus stop that you know has a road to the road tile that is connected to the other town.
Another case when you could get the same problem as you got in the screenshot if if the AI find a station location in a nearby town which is not connected by road. This problem has been present both in earlier CluelessPlus and PAXLink versions. You need to do path finding from your bus/truck stops to the tile where you path find from town to town or to the front tile of another bus stop that you know has a road to the road tile that is connected to the other town.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: RoadRunner AI
I'm afraid I havn't changed anything in the game. Standard version 1.0.0 release. No newGRF's either.Steffl wrote:Hi kirky_D,
thanks for testing my AI and for the bug report.
Have you modified something on the game settings? I always thought all roads inside a town are connected to the center. I can't promise you, that I can fix this bug. I think I would have to make bigger changes in the station placement algorithm. I hope the AI sees, that there is no profit on this bus service and then closes it down.
Re: RoadRunner AI
Hi together,
I have changed some things on my AI, so that it should build faster on big maps. The bug reported by kirky_D, with not connected town roads should now also been fixed.
You can download the AI from the first post on this thread. I removed the old version.
One thing to RoadRunnerAI:
It's not its only goal, to make as much profit as possible. It tries for example to make heavy used stations, were some trucks deliver raw materials and other take the produced goods to towns. This often make jams, but I let it, as it is, because I think it looks nicer as separated stations. And it often works very good, especially in the early years.
That's all and sorry for my bad english.
I have changed some things on my AI, so that it should build faster on big maps. The bug reported by kirky_D, with not connected town roads should now also been fixed.
You can download the AI from the first post on this thread. I removed the old version.
One thing to RoadRunnerAI:
It's not its only goal, to make as much profit as possible. It tries for example to make heavy used stations, were some trucks deliver raw materials and other take the produced goods to towns. This often make jams, but I let it, as it is, because I think it looks nicer as separated stations. And it often works very good, especially in the early years.
That's all and sorry for my bad english.
- Attachments
-
- RoadRunner.1.tar
- (310 KiB) Downloaded 544 times
Re: RoadRunner AI
Do you handle the case at eg. factories when all loading bays get used by goods trucks that infinitely will try to full load the non-existing goods?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: RoadRunner AI
Hmm, yes the AI checks this. It looks how many trucks are waiting for loading and then reduces the fleet size, if there are too much.
But what you said Zuu is still a big problem, because it always needs time to react to changed situations and so jams can never completely be avoided.
One problem with factorys is, that the monthly production can be very different. If a train delivers things to a factory over longer distances, it has a very high production in one month and nothing in the other months. But how to implement this to an AI is difficult. I think you would have to save the production of all factories to get a value over a longer time. Then the calculation of the required number of trucks would be more exact.
I hope I could answer your question. Thanks for your interest. Bye.
But what you said Zuu is still a big problem, because it always needs time to react to changed situations and so jams can never completely be avoided.
One problem with factorys is, that the monthly production can be very different. If a train delivers things to a factory over longer distances, it has a very high production in one month and nothing in the other months. But how to implement this to an AI is difficult. I think you would have to save the production of all factories to get a value over a longer time. Then the calculation of the required number of trucks would be more exact.
I hope I could answer your question. Thanks for your interest. Bye.
Re: RoadRunner AI
I keep long term sliding mean of the amount of cargo that is waiting on the stations for adjustment of fleet size as well as long time means of how high usage the station has. (similar to your counting of how many loading slots that are used)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: RoadRunner AI
road runner
- Attachments
-
- Przechwytywanie.PNG (27.19 KiB) Viewed 25386 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: RoadRunner AI
Ah my good AI.
Kogut, you have to turn in the AI settings "Build funny, dumb things(yes/no)" from "yes" to "no"
Hope it works
Kogut, you have to turn in the AI settings "Build funny, dumb things(yes/no)" from "yes" to "no"
Hope it works
Re: RoadRunner AI
Today it is time for version 2 of RoadRunner AI.
There are many improvements, like a better handling of bus services, a primitive "ocean detector" and I removed the feature "Build funny, dumb things" (I hope so).
What do you others think of this AI? Is it already good enough to be added to the OpenTTD online content? What could maybe done better?
I know that the code performance and style is very bad. Sorry for that, but I am not really a good programmer. I did it more "just for fun" and the main thing for me is, how it performs in game.
There are many improvements, like a better handling of bus services, a primitive "ocean detector" and I removed the feature "Build funny, dumb things" (I hope so).
What do you others think of this AI? Is it already good enough to be added to the OpenTTD online content? What could maybe done better?
I know that the code performance and style is very bad. Sorry for that, but I am not really a good programmer. I did it more "just for fun" and the main thing for me is, how it performs in game.
- Attachments
-
- RoadRunner.2.tar
- RoadRunner version 2
- (320 KiB) Downloaded 406 times
Last edited by Steffl on 20 Jun 2010 05:39, edited 1 time in total.
Re: RoadRunner AI
YesSteffl wrote:Is it already good enough to be added to the OpenTTD online content?
I think it may be more competitive.Steffl wrote:What could maybe done better?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: RoadRunner AI
Erm... I tried RoadRunner v2, and it started to spam a town with tram tracks on its first route. It is OpenTTD 1.0.1, with the Generic Tram Set (and the temperate oil wells only_decrease neutraliser).
EDIT: Always does this when I start a new game with this configuration.
EDIT: Always does this when I start a new game with this configuration.
Re: RoadRunner AI
Hmm, I know the quite slow. But later in game it can reach other AIs. I don't know if I could make it faster because it has still the PathZilla algorithm, which connects first all targets to a network and this is taking some time.Kogut wrote:I think it may be more competitive.
@Brumi: Autsch, this looks like the depot placing algorithm goes mad. I didn't test this version with trams and newGrfs. But I will look what I can do to fix this.
Re: RoadRunner AI
There was sth similar with roads, it was unreported due to following crash of openttd.Steffl wrote:@Brumi: Autsch, this looks like the depot placing algorithm goes mad. I didn't test this version with trams and newGrfs. But I will look what I can do to fix this.
And I think it sometimes uses too many mail vans/busses causing very interestaing traffic jams.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: RoadRunner AI
Hmm, I can't reproduce this bug. I downloaded the oil wells neutraliser and the Generic Tram Set but the AI still don't make nonsense like in your game..
Have you maybe a save game for me, Brumi?
I know something similar, when the depot placement fails. It searches then many, many places from a depot tile to the station. But it only searches a path and not build roads/trams in my games.
I think it is because the pathfinder tries to connect to the side of an drive through station. I tried to fix this, but it's not working very well.
Have you maybe a save game for me, Brumi?
I know something similar, when the depot placement fails. It searches then many, many places from a depot tile to the station. But it only searches a path and not build roads/trams in my games.
I think it is because the pathfinder tries to connect to the side of an drive through station. I tried to fix this, but it's not working very well.
Re: RoadRunner AI
OK then, here is a savegame. The strange thing is that I always encounter this problem with this configuration, so it's easily reproducable for me.
- Attachments
-
- roadrunner.sav
- (313.03 KiB) Downloaded 490 times
Re: RoadRunner AI
Thanks Brumi. Now I can see it too. If I found the reason for this bug I will post a new version.
Re: RoadRunner AI
Bug fixed. The spamming of tram tracks was caused by the depot placing function. It build first the way from depot to station and then the depot. But you can't build a depot on an existing tram track, for a road depot this doesn't matter. So it tries each possible location and the result you can see in Brumi's picture.
@Brumi: I can't reproduce the bug because i usually play maps with smaller cities. And RoadRunner only builds trams if it find a possible connection between two big cities.
And I thank you for reporting this.
One very important function was added. I thought that no good AI could live without a headquarter, so it build one now. I think this is worth the 88$ it costs.
See the attached file as version 2.1.
edit: fixed a little bug
@Brumi: I can't reproduce the bug because i usually play maps with smaller cities. And RoadRunner only builds trams if it find a possible connection between two big cities.
And I thank you for reporting this.
One very important function was added. I thought that no good AI could live without a headquarter, so it build one now. I think this is worth the 88$ it costs.
See the attached file as version 2.1.
edit: fixed a little bug
- Attachments
-
- RoadRunner.2.tar
- RoadRunner - A road-only AI
- (320 KiB) Downloaded 483 times
Who is online
Users browsing this forum: No registered users and 1 guest