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.
paullb wrote:I was running Convoy against my bus-based AI, Jinjaba (Jinjaba Is Not Just Another Bus AI) and I was neck-and-neck with Convoy for overall score.
However, despite building significantly less busses, I was much more profitable. As a result, I think you might have too many busses on your routes. See attached.
Very well possible. Line management is still rather immature, esp. when no more towns to connect can be found after 1 or 2 years.
Jinjaba does show some nice graphs, keep going! Looking forward to see that published ( probably after the challenge ?)
wilco_moerman wrote:I noticed that Convoy has a peculiar bug. Sometimes if a large and a small* town are close by, and Convoy tries to connect both, then the following can happen:
suppose A is a small town, B is a big town and the distance between them is 13, then Convoy tries to build a bus station in A, but it check all tiles within a square of 30 for highest acceptance (15 tiles in all directions). But the highest acceptance in that square is actually in town B[/b] because it is bigger! So it builds a station in B (while thinking it is building it in A) then tries to connect this new station with the exit point in A, which then fails, and then tries to build a station in B, which also fails because there is already a station too close by.
.
Thanks for the feedback, I have ideas to solve this in the next update.
I've created a scenario that very well reproduces this, so I can test the solution, might be of use to other AI developers
Funny, once the changes to town influence were made so it can be done in a list, since the problem with my simple "Build two bus stations in one town" kept failing if there were other nearby towns, it's worked fine. I can show you my list code if it'd help anyone, since inter-city bus routes can be good in some circumstances.
paullb wrote:I was running Convoy against my bus-based AI, Jinjaba (Jinjaba Is Not Just Another Bus AI) and I was neck-and-neck with Convoy for overall score.
However, despite building significantly less busses, I was much more profitable. As a result, I think you might have too many busses on your routes. See attached.
I noticed something that probably went wrong with your AI on the tournament server by TrueLight. See e.g. this overview: http://devs.openttd.org/~noai/tournamen ... erview.gif
Look at the right end of the map, after some time your AI appearently builds a heap of roads(?) all around that town.
Maybe you could make an own thread for your AI, even if you won't publish it until after the contest?
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.
______________ My patches
check my wiki page (sticky button) for a complete list
Roujin wrote:
I noticed something that probably went wrong with your AI on the tournament server by TrueLight. See e.g. this overview: http://devs.openttd.org/~noai/tournamen ... erview.gif
Look at the right end of the map, after some time your AI appearently builds a heap of roads(?) all around that town.
I see the competition is approaching ( and has passed ) Convoys performance, so it's time for another update.
I made Convoy a little more aggressive, so now it also uses town where other players stations are present.
I you don't like that, following Truelight's suggestion, I made it configurable, change the agressive setting in line 837 to false, and it will keep away from your towns.
Version 1.3 was not much better in performance than ConvoyLib, but this version should perform a little better than ConvoyLib.
It still uses only buses, so it's hard to compare with other AI that also use trucks and industries, but optimizing bus handling is not finished yet. I like to squeeze most out of buses before adding trucks and industries (which would improve Convoys performance rather easy).
Lots of changes have been made, esp in better vehicle management and line management. I still have a lot of ideas to further improve it, but (lack of) time is my biggest enemy at the moment.
As usual, any comments are welcome, I don't take criticism personal, but as a chance to improve Convoy.
Just to keep you updated, I'm working on an update of Convoy ( the 1.4 was a little disappointing in the competion with other AIs, though it did well on a stand alone map.
I'm pleased to see that after the update it is beating Admiral very nicely on a small map. Some more testing needs to be done and then I will post it. ( the pink line is Convoy, the blue line is Admiral in the Company value graphs)
Attachments
Unnamed, 1st Jan 1960.png (47.09 KiB) Viewed 6974 times
GeekToo wrote:Just to keep you updated, I'm working on an update of Convoy ( the 1.4 was a little disappointing in the competion with other AIs, though it did well on a stand alone map.
I'm pleased to see that after the update it is beating Admiral very nicely on a small map. Some more testing needs to be done and then I will post it. ( the pink line is Convoy, the blue line is Admiral in the Company value graphs)
Concratulations, I'm curious for the new version. I hope you'll post it soon
One small bug report (ok, my fault), which Zuu already fixed in the wiki: when building the route the pathfinder found, you should use
-Comply to lastest API change ( adjacent stations )
-Several bugfixes
-Implementation of GetSetting Agressive: agressive is false in easy, true everywhere else. When not agressive, the AI tries to keep away from towns where another player has built stations
- fix of a long existing bug: when cash is not enough to build a route, it was not finished, leaving the stations unused. Now it retries to complete the route when more cash is available. Took some time, cause some structural changes had to be made
- on agressive settings, Convoy now is a lot more agressive than it used to be, making it a bit more competitive in multiplayer/ multiAI games. It was doing alright on it's own on a map, but with competing AIs it was too nice. If you don't want it to be agressive, change the settings in the config.nut file, then it keeps away from towns where other players built stations (but it alsa makes less money then )
-some smaller bugs solved.
Firstly, thanks for all the work on Convoy, I love using it as a benchmark to work with against Jinjaba.
However, with the 1.7 version I have noticed something perculiar. Often, for no apparent reason one of Convoy's vehicules is stopping in the middle of the road and never moved again and causes huge backups.
Thanks for the report, it was also present in 1.5 and 1.6. I know what is causing it, and thought I solved it, but I guess I'll have to try again. That's no problem, things will get better
-revision numbering changed to integers ( so now it's v8 iso 1.8 )
-dummy save/load function added to prevent warnings in the log
-most important change: fixed the problem of buses being stopped in the middle of their trip
-some other bug fixes and optimizations
Convoy, try to make his first line then if it failed the debug show that and nothing change .... (look at the first pic).
I pressed "Reload AI" for both of the 3 convoy. It worked with the first one; i mean it has built a road and 2 stops..but it didn't built busses... AND it didn't work at all for the second. (Look at the first pic)
EDIT: I added a third pictures with strange messages when i push the reload AI button
Judging by the logs, and the screenshot, you're playing on a hard map: very mountainous, and Convoy apparently has problems to find a good spot to build it's stations and depots.
Part of the problem is that I do not use drivethrough stations (yet, and they're setting dependent anyway) and try to minimize demolishing buildings in the town.
But I like the fact that you gave Convoy a hard time, gives me an opportunity to improve it, because of course it should also make money under these circumstances.
So, I would like you to post a savegame if that's possible, early in the game, so I can try to make things better.
Erf i can't find this savegame anywhere.
I'll try to reproduce that bug !
EDIT: The AI always do the same error (even are the difficultys parameters), i can send you my openTTD installation so you can try to find the problem ? maybe by mail ?
I have to noticed that it worked with previous versions !