Snake Gym

A gym environment for the game snake, with a tiled version. Contains implementations for NEAT and RL.
Alternatives To Snake Gym
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Snake Ga360
2 years ago9Python
AI Agent that learns how to play Snake with Deep Q-Learning
2 years ago3mitPython
AI research environment for the game of Snake 🐍 .
Q Snake23
2 years agoJavaScript
A Q-learning web visualizer for Snake written in React.js
5 years ago2mitPython
Multiplayer snake AI
Snake On Pygame11
4 months agomitPython
Snake game implemented in Pygame that can be controlled by human input and AI agents (DQN). Who's best? :snake: :robot:
Snake Gym9
3 years ago13December 11, 20191mitPython
A gym environment for the game snake, with a tiled version. Contains implementations for NEAT and RL.
Naagin Naggin6
6 years agoPython
Using RL approaches for playing the classic snake game.
Self Play On Multi Snakes Environment6
3 years agoPython
Meta Rl Bandits5
4 years agoPython
A simple RNN meta-learner
Deep Sea Snake4
5 years ago1Python
Deep RL applied to a series-elastic snake robot
Alternatives To Snake Gym
Select To Compare

Alternative Project Comparisons


Downloads PyPi Version Python Compatibility License

Contains a gym environment for the classic game snake.


  • env.render() is not implemented, running it will raise NotImplementedError.
  • env.reset() opens the GUI for the game.
  • env.fps contains the fps to run the game at. You can set it using:
    env.fps = 60


For the latest installation, run

git clone
pip install -e .

You can install the latest release by

pip install snake-gym

Creating The Environment

The environment can be created by doing the following:

import gym
import snake_gym
env = gym.make("snake-v0")


  • snake-v0 Returns a 150x150 RGB image in the form of a numpy array for the observations
  • snake-tiled-v0 Returns a 10x10 matrix for the observations.
    • 0 is empty space
    • 1 is the snake
    • 2 is the food
Popular Rl Projects
Popular Snake Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Video Game
Reinforcement Learning
Deep Q Network