import random


def get_best_move(board, scores):
    """
    Function that computes the best move for the machine given
    the actual board state
    """
    max_score = max(scores[row][col] for row, col in board.get_empty_squares())
    candidates = [(row, col) for row, col in board.get_empty_squares()
                  if scores[row][col] == max_score]
    return random.choice(candidates)