GithubHelp home page GithubHelp logo

sondro / gb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krocki/gb

0.0 2.0 0.0 4.2 MB

A minimal C and Verilog implementation of Nintendo Gameboy - An fast research environment for Reinforcement Learning

License: Apache License 2.0

Makefile 28.86% C 17.64% Python 2.85% VHDL 24.47% Verilog 25.33% Tcl 0.85%

gb's Introduction

Nintendo Learning Environment http://olab.is.s.u-tokyo.ac.jp/~kamil.rocki/nintendo/

  • New environment for accelerating research in AI, targeting transfer and meta learning
  • Performance oriented ( high FPS for learning, efficient parallel execution )
  • GB emulator (CPU, GPU (coming soon) and FPGA versions), Support for over 1000 games in total
  • NES emulator (coming soon)

bibtex:

@misc{kamil_rocki_2019_2536648,
  author       = {Kamil M Rocki},
  title        = {Nintendo Learning Environment},
  month        = jan,
  year         = 2019,
  publisher    = {GitHub},
  journal      = {GitHub repository},
  doi          = {10.5281/zenodo.2536648},
  howpublished = {\url{https://github.com/krocki/gb}},
  url          = {https://github.com/krocki/gb}
}

DOI

Quick start

  1. Build C lib make gameboy.so
  2. Run the front end from python: python gameboy.py --rom {PATH_TO_ROM}

C dependencies

None

Python dependencies

Numpy, CFFI

Usage

Use the provided python wrapper. Example:

  • Run the environment for 0.5M steps
  • Produce a 50 frame-long gif every 30s
python gameboy.py --rom ./gb_roms/Micro_Machines_\(USA\,_Europe\).gb --framelimit=500000 --write_gif_every 30 --write_gif_duration 50

Output:

time: 00h 00m 30s, frames 0.06M
time: 00h 01m 00s, frames 0.12M
time: 00h 01m 30s, frames 0.18M
time: 00h 02m 00s, frames 0.24M
time: 00h 02m 30s, frames 0.30M
time: 00h 03m 00s, frames 0.36M
time: 00h 03m 30s, frames 0.42M
time: 00h 04m 00s, frames 0.48M

GIFS generated every 30s:

alt_text alt_text alt_text alt_text alt_text

Generate lots of frames and save them to gif and npy files:

python make_gifs.py --rom {PATH_TO_ROM}

For example, running the command python make_gifs.py --rom ./wario_walking.gb will result in a file like this: alt_text

Alternatively, build a standalone gameboy with GLFW support and play games manually

To build:

make

To play:

./gameboy {PATH_TO_ROM}
enter - START
space - SELECT
Z     - A
X     - B
+ arrows (left, right, down, up)
SHIFT - turbo mode

gb's People

Contributors

krocki avatar

Watchers

 avatar  avatar

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.