Skip to main content

Gym environment for Snake

Project description

Snake AI

Contains a gym environment for the classic game snake.
Implementation for the NEAT algorithm and RL agents can be found in examples/

Implementing

  • 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
    

Installation

For the latest installation, run

git clone https://github.com/vivek3141/snake-ai
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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
snake_gym-0.3-py3-none-any.whl (1.5 kB) Copy SHA256 hash SHA256 Wheel py3 Sep 16, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page