def machine_turn( self ): # TODO: Use your minimax alpha beta pruning algorithm here to set the machines turn # option=mini_max(self.board,False,_MACHINE_SYMBOL) # self.board=option[1] option = mini_max_ab(self.board, False, _MACHINE_SYMBOL, -np.inf, np.inf) self.board = option[1]
def machine_turn( self ): # TODO: Finish this function by making the machine choose a random cell (use random module) #value = randint(0,8) #while(self.board[value] is not None): # value = randint(0,8) #self.board[value] = _MACHINE_SYMBOL #print(mini_max_ab(self.board, False, _MACHINE_SYMBOL, -1, -1)[1]) self.board = mini_max_ab(self.board, False, _MACHINE_SYMBOL, -9999, 9999)[1]
def machine_turn( self ): # TODO: Use your minimax alpha beta pruning algorithm here to set the machines turn self.board = mini_max_ab(self.board, True, _MACHINE_SYMBOL, float('-inf'), float('inf'), 2)[1]
def machine_turn(self): self.board = mini_max_ab(self.board,False,_MACHINE_SYMBOL,-1,-1)[1]
def machine_turn( self ): # TODO: Use your minimax alpha beta pruning algorithm here to set the machines turn self.board = mini_max_ab(self.board, False, _MACHINE_SYMBOL, -1, -1)[1]
def machine_turn(self): # TODO: Finish this function by making the machine choose a random cell (use random module) self.board = mini_max_ab(self.board, True, _MACHINE_SYMBOL, -2, 2)[1]
def machine_turn(self): alpha = -1 beta = 1 self.board = mini_max_ab(self.board, False, _MACHINE_SYMBOL, alpha, beta)[1]