Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 553 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 553 Bytes

Snake for OpenAI Gym

A version of snake for OpenAI Gym.

snake gif

Installation

git clone [email protected]:sagelywizard/gym_snake.git
cd gym_snake
pip install -e .

Usage

import gym_snake
import gym

env = gym.make('snake-v0')
state = env.reset()
done = False
while not done:
    action = policy(state)
    state, reward, done, info = env.step(action)
    env.render()