Beispiel #1
0
 def test_minimax_on_othello_3_0_optimum(self):
     board = Board()
     players = [Player('black'), Player('white')]
     game = Game(board, players, visualise=True)
     game.board[3, 2] = int(players[1])
     game.board[3, 1] = int(players[1])
     ai = MiniMaxAI(color='black', depth=0)
     self.assertEqual(ai.search(game), (3, 0))
Beispiel #2
0
 def test_depth_limited_search(self):
     # int of white player is 1
     ai = MiniMaxAI('white', time_limit=10, depth=0)
     game = TestGame()
     self.assertEqual('a2', ai.search(game))
Beispiel #3
0
 def test_basic_minimax(self):
     # int of white player is 1
     ai = MiniMaxAI('white', time_limit=10)
     game = TestGame()
     self.assertEqual('a1', ai.search(game))