This project contains the four main files:
- snake_env.py : Run this and you can play the game Snake by yourself
- agent_1.py : Run this and a Deep Reinforcement Learning Agent will learn to play snake
- plot_script.py : Plotting the results of the agent
- requirements.txt : You will need some Python packages, like turtle, TensorFlow and Keras before you can run the scripts, install these first
- The first games, the agent has no clue:
- End of game 13 and beginning of game 14: The agent learns, it doesn’t take the shortest path but finds his way to the apples.
- Game 30: The agent avoids the body of the snake and finds a fast way to the apples, after playing only 30 games.