From: Sander v. D. <sgv...@gm...> - 2012-01-17 12:51:53
|
Hey all, I am digging through the simulation cycle life time again. If my understanding is correct now (please correct me if I'm wrong, like the last time I thought I had it figured out ;)), this is the order things are happening now: * StartCycle - Read agent messages - Realize actions * SenseAgent - Send (last cycle's) sense data to agents * Step - Update physics and game conrol * SyncTime - Wait until 0.02 seconds have passed since last SyncTime * EndCycle - Query and prepare sensor data sent in the next cycle In this scenario, however, first all sensor data for next cycle is prepared and all agent messages read and parsed, before the sense data is sent to which the agent should have 0.02 seconds to reply. The time these things take depend on how much sense data there is to query, prepare and send, so the time left between SenseAgent and StartCycle is not fixed. I don't know how much time it really is, but the fact it is not constant is a problem. I think it would be a better idea to place SyncTime after EndCycle/before StartCycle, such that the actual think time becomes independent from how long it takes to query and prepare sensor data. It then still does depend on StartCycle though, however I don't believe there is much fluctuation in how long this takes during a match, and this part has to be after the wait and before SenseAgent in order to keep the same ordering of events from the view of an agent. If we want to make the think time more consistent not only in a single match but also between matches, we will have to make the wait last until 0.02 seconds after SenseAgent, though I am not sure whether that is needed or not, though let me know what you think Sander -- Adaptive Systems Research Group Department of Computer Science University of Hertfordshire United Kingdom |