Skip to main content

Snake game for OpenAI Gym

Project description

Snake game for OpenAI Gym

Python versions PyPI License

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


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.1.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file gym_snake_game-0.1.1.tar.gz.

File metadata

  • Download URL: gym_snake_game-0.1.1.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

Hashes for gym_snake_game-0.1.1.tar.gz
Algorithm Hash digest
SHA256 374e3b5909bcd4466d32e403479bf8815c2c39303d81121c7373ad4e0e8de345
MD5 8d619680fdede8fa6a8b3df8654fe2ce
BLAKE2b-256 59743709e23313e7198e0712ef2b226ccf58a3306dd7586c0eb7dca78860cc72

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