def random_choice(s: FishGameState) -> GameStateTree: if s.current_player != self.current_player: raise ValueError("Not current players turn...") selected_action = choice(s.get_player_actions_from(s.current_player)) return GameStateTree( state=s.move_penguin( color=self.current_player.color, start_row=selected_action.start.row, start_col=selected_action.start.col, end_row=selected_action.end.row, end_col=selected_action.end.col) )
def simply_policy(s: FishGameState) -> int: return len(s.get_player_actions_from(s.current_player))