LARG / HFO

Half Field Offense in Robocup 2D Soccer
MIT License
230 stars 93 forks source link

Launch refactor #12

Closed mhauskn closed 8 years ago

mhauskn commented 8 years ago

@UNiQ10 refactored your pull request:

1) No more sleeps between adding agents - instead the Trainer waits until they respond to (look). 2) Agent now broadcasts when it gets and incoming connection and uses non-blocking poll() to listen for incoming connections. 3) Trainer waits to start game until all agents have gotten connections. This fixes the issues with the --no-sync flag. 4) Still Terminates un-necessary agents

Please take a look and let me know if I've missed anything.

uniq10 commented 8 years ago

On running with command: ./HFO --offense-npcs 1 --defense-npcs 0

The trainer reports that the some episodes end with defense capture.

I had faced this problem earlier. When we terminate an npc it internally send the message "(bye)" to the server and then server clears the npc from the world. If the server doesn't see this message (usually because lots of agents and npcs are trying to communicate with at the same time) the npc remains as a ghost.

mhauskn commented 8 years ago

Good point! The defense captured goes away if --no-sync is added, so I think it's an issue not with players ghosts, but with the Trainer not getting too little information (since the game runs so quickly) or bad information from the server.

On Wed, Oct 14, 2015 at 3:56 PM, UNiQ10 notifications@github.com wrote:

On running with command: ./HFO --offense-npcs 1 --defense-npcs 0

The trainer reports that the some episodes end with defense capture.

I had faced this problem earlier. When we terminate an npc it internally send the message "(bye)" to the server and then server clears the npc from the world. If the server doesn't see this message (usually because lots of agents and npcs are trying to communicate with at the same time) the npc remains as a ghost.

— Reply to this email directly or view it on GitHub https://github.com/mhauskn/HFO/pull/12#issuecomment-148197857.

mhauskn commented 8 years ago

Actually, not it is happening even with no-sync enabled. How did you fix this problem?

mhauskn commented 8 years ago

Using a new coach message to disconnect players in addition to kill/terminating their processes. This sidesteps the problem of some players not saying 'bye' when killed.