From e924e38e526b8c0e83ecaf81ac4920563ed6c864 Mon Sep 17 00:00:00 2001 From: Nicolai Czempin Date: Sun, 16 Dec 2018 17:29:32 +0100 Subject: [PATCH] Update to current version of Gym --- gym_tic_tac_toe/envs/tic_tac_toe_env.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gym_tic_tac_toe/envs/tic_tac_toe_env.py b/gym_tic_tac_toe/envs/tic_tac_toe_env.py index 817e30c..57fa174 100644 --- a/gym_tic_tac_toe/envs/tic_tac_toe_env.py +++ b/gym_tic_tac_toe/envs/tic_tac_toe_env.py @@ -8,7 +8,7 @@ class TicTacToeEnv(gym.Env): def __init__(self): self.action_space = spaces.Discrete(9) self.observation_space = spaces.Discrete(512*512*2) # flattened - def _step(self, action): + def step(self, action): done = False reward = 0 @@ -46,12 +46,12 @@ class TicTacToeEnv(gym.Env): done = True return self.state, reward, done, {} - def _reset(self): + def reset(self): self.state = {} self.state['board'] = [0, 0, 0, 0, 0, 0, 0, 0, 0] self.state['on_move'] = 1 return self.state - def _render(self, mode='human', close=False): + def render(self, mode='human', close=False): if close: return print("on move: " , self.state['on_move'])