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

Basic question: play a demo #55

Open
fujiki-1emon opened this issue Nov 1, 2017 · 4 comments
Open

Basic question: play a demo #55

fujiki-1emon opened this issue Nov 1, 2017 · 4 comments

Comments

@fujiki-1emon
Copy link

fujiki-1emon commented Nov 1, 2017

Greetings,

I wanted to see some demo running and how the system runs and tried to run python test.py without any inference from a model (fixing joystick = [0, 0, 1, 0, 0]).
At first, it seemed well, but finally I got the problem below without seeing the agent moving around.
It must be a trivial issue, but I'd like you to help me solve the problem.

peek 2017-11-01 23-29

Thanks.

@bzier
Copy link
Collaborator

bzier commented Nov 1, 2017

Thank you for sharing that screen capture. That's incredibly helpful. I've seen symptoms of this before, but never actually seen what's going on to understand it.

The first thing to be aware of is how the gym environment is detecting the end of an episode (end of a race). At the end of a race, the game 'zooms out' to show replays and timings, etc. I am currently using this to detect when the race is over. See here at the bullet point for _evaluate_end_state(). That info is actually slightly out of date. It mentions all black pixels, but the code currently looks for all corners of the same color. See here for why.

Now at this point you may guess what the problem is. In your screen capture, you can see that the emulator is rendering briefly in full size and then flickering to a really tiny image, then back to full size, etc. The problem comes in when we encounter 30 consecutive frames of that 'zoomed out' tiny view and consider it the end of the race.

Unfortunately I'm not sure that this is a trivial issue as it is likely an issue in the underlying N64 emulator or video driver. Even if that behavior didn't trigger my environment's end episode detection, you likely would not get good behavior from any AI executing with that as the input... even a human would probably struggle significantly :)

I'll have to take a closer look at this later tonight to see if I can track down anything. Just be aware that it may not be a quick fix.

@bzier
Copy link
Collaborator

bzier commented Nov 2, 2017

Hey @Fujiki-Nakamura,
Out of curiosity, what are your system specs? What version of Ubuntu are you running? What kind of graphics card? Etc. I don't know if that information will be helpful or not, but it could play into things.

Also, did you change any of the configuration settings for the gym environment, or just leave everything as default?

Thanks.

@fujiki-1emon
Copy link
Author

fujiki-1emon commented Nov 2, 2017

@bzier
Thank you for your comments! and sorry for the late response..

I should have informed you about that.
I'm using Ubuntu 16.04 LTS.
I'll check about the specs and the graphics card. Please wait for a while.

[edit]
Specs:

  • Memory 31.4GiB
  • Processor Intel Core i5-6400 CPU @ 2.20GHz × 4
  • Graphics GeForce GTX 1070/PCIe/SSE2

I just checked System Settings > Details > Overview. If it's not enough for you, please let me know.

I think I didn't change anything regarding to the settings such as gym-mupen64plus/gym_mupen64plus/envs/config.yml.

@bzier
Copy link
Collaborator

bzier commented Nov 2, 2017

No problem on the timing. I only can check in on this and respond a couple times throughout the day anyway.

Thanks for the additional info. I'll keep thinking about it and see what I can figure out. It would be good to pin this down and ensure it behaves consistently. I'll respond back if I have any more info or questions.

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

No branches or pull requests

2 participants