Example #1
0
def research_paper_heuristic(board, color):
    # msc = mobility_score(board, color)
    # ssc = stability_score(board, color)
    # return ssc * 100 + msc
    if next_player(board, color) is None:
        return count_colors(board, color) * 10 ** 10
    # return count_legal_moves(board, color) + frontier_squares(board, color) + weight_matrix(board, color) * 10
    stage = 64 - board.count(EMPTY)
    return 1*(count_legal_moves(board, color) * WEIGHT_STAGE_MOVE[stage] + \
           weight_matrix(board, color) * WEIGHT_STAGE_SQ[stage] + \
           frontier_squares(board, color))
Example #2
0
def stability_score(board, color):
    # instead of using the methods described in the paper, I will use weight matrix to simulate the stability score
    return weight_matrix(board, color)