Giter Club home page Giter Club logo

neat-mario's Introduction

NEAT-Mario: for training NEAT agents on Mario Brothers problems.

This repo contains a Mario Brothers game benchmark and code for game-playing agents which utilise the NEAT algorithm (implemented in a dependent repository linked below). This repo contains the source code used for the AI'17 paper on phased searching for transfer learning authored by Will Hardwick-Smith, Gang Chen, Yiming Peng and Yi Mei. If the paper is published I will link it here.

NEAT is a genetic algorithm which evolves a population of artificial neural networks toward a goal; in this case the goal is to play Mario Brothers well. The fitness function that determines an individual's fitness is defined in the Fitness

The Mario Brothers benchmark included in this repo is called Infinite Mario Brothers and was originally used for the Mario AI Championship which ran from 2009-2012 (original site). In this repo I used kefik's fork

Dependencies

  1. Will's fork of the encog-java-core library, on the phased-search branch.

How to use:

There are several entry points in the repo to begin training with a NEAT agent. The entry point used for the our AI'17 paper is will.mario.experiment.TransferExperiments.java. This class also contains each of the experiments that were performed for the paper. The arguments for this entry point are as follows: [level [, outputPath [, taskAGens [, taskBGens [, phaseLength [, baseEvolver [, transferEvolver [, complexificationFirst [, runType [, seed]]]]]]]]]] where:

  1. level: the preset experiment to run. Can be one of: kills, speed-enemies, fly, dist-kills, speed-coins.
  2. outputPath: the directory to output results to.
  3. taskAGens: # of generations to run on task A (the source task).
  4. taskBGens: # of generations to run on task B (the target task).
  5. phaseLength: the phase length if static phased search is used as the search strategy.
  6. baseEvolver: which evolution strategy to use to train on the source task (as an integer) where:
    1. 0: regular NEAT.
    2. 1: blended search NEAT (both additive and subtractive mutations).
    3. 2: static phased search NEAT (a simple phased search strategy).
    4. 3: Green's phased search NEAT (Green's adaptive phased search strategy).
    5. 4: static phased search NEAT with power law mutations (presented in our paper).
  7. transferEvolver: which evolution strategy to use to train on the target task (uses same integer values as above)>
  8. complexificationFirst: boolean value for whether phased search strategies should start in the complexification phase rather than the simplification phase (true recommended) (only applies when phased search is used).
  9. runType: which tasks should be trained. Can either be BOTH to run the source task then the target task (normal transfer learning experiment), A for only the source task, or B for only the target task.
  10. seed: integer used to determine the sequence of random numbers used in the experiment.

After the experiment finishes running, the results from each generation will be written to outputPath ("saved/results.csv" by default). These results will also be written to the console as the experiment runs.

neat-mario's People

Contributors

willhs 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.