If it happens in any game, then you could start a game and make a new savegame. Or you could post or PM the cfg file.dbkblk wrote: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 !
Convoy: train support testversion
Moderator: OpenTTD Developers
Re: Convoy: the bus loving AI (V8)
Re: Convoy: the bus loving AI (V8)
Hmm i'm stupid, ok it's with the post.
PS: It does the same with/without eGVTRS, ECS Vectors etc...
PS: It does the same with/without eGVTRS, ECS Vectors etc...
- Attachments
-
- StartPointForConvoy.sav
- (197.33 KiB) Downloaded 254 times
Re: Convoy: the bus loving AI (V8)
Thanks for the savegame. I could reproduce the problem and analysed why Convoy did not build any stations.
Seems like the problem is not in Convoy, but in the ECS town vector newgrf. For some reason this newgrf sets the cargo acceptance of passengers in towns to very low values: 0 to max 8.
Then Convoy comes to the (correct) conclusion that it is not economically feasible to build a bus line.
When you disable the ECS town vector newgrf, it works as it should.
Seems like the problem is not in Convoy, but in the ECS town vector newgrf. For some reason this newgrf sets the cargo acceptance of passengers in towns to very low values: 0 to max 8.
Then Convoy comes to the (correct) conclusion that it is not economically feasible to build a bus line.
When you disable the ECS town vector newgrf, it works as it should.
Re: Convoy: the bus loving AI (V8)
AFAIK, ecs does not change passengers acceptance / production in towns at all. However, it does introduce a new cargo with cargo class = CC_PASSENGERS. That cargo is tourists, and is indeed not accepted by normal houses, but by certain industries.GeekToo wrote:Thanks for the savegame. I could reproduce the problem and analysed why Convoy did not build any stations.
Seems like the problem is not in Convoy, but in the ECS town vector newgrf. For some reason this newgrf sets the cargo acceptance of passengers in towns to very low values: 0 to max 8.
Then Convoy comes to the (correct) conclusion that it is not economically feasible to build a bus line.
When you disable the ECS town vector newgrf, it works as it should.
In AdmiralAI I've solved this by checking all cargos for cargoclass = CC_PASSENGERS and then choosing the one with the highest cargo acceptance in the center of the biggest town. I hope this helps you solve the problem:
Code: Select all
local cargo_list = AICargoList();
cargo_list.Valuate(AICargo.HasCargoClass, AICargo.CC_PASSENGERS);
if (cargo_list.Count() == 0) {
/* There is no passenger cargo, so AircraftManager is useless. */
this._cargo_id = null;
return;
}
if (cargo_list.Count() > 1) {
local town_list = AITownList();
town_list.Valuate(AITown.GetPopulation);
town_list.Sort(AIAbstractList.SORT_BY_VALUE, false);
local best_cargo = null;
local best_cargo_acceptance = 0;
foreach (cargo, dummy in cargo_list) {
local acceptance = AITile.GetCargoAcceptance(AITown.GetLocation(town_list.Begin()), cargo, 1, 1, 5);
if (acceptance > best_cargo_acceptance) {
best_cargo_acceptance = acceptance;
best_cargo = cargo;
}
}
this._cargo_id = best_cargo;
} else {
this._cargo_id = cargo_list.Begin();
}
Re: Convoy: the bus loving AI (V8)
Thanks, your solution works like a charm (copied it shamelessly). Never realized that cc_classes could be added.
It's a nice test scenario: there are no road vehicles that can transport passengers, only trams. Currently Convoy only supports roadtype vehicles, but never checks whether engines for passengers are actually available.
So adding support for trams to Convoy would be necessary to make this set work. It has some impact though:
-check if vehicles for a certain roadtype support passenger transport ( road / tram)
-take that into account when building depots
-build the correct kind of road / tramtrack when building the road
are some of the things I can see that have to modified.
So for now I'll implement a check whether road vehicles support passenger transport, but implementing tram support is a nice challenge that I will put on my todo list
It's a nice test scenario: there are no road vehicles that can transport passengers, only trams. Currently Convoy only supports roadtype vehicles, but never checks whether engines for passengers are actually available.
So adding support for trams to Convoy would be necessary to make this set work. It has some impact though:
-check if vehicles for a certain roadtype support passenger transport ( road / tram)
-take that into account when building depots
-build the correct kind of road / tramtrack when building the road
are some of the things I can see that have to modified.
So for now I'll implement a check whether road vehicles support passenger transport, but implementing tram support is a nice challenge that I will put on my todo list
Re: Convoy: the bus loving AI (V9)
Convoy V9
===========
-Solved countless number of bugs, which boosts it's performance quite a bit, I've seen it make 6.5M in 10 years, and also importantant, reduces the number of obvious mistakes when watching it.
-Implemented some of the issues of the previous posts ( except trams)
===========
-Solved countless number of bugs, which boosts it's performance quite a bit, I've seen it make 6.5M in 10 years, and also importantant, reduces the number of obvious mistakes when watching it.
-Implemented some of the issues of the previous posts ( except trams)
- Attachments
-
- Convoy.tar
- (50 KiB) Downloaded 252 times
Re: Convoy: the bus loving AI (V9)
Hi,
What i have to show isn't really a bug, but it need to be fixed !
*Take a look at the pic*
The pink player is convoy, the red is admiralai.
Admiral has built a road with the brigde (this is a nice road ). One month later, convoy also decided to link both towns and it has built another road. The problem is that road is really useless because it try to cross the bridge...so convoy has lost money and built a weird road. That nice to have a "curvy" path system but i think it should try if there is any road before to build !
Anyway, this is even a great AI, well done !! Keep up
What i have to show isn't really a bug, but it need to be fixed !
*Take a look at the pic*
The pink player is convoy, the red is admiralai.
Admiral has built a road with the brigde (this is a nice road ). One month later, convoy also decided to link both towns and it has built another road. The problem is that road is really useless because it try to cross the bridge...so convoy has lost money and built a weird road. That nice to have a "curvy" path system but i think it should try if there is any road before to build !
Anyway, this is even a great AI, well done !! Keep up
- Attachments
-
- Convoy-WeirdRoad.png
- (198.5 KiB) Downloaded 268 times
Re: Convoy: the bus loving AI (V9)
dbkblk,
Some time ago I replaced my own pathfinding with the library pathfinder, so I think it's not really a Convoy issue, but every AI using the library pathfinder could encounter it.
Maybe you should post it in the pathfinder.road thread.
Some time ago I replaced my own pathfinding with the library pathfinder, so I think it's not really a Convoy issue, but every AI using the library pathfinder could encounter it.
Maybe you should post it in the pathfinder.road thread.
Re: Convoy: the bus loving AI (V9)
This was a problem in trunk some time ago, but it was fixed a few weeks ago. The only reason I can think of this happening is thas convoy started pathfinding the route before AdmiralAI built it. You seem to say something in your post: AdmiralAI build the route, and one month later Convoy build another one. It's very well possible that the pathfinding from convoy took more than a month. However, in that case Convoy should have handled the failed building and started pathfinding again (It gives an ERR_UNKNOWN in this case, not sure how Convoy handles that).
Re: Convoy: the bus loving AI (V9)
Just checked, and it handles all errors, by retrying the build (eg for vehicle in the way) or replanning. Except.... the ERR_UNKNOWN, that error is only logged, without further action. So for Convoy 10, I'll change that to retry the planning.
Thanks for the info
Thanks for the info
Re: Convoy: the bus loving AI (V9)
Convoy V10
============
-Handling of the ERR_UNKNOWN, so the pathfinding issue should be gone
-Initialisation of map related data moved from constructor to after Start
-Lots of cleaning up, things were getting messy (not ready)
-Improved line handling
Known bug: sometimes, when authority refuse to let Convoy build, it tries over and over again to make the same connection, hope to solve that soon.
============
-Handling of the ERR_UNKNOWN, so the pathfinding issue should be gone
-Initialisation of map related data moved from constructor to after Start
-Lots of cleaning up, things were getting messy (not ready)
-Improved line handling
Known bug: sometimes, when authority refuse to let Convoy build, it tries over and over again to make the same connection, hope to solve that soon.
- Attachments
-
- Convoy.tar
- (40 KiB) Downloaded 521 times
Re: Convoy: the bus loving AI (V9)
Its not really a solution, but my quick for this is to simply abort if the rating is too low, and hope that it will increase over time.GeekToo wrote:...Known bug: sometimes, when authority refuse to let Convoy build, it tries over and over again to make the same connection, hope to solve that soon.
Code: Select all
// Check that we're able to build here first
local rating = AITown.GetRating(town, AICompany.MY_COMPANY);
local allowed = (rating == AITown.TOWN_RATING_NONE || rating > AITown.TOWN_RATING_VERY_POOR);
if(!allowed) {
AILog.Error(AITown.GetName(town) + " local authority refuses construction");
return -1;
}
An interesting side-effect of this is that if I see this error repeated many times in the log, it usually means that the the bus stops in that town are going un-serviced, usually due to a bug in the pathfinder.
PathZilla - A networking AI - Now with tram support.
Re: Convoy: the bus loving AI (V10)
Today Rubidium and I went to this TJIP challenge. It was very fun. People all excited over OpenTTD, always a good thing The winner was a very clear winner (4 times the value of the next one, guys, NICE JOB!), although many 'cheated' (within the guidelines). But what I have to say: Convoy, you rule. Convoy was used as 'base-line', as everyone had access to it while developing, and was added in many rounds. Convoy didn't win, that was for sure, but it came in 2nd! Well, of course not for real, as it didn't really compete, but I still wanted to say: Convoy: VERY NICE JOB!
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: Convoy: the bus loving AI (V10)
Well, is there (or will there be) any site telling us more about how the challenge went? Who got first? And so on...
Re: Convoy: the bus loving AI (V10)
That is up to TJIP to arrange that. I hope they do, no idea if they will. The winners did promise me to put their AI online, so you can all see what it does .. it has some brilliant things, I can tell youRoujin wrote:Well, is there (or will there be) any site telling us more about how the challenge went? Who got first? And so on...
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: Convoy: the bus loving AI (V10)
I hope they do, there was little chance to see their tactics. (For speed reasons the window was very small.) And I think the number 2 had an interesting way to build stations.
Re: Convoy: the bus loving AI (V10)
Hi,
i`m playing around a little bit with the different AIs.
I found a bug addressed in route buidling:
So Convoy builts a route around the sea and loses a lot of money and the game.
i`m playing around a little bit with the different AIs.
I found a bug addressed in route buidling:
Code: Select all
xxxxxx xxxsxx
xxcwxx xxcwsx
wwwwwx wwwwws
wcwwwx wcwwws
wxxxxx wxsssw
x land
c city
w water
s street
- Attachments
-
- Convoy road around the see, 1. Mai 1952.sav
- Convoy building road around the see and loses
- (73.34 KiB) Downloaded 262 times
Re: Convoy: the bus loving AI (V10)
Convoy has problems with water, it seems to choose two cities to connect but doesn't take into account that it may be hard to reach the other city. In the screenshot can be seen that Convoy tries two cities on the right and two on the left but (at least for the time being ) fails to connect them.
- Attachments
-
- Geen naam, 20 Mrt 1945.png
- (54.43 KiB) Downloaded 190 times
Re: Convoy: the bus loving AI (V10)
I haven't had much time lately to develop Convoy further , but the merging of NoAI to trunk seemed like a good time to update to the latest API version. So no new features, it just works again.
To the NoAI devs: congratulations with the big milestone!
To the NoAI devs: congratulations with the big milestone!
- Attachments
-
- Convoy.tar
- (40 KiB) Downloaded 264 times
Re: Convoy: the bus loving AI (V10)
And updated to today's API
- Attachments
-
- Convoy.tar
- Convoy v10, api 15/01/2009 r15098
- (40 KiB) Downloaded 264 times
Who is online
Users browsing this forum: No registered users and 3 guests