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

Uploaded Python 3

File details

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

File metadata

  • Download URL: snake_gym-0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4fd92cd77356dd0038ef8444cb80880427edb6edf077939f3069c4f01fdb244b
MD5 4944f751b7dc973171bf3e5c83fb01e1
BLAKE2b-256 9df10a690d3363857572e38a00cb0f90a27f66be95eb399b09b052e7ed67ecaf

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