Gym environment for Snake
Project description
Snake-Gym
Contains a gym environment for the classic game snake.
Implementing
env.render()
is not implemented, running it will raiseNotImplementedError
.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 observationssnake-tiled-v0
Returns a 10x10 matrix for the observations.0
is empty space1
is the snake2
is the food
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file snake_gym-1.8-py3-none-any.whl
.
File metadata
- Download URL: snake_gym-1.8-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614bfc27ded8f108de9f132c30cd4163f2c876687742de9080879fb644ae4ca0 |
|
MD5 | 5c479a6f7659e75f62f7ff6359450701 |
|
BLAKE2b-256 | 60d7c5759d85f693312ce93a503ce77d73ac4e7dd2d828c24160a0703b88bfb8 |