From 8bed7b4aaea63429a423aea890a68814a916b745 Mon Sep 17 00:00:00 2001 From: Nicolai Czempin Date: Tue, 4 Apr 2017 17:45:58 +0200 Subject: [PATCH] Actually return the generated moves --- gym_tic_tac_toe/envs/tic_tac_toe_env.py | 2 ++ 1 file changed, 2 insertions(+) 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 5c374aa..4406f35 100644 --- a/gym_tic_tac_toe/envs/tic_tac_toe_env.py +++ b/gym_tic_tac_toe/envs/tic_tac_toe_env.py @@ -55,8 +55,10 @@ class TicTacToeEnv(gym.Env): def move_generator(self): moves = [] for i in range (9): + if (self.state['board'][i]== 0): p = self.state['on_move'] m = [p, i] moves.append(m) + return moves