rename to the proper form

This commit is contained in:
Nicolai Czempin 2017-03-31 01:14:26 +02:00
parent e19382cc2b
commit a1198af230

View File

@ -1,15 +1,21 @@
import gym
from gym import error, spaces, utils
from gym.utils import seeding
import numpy as np
class RandomWalkEnv(gym.Env):
metadata = {'render.modes': ['human']}
def __init__(self):
self.action_space = spaces.Discrete(2)
print("init")
def _step(self, action):
print("step")
reward = 0
done = False
return np.array(self.state), reward, done, {}
def _reset(self):
print("reset")
self.state = 0 # TODO start in a random position
def _render(self, mode='human', close=False):
print("render")