Marvin, the Paranoid Android, is a fictional character in The Hitchhiker's Guide to the Galaxy series by Douglas Adams. Marvin is the ship's robot aboard the starship Heart of Gold.
This is a python project, that uses OpenAI Gym with an environment called Marvin. The goal is to train Marvin to walk, having the training and walking process. The total reward for each episode after training is bigger than 100. During the development, we learned how to use neural networks to help Marvin get back on his feet, without using any libraries that do the goal of the project for us, like Evostra or Tensorflow.
Basic form:
python marvin.py
The program display log for each episode.
Advanced options:
Flags | Description |
---|---|
–-walk (-w) |
Display only walking process. |
–-video (-v) |
Saves videos of the walking process. |
–-name (-n) |
Display the name of the game (environment). |
--generation (-g) |
Change the maximum number of generations. |
--population (-p) |
Count of the population between each generation. |
--rate (-r) |
Mutation rate (recommended values in the range of decimals). |
--movement (-m) |
umber of steps (movement) between each episode. |
–-load (-l) |
Load weights for Marvin agent from a file. Skip training process if this option is specified. |
–-save (-s) |
Save weights to a file after running the program. |
–-quiet (-q) |
Hide the program's log between each episode. |
–-help (-h) |
Display available commands and exit. |
–-log |
Save a log of each generation to a file. Expects a path. |
–-version |
Show program's version number and exit. |
If the program launches without arguments, display training process and walking process.
Use sh setup.sh
to setup and build all the dependencies.
All the dependencies will be installed to the user by running the script...
- Make use of the average fitness of a generation, so it doesn't deviate from the parent.
- Check if by changing code from the source file can interfere with loading the file (of a different version of the program). If it does, create some kind of flag to validate the version.
The following sources helped us during the development of this project:
- OpenAI Gym documentation
- NEAT Super Mario World (to understand what we had to do)
- OpenAI-NEAT Project example
- OpenAI Gym bipedal walker
- Neuroevolution - Wikipedia Article
- Artificial Neural Network - Wikipedia Article
- Evolving Neural Networks through Augmenting Topologies (Kenneth O. Stanley and Risto Miikkulainen)
- Evolution Simulator - carykh
This project is under the MIT License.