Skip to main content
Topic: AI's Stop Fail to Connect Properly to Industry (Read 3527 times) previous topic - next topic

AI's Stop Fail to Connect Properly to Industry

Please see attached image. Goods AI intended to collect waste from garbage dump, but the stop wasn't built close enough to cover the garbage dump. In the end, no waste was delivered, and later Goods AI remove all roads, stops and vehicles.

This is detected in R2422 (Win/SDL) with Pak128 v.554.

Thanks for your attention.

Re: AI's Stop Fail to Connect Properly to Industry

Reply #1
DId you rotate the map? THis may confuse AI, since it check rotation status directly from factory.

Re: AI's Stop Fail to Connect Properly to Industry

Reply #2
@prissi: I did not do any test, but I think in lines 883 and 889 of ai_goods.cc the third parameter of suche_platz1_platz2 should be length-1 and 0 (instead of length and 0). See the routine
bool ai_t::suche_platz(koord pos, koord &size, koord *dirs) const in ai.cc line 168.
Parsley, sage, rosemary, and maggikraut.

Re: AI's Stop Fail to Connect Properly to Industry

Reply #3
I only know old ai code.
Every time "if(  current_dist<dist  &&  suche_platz(platz,size,dir)  )" is called, size is overwritten. So, two rotations test never success.

In old ai code, there was a bug and two rotations test didn't happen.

Re: AI's Stop Fail to Connect Properly to Industry

Reply #4
DId you rotate the map? THis may confuse AI, since it check rotation status directly from factory.

I didn't do any rotation. Simply started a new game and activated one Goods AI, and then this happened. The reason why this problem went unnoticed is probably because the Goods AI will remove everything once it finds the line unprofitable.

Re: AI's Stop Fail to Connect Properly to Industry

Reply #5
THe code was lacking the rotation check at all.