Using reinforcement learning to teach a nueral network how to play snake!
Project Steps:
- Create a snake game
- Create an agent to control the game
- Create a model to learn how to play the game
- Add in a human controlled game that can feed information to the model to train based on human interactions
File overview:
- game.py = The game of snake
- agent.py = Agent that can generate a move and feed it into the game to play snake
- model.py = A neural network with 16 input nodes and 3 output nodes
- game_human.py = A human controlled version of the snake game which can feed informaion into the model for training
To run the code locally you will need:
- Python 3.7+
- Python Packages:
- Pygame
- NumPy
- PyTorch
To run the code, run the agent.py file to automatically train the model or run the game_human.py file to train the model with human inputs