Giter VIP home page Giter VIP logo

mario-rl's Introduction

Mario Environment

Mario enviroment is built by java but it supports a ServerAgent that can connect with any other agent written in different languages. It privides a Python client interface to extract the game information.

Set up Server

A small bug in the original competition code Mario Competition

In ToolsConfigurator.java, at line 107 we need to change the evaluationOptions.getAgent().getName() to evaluationOptions.getAgentName() to avoid null pointer reference.

Then we use ant to build the project in the root directiory.

Run following commands to launch the server

cd classes
java ch.idsia.scenarios.MainRun -ag ServerAgent -server on

Set up Client

Example:

python src/python/competition/ipymario.py to launch the client and run the agent.

ServerAgent.java has the serialization protocol and can inspect the environment data.

Observation

dataadaptor.py implements the deserialization protocol and extract the raw info of the environment.

Action

The key map is as follows:

  • Left: 0
  • Right: 1
  • Down: 2
  • Jump: 3
  • Speed: 4

HumanAgent

Human can use wasd and j, k to control mario

Global options

The default FPS is 24 so the delay is 41. We can change the delay in MarioComponent.adjustFPS().

Types of observation

-10: fix ground -11: can jump to this ground 2: enemy type 21: ? 16: brick

mario-rl's People

Contributors

rictic avatar a1k0n avatar deanputney avatar haoranshu avatar karakovskiy avatar nwang57 avatar yuaaaan avatar quattro avatar

Watchers

 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.