[Pogamut-list] SafeRunToLocation failing when the sockets are under heavy burden?

michal.bida pogamut-forum at artemis.ms.mff.cuni.cz
Tue Nov 3 15:17:25 CET 2009


Re: SafeRunToLocation failing when the sockets are under heavy burden?

Author: michal.bida

DoLogic() method is certainly not a good place to perform a lot of computationaly intensive computations. Solution to this could be for example using another thread to compute computationaly intensive things and then propagate the results into agents decision making system. 

Philosophy of dologic method is it should be fast - it should end in the matter of hundres miliseconds. Our bots were meant to be reactive - they should respond fast to environmental events. That does not mean you cannot perform more delayed decision making, just that the doLogic method is not a good place to do it in.

Another thing is UT2004 sockets. You can effectively overload the socket to UT2004 for example by repeatedly requesting all NAV POINTS in the map by GETNAV command. GameBots (used for UT  Pogamut connection) use a text protocol that can be a bottleneck if too much information goes in or out. You should always try to make your communication with UT2004 effective.
Problems can occur when for example repeatadly requesting a lot of information from UT2004 (GETNAVS example). This can delay synchronous batches containing the information about bot surroundings and hence trigger undesired behavior of the bot that uses outdated information.

Some problem can also occur when setting visionTime (delay between two synchronous batches) to value below 100 ms on bigger maps (containing a 1000 of nav points and items). Currently we are able to handle medium sized locations. The number of connected bots also matters. The lower the delay between synchronous batches the lower the number of bots UT2004 will be able to handle.
On a normal computer you should be able to run 6 - 8 pogamut bots on medium sized location with 250 ms visionTime delay.

Hope this helps.

best,
michal





More information about the Pogamut-list mailing list