Welcome to snake’s documentation!

This is a simple snake game. The original purpose was to create a game for use with reinforcement learning, but the game can be played in the terminal by humans. If you want to use the game for reinforcement learning you only need SnakeGame. This will create a self-contained instance of a game of snake which can be interacted with programatically.

When the game is run in the terminal it is wrapped by GameIO, which captures keyboard input and sends it to SnakeGame and also writes the state of the game to the screen.

Indices and tables