Giter Site home page Giter Site logo

Comments (7)

Kautenja avatar Kautenja commented on May 28, 2024

currently, the emulator runs as fast as FCEUX allows (3200%). I've experimented with the source code of FCEUX to see if increasing this maximal speedup to 6400, 12800, etc. allows the interface to run faster, but with no luck yet. I've also adjusted some frame limiting logic in the FCEUX source to see if that's where the bottle neck is with no result. However, this is a pressing issue and suggestions / PRs with proposed fixes are certainly welcome.

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

the local_FCEUX branch contains the experimental FCEUX source

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

a quick experiment reveals that disabling the FCEUX window altogether produces a speedup of 1.73 when running the uniform random agent (i.e. time to complete 500 steps went from 26s of latency to 15s) on my laptop (Dual Core Core i7, no discrete graphics). I'll test this on my desktop rig when I get a chance to see how the numbers compare.

This is a simple temporary fix to get some extra speed during training, assuming you don't need to monitor the agent in realtime. Just inject the following block in the training script before a call to make and the FCEUX window will not appear during execution.

import os
os.environ['SDL_VIDEODRIVER'] = 'dummy'

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

Unfortunately, on my desktop machine, the speedup from this method is 0 (11s to 11s). A better solution is certainly necessary.

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

I've started working on the FCEUX source code to remove any frame limiting mechanisms in play here. It's a large and complex codebase, so it might be a while before this functionality is introduced.

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

Version 3.0 is in active development using a new emulator back-end, nes-py. It should be released in ~30 days or so. This emulator can push out 450FPS in headless mode providing a nontrivial speedup. With an overclocked NES CPU, and a frame-skip mechanism this value will likely increase close to 1000FPS comparable to the OpenAI implementation of atari-py. Will report back after nes-py 1.0 and gym-super-mario-bros 3.0 release

from gym-super-mario-bros.

Kautenja avatar Kautenja commented on May 28, 2024

version 3.0 is live with a great speedup. Closing issue as any additional speedup seems unlikely given the new design is mostly C++ and as close to the hardware as possible.

from gym-super-mario-bros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.