Adversarial search
Adversarial search
Minimax algorithm
The game tree’s leaf node accommodates all the possible moves. The
game state denotes the current board condition.
With every single move, the game state changes and the game tree
gets updated height-wise.
In the game tree, every node is assigned weights that influence the
chances of winning, the higher the weights, the higher the chances of
winning.
Minimax Algorithm:
def minimax(depth, node_index, is_max, scores, height):
if depth == height:
return scores[node_index]
if is_max:
else: