← Open Source
patrickloeber

snake-ai-pytorch

patrickloeber/snake-ai-pytorch on GitHub: Python, Tutorials, ML/AI fundamentals, RL.

TutorialsML/AI fundamentalsPython
Open on GitHub
Momentum
+1stars in 24 hours+0.1%
738
Stars
453
Forks
+3
This week
2
Contributors
Created 2020-12-10 · Updated 2026-10-16 · #6355 today
Top developers
patrickloeberMichaelSeguin
README

Teach AI To Play Snake! Reinforcement Learning With PyTorch and Pygame

In this Python Reinforcement Learning Tutorial series we teach an AI to play Snake! We build everything from scratch using Pygame and PyTorch. The tutorial consists of 4 parts:

You can find all tutorials on my channel: Playlist

  • Part 1: I'll show you the project and teach you some basics about Reinforcement Learning and Deep Q Learning.
  • Part 2: Learn how to setup the environment and implement the Snake game.
  • Part 3: Implement the agent that controls the game.
  • Part 4: Implement the neural network to predict the moves and train it.
Nearby in the ranking
Similar items