Snake game for OpenAI Gym
Project description
Snake game for OpenAI Gym
Snake game for OpenAI gym
Quick Start
import gym_snake_game
import gym
# both work
env = gym.make('Snake-v0', render_mode='human')
env = gym_snake_game.make('Snake-v0', render_mode='human')
env.reset()
# for human playing
env.play()
# for ai playing
while True:
obs, reward, done, truncated, info = env.step(env.action_space.sample())
if done:
break
env.close()
Ming Yu
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 Distribution
gym_snake_game-0.1.2.tar.gz
(6.8 kB
view details)
File details
Details for the file gym_snake_game-0.1.2.tar.gz.
File metadata
- Download URL: gym_snake_game-0.1.2.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d189cbb7d9a5d25c19584d44029e0762c8154ddddf63832c04088821ebc02b72
|
|
| MD5 |
9edbbbf3e0e0d6a69a1bf62f570f1206
|
|
| BLAKE2b-256 |
1499ecd8f0294df8286eeaafd13846462bf10d6143ac45f96b6ee9738b1022dd
|