This project implements a classic Snake game using Pygame and trains an AI agent with pytorch using Deep Q Learning to play the game. The AI learns to navigate the grid, collect food, and avoid collisions with its own body and the walls.
- Clone this repo
- Create and activate a python virtual enviorment
- Install dependencies
pip install pytorch numpy pygame
In the terminal: python snake_game.py
In the terminal: python agent.py