コード例 #1
0
def main():
    root, outputFile, depth = IO.getInput()
    try:
        game = morrisGame()
        estimate, next_move= game.run('midgame', 'minimax', root, depth, True)
        IO.writeToFile(outputFile, next_move)
        game.printOutput(estimate, 'MiniMax')
    except Exception as e:
        print("An Error occured :", e)
コード例 #2
0
def main():
    root, outputFile, depth = IO.getInput()
    try:
        game = morrisGame()
        estimate, next_move = game.run('opening', 'alphabeta', root, depth,
                                       True)
        IO.writeToFile(outputFile, next_move)
        game.printOutput(estimate, 'AlphaBeta')
    except Exception as e:
        print("An Error occured :", e)