Checkers-Reinforcement-Learning
Checkers-Reinforcement-Learning copied to clipboard
Initial Transitions for Q-Learning Agent is empty
When I run the AI.py, initial transition data is (None, None) which is causing a crush
`---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/home/semih/ozu/rl/homework1/Checkers-Reinforcement-Learning/AI.py in
/home/semih/ozu/rl/homework1/Checkers-Reinforcement-Learning/AI.py in play_n_games(player1, player2, num_games, move_limit) 457 outcome_counter[j][5] = piece_counter[3] 458 --> 459 player1.game_completed() 460 player2.game_completed() 461 #game_board.print_board()
/home/semih/ozu/rl/homework1/Checkers-Reinforcement-Learning/AI.py in game_completed(self) 169 transition = (self.pre_last_move_state ,self.post_last_move_state) 170 --> 171 self.transitions[transition] = self.transitions[transition] + self.learning_rate * reward_function(transition[0],cur_state) 172 173 self.pre_last_move_state = None
KeyError: (None, None).`