Skip to main content

Snake-Gym

Downloads PyPi Version Python Compatibility License

Contains a gym environment for the classic game snake.

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")

Environments

  • snake-v0 Returns a 150x150 RGB image in the form of a numpy array for the observations
  • snake-tiled-v0 Returns a 10x10 matrix for the observations.
    • 0 is empty space
    • 1 is the snake
    • 2 is the food

Metadata

Release files for snake-gym 1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for snake-gym 1.8
File Interpreter ABI Platform
snake_gym-1.8-py3-none-any.whl Python 3 none any Details

Release files / snake_gym-1.8-py3-none-any.whl

Download URL snake_gym-1.8-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
614bfc27ded8f108de9f132c30cd4163f2c876687742de9080879fb644ae4ca0
BLAKE2b-256 checksum
How to use checksums
60d7c5759d85f693312ce93a503ce77d73ac4e7dd2d828c24160a0703b88bfb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.5

Release history Release notifications | RSS feed

This release

1.8 This release

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page