top of page

Adversarial Searches

How Can A Computer Play Games??

The answer is adversarial searches. Let’s see what this term means.

Adversarial search is a search which examines the problem which arises when we try to plan ahead of the ahead of the world and other agents are planning against. Does this sounds complicated, confusing or scary?? Don’t worry it isn’t.


Adversarial search which is also known as Minimax Search or MiniMax Algorithm is most commonly used in games to find the best moves. Currently this algorithm is used in chess, tic-tac-toe or any other two player games. It uses the concept of tree or data structure to navigate through the tree and capture all the possible moves in the game, where each move is represented in the terms of loss and gain.

Theoretically, this algorithm is based on Von Neumann’s Minimax theorem. This search assumes that the opponent will act in such a way he will effectively minimize your gains and maximize his own. However, this doesn’t work of the opponent is irrational, a beginner or a human who can be mistaken. It may be best to gamble and hope that the opponent will notice a subtle countermove.

Example of an adversarial



It follows that this can only be used to make decisions in zero-sum games in which one player’s loss in other player’s gain. Representing all the moves for simple games like Tic-tac-toe is not so difficult but with games like Chess and Othello it becomes computationally expensive. Therefore, programmers rely on further algorithm to narrow the search, such as alpha- beta pruning. This consists of stoping the calculation of the utility of one node when it is determined that there is no way the valu could be higher that that of an adjacent node. For an alternative method called min/max approximation.

MinMax Algorithm

How to deal with the contingency problem?

Expecting that the rival is balanced and consistently streamlines its conduct inverse to us we think about the best adversary's reaction.

Then the algorithm determines the best move.



Alpha beta pruning

A few branches will never be played by discerning players since they incorporate imperfect choices for either player.

Alpha-beta pruning is an altered variant of the Minimax calculation. It is a streamlining method for the Minimax calculation.

As we have seen in the Minimax search algorithm that the number of game states it has to examine are exponential in depth of the tree. Since we cannot eliminate the exponent, but we can cut it to half. Consequently there is a method by which without checking every hub of the game tree we can figure the right Minimax choice, and this strategy is called pruning. This includes two limit parameter Alpha and beta for future development, so it is called alpha-beta pruning. It is additionally called as Alpha-Beta Algorithm.




Further extensions to real games

Restricted sets of moves to be considered under the cut of level to reduce branching and improve the evaluation function.

Example- consider only the capture moves in chess.



For more information on adversarial searches visit



Comments


bottom of page