Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
    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)
Esempio n. 4
0
 def __init__(self, game_board):
     self._game_board = game_board
     self._points_counter = points_counter.PointsCounter(game_board)
Esempio n. 5
0
 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)