(This project was done back in 2018)
In this project, multi-snakes game environment and some famous Deep RL algorithms were implemented, and the agent was trained in this environment using self-play method. This project was proposed by OpenAI as one of the topics from 'Requests for Research 2.0'. The proposed research topic was as follows:
- Set up a reasonably large field with multiple snakes.
- Solve the environment using self-play with some RL algorithms, and observe what happens.
e.g. train current policy against a distribution of past policies. - Inspect the learned behavior.
Adding to this, inspired by 'slither.io', I added a new action that can cut other snake's body, so that when snakes are too big compared to the size of the environment, they can cut each other's body to stay much longer and get higher rewards.
Multi-snakes OpenAI Gym environment was implemented based on this code. This link was only used as a reference since the code in the link was not fully implemented. Deep RL algorithms implementations were written in tensorflow.
Link to the presentation slides.
This project is a result of DeepLearning Camp Jeju 2018.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You need tensorflow, gym and numpy to run this project. If you have your virtual env, please activate the env.
pip3 install -r requirements.txt
You need to install multi-snakes gym environment.
cd gym-snake
pip3 install -e .
You can run the test on several environments. Test codes are in 'test' folder.
source activate tf # don't forget to activate virtual env
cd test
python3 multiple_test.py
- Tensorflow - ML Library used
- OpenAI Gym - Environment SetUp
This project is licensed under the MIT License - see the LICENSE.md file for details
- Sounam An - My mentor at DeepLearning Camp Jeju 2018
- Sourabh Bajaj - Mentor at DeepLearning Camp Jeju 2018
- Eric Jang - Mentor at DeepLearning Camp Jeju 2018