{"id":17723430,"url":"https://github.com/vivek3141/snake-gym","last_synced_at":"2025-03-14T05:31:57.867Z","repository":{"id":57468815,"uuid":"148002202","full_name":"vivek3141/snake-gym","owner":"vivek3141","description":"A gym environment for the game snake, with a tiled version. Contains implementations for NEAT and RL.","archived":false,"fork":false,"pushed_at":"2020-03-30T22:14:37.000Z","size":812,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T01:43:25.964Z","etag":null,"topics":["deep-q-network","dopamine","dopamine-rl","reinforcement-learning","snake","snake-ai"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/snake-gym/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivek3141.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-09T07:18:37.000Z","updated_at":"2023-08-29T07:42:45.000Z","dependencies_parsed_at":"2022-09-19T10:10:17.242Z","dependency_job_id":null,"html_url":"https://github.com/vivek3141/snake-gym","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivek3141%2Fsnake-gym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivek3141%2Fsnake-gym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivek3141%2Fsnake-gym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivek3141%2Fsnake-gym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivek3141","download_url":"https://codeload.github.com/vivek3141/snake-gym/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532517,"owners_count":20306151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-q-network","dopamine","dopamine-rl","reinforcement-learning","snake","snake-ai"],"created_at":"2024-10-25T15:42:56.552Z","updated_at":"2025-03-14T05:31:57.283Z","avatar_url":"https://github.com/vivek3141.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snake-Gym\n[![Downloads](https://pepy.tech/badge/snake-gym)](https://pepy.tech/project/snake-gym)\n[![PyPi Version](https://img.shields.io/pypi/v/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)\n[![Python Compatibility](https://img.shields.io/pypi/pyversions/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)\n[![License](https://img.shields.io/pypi/l/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)\u003cbr\u003e\n\nContains a gym environment for the classic game snake.\n\n## Implementing\n* `env.render()` is not implemented, running it will raise `NotImplementedError`.\n* `env.reset()` opens the GUI for the game. \n* `env.fps` contains the fps to run the game at. You can set it using:\n    ```python\n    env.fps = 60\n    ```\n## Installation\nFor the latest installation, run\n```bash\ngit clone https://github.com/vivek3141/snake-gym\npip install -e .\n```\nYou can install the latest release by\n```bash\npip install snake-gym\n```\n\n## Creating The Environment\nThe environment can be created by doing the following:\n```python\nimport gym\nimport snake_gym\nenv = gym.make(\"snake-v0\")\n```\n\n## Environments\n* `snake-v0` Returns a 150x150 RGB image in the form of a numpy array for the observations\n* `snake-tiled-v0` Returns a 10x10 matrix for the observations. \n    * `0` is empty space\n    * `1` is the snake\n    * `2` is the food\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivek3141%2Fsnake-gym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivek3141%2Fsnake-gym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivek3141%2Fsnake-gym/lists"}