Skip to content

gpldecha/gym-square

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gym-square

Build Status

A simple square environment for openai-gym.

square_world

Installation

Clone or download gym-square and cd to the directory.

$ sudo -H pip install .

it will be then installed to /usr/local/lib/python2.7/dist-packages/. To unistall run:

sudo -H pip uninstall gym_square

Quick Example

import gym
import gym_square
from time import sleep

env = gym.make('square-v0')

env.square_world.set_agent_state(80)

env.render()
for _ in range(500):

    env.render()
    action = env.action_space.sample()
    observation, reward, done, info = env.step(action)

    if done:
        print 'Episode finished'
        break

    sleep(0.25)

Examples

A set of examples are provided in gym_square/example

About

A simple square environment for openai-gym

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages