Giter VIP home page Giter VIP logo

muniverse's Introduction

μniverse GoDoc

μniverse is my attempt to wrap a bunch of HTML5 games in a single API. This is similar to openai/universe, except that it avoids Flash and VNC. For more on this, see Advantages over Universe

This is a work in progress. See Roadmap for more details.

Getting Started

µniverse depends on a few software projects. It requires fairly new versions, so package managers like apt-get may not be suitable. Here are the packages and links to downloads:

Installing Go is particularly involved, as you will want to create a GOPATH. See here for details on that.

Once you have Go and Docker, you can download µniverse in one easy step:

go get github.com/unixpickle/muniverse

The first time you use µniverse, it will pull a somewhat large Docker container. I recommend you do this manually before you use µniverse:

docker pull unixpickle/muniverse:0.115.0

Once you have µniverse installed, you may want to install bindings for other languages such as Python. If you want to use µniverse from Go, muniverse-agent might serve as a good starting point. You may also want to checkout the GoDoc for API details.

Advantages over Universe

Compared to OpenAI Universe, μniverse will give the following advantages:

  • No need to play games in real-time.
    • No "falling behind" on slower computers
    • Play games faster than real-time on fast machines.
  • No need for a neural network to read scores from screenshots.
  • Fewer glitches due to menu automation.
  • No unsafe actions (e.g. pressing the Main Menu button).
  • No Docker containers without accompanying source code
    • All code to generate containers is included
    • Open source scripts to download & package games

Most of the above advantages come from focusing on HTML5 games rather than Flash games.

Contents

  • this directory - high-level Go API for controlling environments
  • chrome/ - Go API for controlling a headless Chrome instance
  • games/ - scripts for downloading & packaging games
  • container/ - build files for the Docker container
  • codegen/ - small program to auto-generate Go games registry
  • util/ - small tools which come in handy while using µniverse.
  • bindings/ - bindings for other programming languages.

Roadmap

Here's what is done so far:

  • Go API for interfacing with headless Chrome.
  • Mechanism for downloading & packaging games.
  • JavaScript interface for controlling time (timers, Date, etc.)
  • Docker container for running headless Chrome.
  • Go API for controlling Docker containers.
  • Simple interface for gym-like environment control.
  • Python bindings

Here's a (non-exhaustive) to-do list:

  • Get more games.
  • Gym integration.
  • Get WebGL to work without occasional failures.
  • Better way to verify connection to keep-alive socket.
  • Rewrite download script in Go:
    • Faster (jq is slow)
    • Support absolute paths? (how to specify destination...)
  • Cleaner Windows IP address lookups

License

This is under a BSD 2-clause license. See LICENSE.

muniverse's People

Contributors

ianhuntress avatar unixpickle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

muniverse's Issues

Adding a game

Hi - I'm trying to add a small HTML5 game to muniverse on my machine. As we discussed over email, I'll post info about the process and if everything works it can be present as documentation.

My initial branch is based on the game added in this commit: d548296

Based on your instructions, I will either (a) change the muniverse Docker container, or (b) make a new Docker container based on this one, which downloads the game into the container as an additional step

Then with muniverse-agent:

In order to tell µniverse to use a custom Docker image, you should use the NewEnvContainer API. I just added a flag to muniverse-agent to let you do this: -image.

I'll try this in the next couple of days

Issue with doodle jump and docker container 0.111.1+

Running doodle jump works with container version 0.111.0 but fails for higher version. I can see reward data from a3c, and I can produce recordings, but on higher versions, both are missing. If I supply a recording directory, then I get 8 subdirectories but with 0 images.

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.