From: Hedayat V. <hed...@ai...> - 2009-10-18 00:41:58
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html style="direction: ltr;"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body style="direction: ltr;" bgcolor="#ffffff" text="#000000"> Hi all,<br> In the current form, the simulator works likes this:<br> - sending senses to agents<br> - receiving commands from agents<br> - simulating one cycle (which takes the most processing time)<br> <br> This causes an nondeterministic behavior: if the agent sends commands right after receiving senses, and there is no latency in this period, the simulator will run the commands in the same cycle. But, if for some reason the commands reach the server with some latency, these commands will be received and executed in the next cycle. This could be one of the main reasons that some agents behave differently when they connect to a remote server instead of a local one. When using a local simulator, most of the commands will reach the server in the same cycle as received senses, but when running over a network they'll be executed in the next cycle (because of network latency). <br> I think this behavior is not desirable, and trying to maintain fairness between agents in a multi-threaded architecture would be hard. My suggestion is to swap the order of sending senses and receiving commands, so that the received commands will be always run in the next cycle:<br> <br> - receiving commands from agents<br> - sending senses to agents<br> - simulating one cycle (which takes the most processing time)<br> <br> Is there any reason to maintain the current behavior instead of my suggestion?<br> <br> Have fun,<br> Hedayat<br> </body> </html> |