add initial Python files

This commit is contained in:
Nicolai Czempin 2017-03-31 00:38:15 +02:00
parent f8682f30d1
commit 9a87c6fcef
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,10 @@
from gym.envs.registration import register
register(
id='random_walk-v0',
entry_point='gym_random_walk.envs:RandomWalkEnv',
)
#register(
# id='foo-extrahard-v0',
# entry_point='gym_foo.envs:FooExtraHardEnv',
#)

View File

@ -0,0 +1 @@
from gym_random_walk.envs.random_walk_env import RandomWalkEnv

View File

@ -0,0 +1,15 @@
import gym
from gym import error, spaces, utils
from gym.utils import seeding
class RandomWalkEnv(gym.Env):
metadata = {'render.modes': ['human']}
def __init__(self):
print("init")
def _step(self, action):
print("step")
def _reset(self):
print("reset")
def _render(self, mode='human', close=False):
print("render")

7
setup.py Normal file
View File

@ -0,0 +1,7 @@
from setuptools import setup
setup(name='gym_random_walk',
version='0.0.1',
install_requires=['gym']
)