Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exp2 #9

Closed
wants to merge 3 commits into from
Closed

Exp2 #9

wants to merge 3 commits into from

Conversation

uniq10
Copy link
Contributor

@uniq10 uniq10 commented Sep 30, 2015

Hi Matthew,

Prof. Shivaram had asked us to permanently remove the non HFO players. We are directly using the sample_player binary rather than the start.sh script so that we get each individual player pid's which is later used to kill the unnecessary players.

Please check if this is fine.

@mhauskn
Copy link
Member

mhauskn commented Sep 30, 2015

Thanks for the PR. The simulator runs much faster without the other agents connected!

One problem I've noticed is that games start before the player-controlled-agent has connected.

More comments to follow.

@mhauskn
Copy link
Member

mhauskn commented Oct 1, 2015

When testing on OSX, the game doesn't start because the trainer never gets past the checkIfAllPlayersConnected call. The players never report in. The problem stems from too small a wait time between starting / terminating players. See in-line comments below.

# Launch offense players
for player_num in xrange(1, 12):
player = self.launch_player(player_num, play_offense = True)
time.sleep(0.1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to 0.2 for stability on OSX.

@uniq10
Copy link
Contributor Author

uniq10 commented Oct 1, 2015

Alright.

I wasn't able to replicate the game staring before agent connection problem on Ubuntu 15.04.

Will change the sleep value and report.

@mhauskn
Copy link
Member

mhauskn commented Oct 1, 2015

Yeah, things work correctly for me on Ubuntu. OSX is just weird... But the weirdness existed prior to this PR. So after you change the sleep values, this looks good.

@mhauskn
Copy link
Member

mhauskn commented Oct 1, 2015

Actually on Ubuntu, the following command does not work correctly:

(./bin/HFO --offense-agents=1 --offense-npcs=0 --no-sync &) && ./example/hfo_example_agent

Instead of having an offense agent, we get an offense npc. The offense agent then dies:

matthew@drogba:~/projects/HFO$ (./bin/HFO --offense-agents=1 --offense-npcs=0 --no-sync &) && ./example/hfo_example_agent
[Agent Client] Connecting to Agent Server on port 6000
[Trainer] Launching Agent 0
[Trainer] Something necessary closed (offense_agent_0), exiting
[Trainer] TotalFrames = 0, AvgFramesPerTrial = nan, AvgFramesPerGoal = nan
[Trainer] Trials             : 0
[Trainer] Goals              : 0
[Trainer] Defense Captured   : 0
[Trainer] Balls Out of Bounds: 0
[Trainer] Out of Time        : 0
[start.py] Cleaning up server and other processes
[Agent Client] ERROR Unable to communicate with server: Connection refused

On further inspection this seems to be caused by the no-sync flag.

@uniq10
Copy link
Contributor Author

uniq10 commented Oct 1, 2015

This problem is gone when I added sleep time after the agent connect too.

I noticed another common problem in this pull request and also in the master branch.
When --no-sync is set the npcs do not wait for agent connect. They start playing before the agent connects.

@mhauskn
Copy link
Member

mhauskn commented Oct 1, 2015

Cool, can you push your changes so this PR gets updated?

@mhauskn
Copy link
Member

mhauskn commented Oct 8, 2015

Hey, just wanted to make sure this thread doesn't go stale. Can you push the changes so I can verify that examples work correctly?

@uniq10
Copy link
Contributor Author

uniq10 commented Oct 8, 2015

Sorry about that was a bit busy with Sarsa. Will push it immediately.

@mhauskn
Copy link
Member

mhauskn commented Oct 11, 2015

Testing on another Ubuntu box, the basic single agent offense example is still giving me the same error described above even without --no-sync flag.

An alternative way of going about this would be to not kill the un-needed team members until after everyone has joined. I'll poke around tomorrow and see if I can figure something out...

@mhauskn
Copy link
Member

mhauskn commented Oct 13, 2015

Hey, I did some refactoring to your PR. Tried to create a PR against your
PR, but things weren't looking right. So I just made a separate PR. Can you
take a look at it and make sure everything looks alright?
#12

On Thu, Oct 8, 2015 at 2:22 PM, UNiQ10 notifications@github.com wrote:

Sorry about that was a bit busy with Sarsa. Will push it immediately.


Reply to this email directly or view it on GitHub
#9 (comment).

@mhauskn
Copy link
Member

mhauskn commented Oct 21, 2015

Addressed by PR #12

@mhauskn mhauskn closed this Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants