Skip to content

kfilipekk/Pytorch_snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages