This repo adopts MIT License
This repo stores a simple DQN snake game agent training program
- Install pygame for game environment simulation
pip3/conda/pip install pygame- Install pytorch for DQN model training, where CPU training is enough for this agent
pip3 install torch torchvision- Install matplotlib and ipython to help display the training results
pip3/conda/pip install matplotlib ipython- After installing all the dependencies, run the
agent.pyto start new training task
cd your_project_dir\Agent
python Agent.py- If you encounter the following error, install
nomklpackage in your conda environment
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized
conda install nomklThe snake agent will frequently crash into its own body then end the game, the reason is that the agent is unaware of the position info about the snake body because of the state design, thus unconscious to reduce the risk of crashing into itself
