def main(): inFileName, outFileName, depth = sys.argv[1], sys.argv[2], int(sys.argv[3]) root = MorrisGame.readFromFile(inFileName) result = MaxMinABMidEnd(root, depth, float('-inf'), float('inf')) print('Initial position:', root.position, 'Output position: ', result.position) print('Position evaluated by static estimation: ', MorrisGame.numEvaluate) print('MINIMAX estimate: ', result.value) MorrisGame.write2File(outFileName, result.position)
def main(): inFileName, outFileName, depth = sys.argv[1], sys.argv[2], int(sys.argv[3]) root = MorrisGame.readFromFile(inFileName) result = MiniMaxOpeningBlack(root, depth) print('Initial position:', root.position, 'Output position: ', result.position) print('Position evaluated by static estimation: ', MorrisGame.numEvaluate) print('MINIMAX estimate: ', result.value) MorrisGame.write2File(outFileName, result.position)
def main(): # inFileName, outFileName, depth = 'board1.txt', 'board2.txt', 5 # for test inFileName, outFileName, depth = sys.argv[1], sys.argv[2], int(sys.argv[3]) root = MorrisGame.readFromFile(inFileName) result = MaxMinOpening(root, depth) print('Initial position:', root.position, 'Output position: ', result.position) print('Position evaluated by static estimation: ', MorrisGame.numEvaluate) print('MINIMAX estimate: ', result.value) MorrisGame.write2File(outFileName, result.position)
def main(): inFileName, outFileName, depth = sys.argv[1], sys.argv[2], int(sys.argv[3]) # inFileName, outFileName, depth = 'board3.txt', '1.txt', 1 root = MorrisGame.readFromFile(inFileName) # print(MorrisGame.staticMidEnd(root.position)) result = MaxMinMidEnd(root, depth) # result = MinMaxMidEnd(root, depth) print('Initial position:', root.position, 'Output position: ', result.position) print('Position evaluated by static estimation: ', MorrisGame.numEvaluate) print('MINIMAX estimate: ', result.value) MorrisGame.write2File(outFileName, result.position)