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-0.3-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snake_gym-0.3-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-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 92a70fc2bfaef1dceae4aec1d1288af91630cf0f7d7ed9d6359d10285671f432
MD5 2cc21f87c5eeb081525b929f2bc477cd
BLAKE2b-256 ebe636c7a5eed924453ecd010abb2c7db09858a7d3c6fbed6c82c99c32281999

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