This seems to happen most often with jump units, if the bot has a large number of units on the map, the map is an urban map or if the map size is large. On large maps (e.g. 50x50) it can take the bot more than an hour to finish deploying 2-3 lances.
Sometimes even though it is a small map and there is only 1-2 lances in play, the bot still takes absolutely forever to move units...in one case it was an Uziel-S. The bot spent more than 10 minutes trying to move that one unit alone and the log file contained similar pathranker warnings.
Right now it has taken the bot more than half an hour to finish moving its units for round 1, for 2 bots of approx 12 units each (some of which are gun turrets).
The log file contains no errors but tons of warnings related to BasicPathRanker.
CPU usage also has been going through the roof for this savegame.
The warnings you're seeing are normal. They're just logging out the process Princess goes through in determining if a path is worth attempting or not. However, these should be turned down to INFO or DEBUG rather than WARNING.
Hmm then i'm not sure if the log file shows why the bot is taking forever to move the units. What about all the entries like "however the position cache does not have it in that position!"?
The warnings don't really have anything to do with the amount of time Princess takes to move a unit. I haven't had a chance to load the save game to test it for myself. (BTW, which player should I connect to the game as?)
The position error is related to bug [#4261] and has to do with the issue of Game not being thread-safe. It's not specifically a Princess or bot issue, it's just more likely to come up with a bot as they try to calculate moves for multiple units at the same time.
Related
Bugs:
#4261I think he said
in another post, but don't blame me if I'm wrong. :P
Just making sure in case it's different between the two different saves. I don't know if they're from the same game or not.
Hmm, ok.
Player name is My Campaign (host is dark blue by default).
If theres any other information you need, feel free to ask.
Commit [r11470] should have an effect on this. Basically, computing ECM info is expensive as it requires iterating through all Entities in the game. Princess was performing this computation frequently and I made it so it's cached. This sped up deployment and movement for me. I don't know that this is the only problem, it will definitely help.
Related
Commit: [r11470]
The Game.checkPositionCacheConsistency check will also have a more significant impact on Princess, I think. Anytime the entities list is retrieved, this will get called, and I think that Princesses movement computations get the entities list often while computing movement. This check will be removed before the next stable release.
In [r11584] I removed the calls to Game.checkPositionCacheConsistency, which also speed up Princess' movement by a noticeable amount. Between caching the ECM Info and removing the consistency check, this should have a pretty solid impact on Princess' movement speeds. I'm going to mark this closed for now.
Related
Commit: [r11584]