def evaluate_heuristic_score(self, game_state, move, player): board, player_1_score, player_2_score = game_state counter = points_counter.PointsCounter(board) move_points = counter.count_move_points(move) if player == 1: return player_1_score + move_points - player_2_score else: return player_2_score + move_points - player_1_score
def evaluate_heuristic_score(self, game_state, move, player): board, player_1_score, player_2_score = game_state counter = points_counter.PointsCounter(board) move_points = counter.count_move_points(move) extra_score = 0 if board[move[1], move[0]] != 0: extra_score = 0.5 if player == 1: return player_1_score + move_points - player_2_score + extra_score else: return player_2_score + move_points - player_1_score + extra_score
def __init__(self, board_size): self._PLAYER_1 = 1 self._PLAYER_2 = 2 self._current_player = self._PLAYER_1 self._player_1_points = 0 self._player_2_points = 0 self._board_size = board_size self._game_board = np.zeros(shape=(board_size, board_size)) self._points_counter = points_counter.PointsCounter(self._game_board)
def __init__(self, game_board): self._game_board = game_board self._points_counter = points_counter.PointsCounter(game_board)
def evaluate_heuristic_score(self, game_state, move, player): board, player_1_score, player_2_score = game_state counter = points_counter.PointsCounter(board) return counter.count_move_points(move)