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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snake_gym-1.0-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

File details

Details for the file snake_gym-1.0-py3-none-any.whl.

File metadata

  • Download URL: snake_gym-1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for snake_gym-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20250262e8b1eb83235f86108d25d6b3e4df9ccd9eb47df5555b89c76d41c18b
MD5 1cfc044f8a40d161e9207969a4f65d76
BLAKE2b-256 dc5e8321914c772d9f9a4265bd19f0f87ee8e573922c9432a1e1d69680bc585e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page