Ejemplo n.º 1
0
def MiniMaxOpeningBlack(root, depth):
    """ use MINIMAX algorithm to generate a move for black in the opening"""

    # reverse the board
    root.position = MorrisGame.reverse(root.position)

    result = MaxMinOpening(root, depth)

    # reverse the result
    result.position = MorrisGame.reverse(result.position)
    root.position = MorrisGame.reverse(root.position)

    return result
Ejemplo n.º 2
0
def MiniMaxGameBlack(root, depth):
    """ use MINIMAX algorithm to generate a move for black """

    # reverse the board
    root.position = MorrisGame.reverse(root.position)

    result = MaxMinMidEnd(root, depth)

    # reverse the result
    result.position = MorrisGame.reverse(result.position)
    root.position = MorrisGame.reverse(root.position)

    return result