Code Monkey home page Code Monkey logo

testwip's Introduction

How to Use Mia

Mia is a mod for Celeste that lets anyone build their own neural networks to play the game. It is based on imitative learning: you create a dataset by playing, and Mia learns from it. The Celeste mod loader “Everest” is required to use Mia. Make sure to the enable the Debug Mode in the mod options to get access to the debug console.

Step 1: Create Your Own Dataset

First of all, you need to create your dataset:

  • Enter any map, open the debug console (by pressing ‹ . › or ‹ ~ ›) and type record to begin recording your gameplay.
  • Play your map as you normally would.
  • Execute record in the console once again to stop recording and save your gameplay data. Your data is now saved in the Mia/Saves directory.

Note: You can repeat these steps as many times as desired to generate multiple data files.

Warning: Due to neural networks simplifications, certain key combinations are forbidden. You can find a list of every allowed key combination in the file allowedkeys.txt.

Step 2: Create and Train Neural Networks

Type in train in the debug console to open a cmd and get access to new functions to create and train neural networks:

  • Creating a Neural Network: Use create(int list) to create a neural network using the strucure given in argument. Ensure the first number in the list is 400 and the last is 54, which are required by Mia.

    • Example: create([400,2048,1024,54]) generates a neural network with one input layer (400 neurons), two hidden layers (2048 and 1024 neurons respectively), and one output layer (54 neurons.)
  • Training Your Neural Network: Use train(float, int, int) to start training, by specifying in order the learning rate,the number of iterations of your dataset, and the sample size of the training.

    • Note: If you do not know what a learning rate is, start by setting it at 0.001. If your neural network does not learn very well, you can attempt to change this value, but do it with caution.

Step 3: Test Your Neural Network

After creating and training your neural network, you can now look at it play:

  • Restart the level you wish to test (Pause → Restart Chapter).
  • Execute play in the console to start Mia.
  • Look at her go!!

Note: To stop Mia, press ‹ a ›. Due to some coding mystery (and even though the code we wrote should clearly not be doing this), Mia must be either dashing or dying in order to stop playing. If Mia gets stuck and neither is happening, you may need to close the game to stop her.

testwip's People

Contributors

sachagd avatar

Stargazers

 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.