Giter Club home page Giter Club logo

marioai's Introduction

Refactored MarioAI code from: http://code.google.com/p/marioai/

MarioAI version labeled as: 0.3.0

MarioAI4J -> main project containing MarioSimulator (runnable as is), which is featuring keyboard-controlled mario, use arrows + A(jump) + S(peed/hoot) ... oh and do not forget to try to press 'G' (multiple times) to visualize Mario's receptive field

MarioAI4J-Agents -> example agents, this project must reference MarioAI4J in order to compile ... start to develop your own agent right away to edit MyAgent class.

Things, which are different from original MarioAI v0.2.0 project:

1) only JAVA agents can be used now

2) GameViewer + ToolsConfigurator are not working (not refactored/broken)

3) New agent base types: especially interesting is MarioHijackAIBase, which is an agent you can interrupt anytime during its run, hijacking its controls and manually control Mario from keyboard (press 'H'ijack to start controlling agent manually) - this is great for debugging as you can let your AI to run "dry" and watch logs / debug draws as you position MARIO into a concrete situation

4) Agents now may implement IMarioDebugDraw interface, which is a callback that is regularly called to render custom debugging information inside the visualization component

5) All options are now grouped within MarioOptions class that contains different enums for different types of options (boolean, int, float, string) ... these options are then read and used by respective option categories (AIOptions, LevelOptions, SimulationOptions, SystemOptions, VisualizationOptions)

6) Options string can now be created fast using constants and functions from FastOpts

7) Running simulation is now encapsulated within MarioSimulator class that is instantiated using some "options" and then can be used to run(IAgent)

WARNING - 1 JVM can run 1 SIMULATION (visualized or headless) at max (I did not change the original architecture that is using statics a lot).

8) Agent environment interface has been refactored, many information is now encapsulated inside enums and classes rather than bytes, ints, named constants and C-like function calls ... especially querying tiles / entities has been simplified by implementing Tiles and Entities sensory modules.

9) Mario controls has been refactored as well, pressing/releasing of buttons that control Mario is now encapsulated within MarioInput class.

10) Example agents have been reimplemented using new agent base classes and environment interface; they are more readable now.

11) Receptive field visualization has been fixed (now it correctly aligns with respective simulation tiles) + it now includes "relative position" / "tiles" / "entity" visualization modes so you can quickly see how to "reference concrete tile" / "what tiles are written within RF" / "what entities are present within RF"

12) Generalization of tiles / entities has been improved, especially it is very easy to query current speed of entities and relative position wrt. Mario position in pixels

13) I've tried to javadoc crucial parts regarding Mario agent development, hope it saves some time to someone

I did not mavenized projects as I usually do... so far you have to setup them within your IDE manually, but as they need only 2 libraries and projects feature rather standard Java project layout, it is trivial task (projects are directly importable into Eclipse).

Cheers!

marioai's People

Contributors

kefik avatar

Watchers

Jakub Náplava 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.