Contains a gym environment for the classic game snake.
env.render()is not implemented, running it will raiseNotImplementedError.env.reset()opens the GUI for the game.env.fpscontains the fps to run the game at. You can set it using:env.fps = 60
For the latest installation, run
git clone https://github.com/vivek3141/snake-gym
pip install -e .You can install the latest release by
pip install snake-gymThe environment can be created by doing the following:
import gym
import snake_gym
env = gym.make("snake-v0")snake-v0Returns a 150x150 RGB image in the form of a numpy array for the observationssnake-tiled-v0Returns a 10x10 matrix for the observations.0is empty space1is the snake2is the food