Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1022 Bytes

File metadata and controls

30 lines (24 loc) · 1022 Bytes

PyTorch Snake Game AI

License

A deep reinforcement learning Snake game built with PyTorch and Pygame. The agent learns to play Snake using Q-learning and neural networks. Built by Krystian Filipek

Snake AI Training Demo

Features

  • Classic Snake Gameplay with AI training
  • Deep Q-Network with experience replay
  • Live training graphs showing progress
  • Manual play mode for testing

Quick Start

git clone https://github.com/kfilipekk/Pytorch_snake.git
cd Pytorch_snake
pip install .
python main.py

AI Details

  • State: 11D vector (danger, direction, food location)
  • Actions: [straight, right, left]
  • Rewards: +10 (food), -10 (collision)
  • Model: 2-layer neural network with experience replay

Developed by kfilipekk