Group9 - Adversarial Search (Minimax Algorithm and Alpha-Beta Pruning)
Group9 - Adversarial Search (Minimax Algorithm and Alpha-Beta Pruning)
particularly in the realm of game playing and decision-making. It involves searching for the best
conflicting goal. Adversarial search algorithms are designed to find the optimal solution by
considering the possible moves of the opponent and selecting the best response.
The relevance of adversarial search lies in its wide range of applications, including:
• Game playing: Adversarial search is used in games like chess, checkers, and Go to make
planning, scheduling, and resource allocation, where multiple agents or stakeholders are
involved.
• Robotics: Adversarial search is used in robotics to plan and execute tasks in a dynamic
The Minimax algorithm is a popular adversarial search algorithm used to make decisions in a
competitive environment. It considers the possible moves of the opponent and selects the best
response by minimizing the maximum potential loss (minimax) or maximizing the minimum
Minimax algorithm. It reduces the number of nodes to be evaluated in the search tree by pruning
branches that are guaranteed to have a lower value than the current best move.
Research Objectives
search problems.
Minimax algorithm.
3. To analyze the trade-offs between the computational complexity and the optimality
of the solution obtained using the Minimax algorithm with Alpha-Beta Pruning.
and robotics.
By achieving these research objectives, this project aims to contribute to the development of
more efficient and effective adversarial search algorithms, which can be applied to a wide range
moves. Two pivotal techniques in adversarial search are the Minimax algorithm and Alpha-Beta
pruning.
Minimax Algorithm
The Minimax algorithm is a recursive strategy used to determine the optimal move for a player,
assuming that the opponent is also playing optimally. It is widely applied in two-player, zero-
sum games such as chess, tic-tac-toe, and checkers. The algorithm evaluates terminal nodes
using a utility function, propagating these values up the tree to determine the optimal move at the
Alpha-Beta Pruning
Alpha-Beta pruning enhances the efficiency of the Minimax algorithm by eliminating branches
in the game tree that do not influence the final decision. It introduces two parameters, alpha and
beta, which represent the minimum score that the maximizing player is assured of and the
maximum score that the minimizing player is assured of, respectively. As the algorithm traverses
the tree, it updates these parameters and prunes branches where the outcome is already
determined to be worse than previously examined moves (Knuth & Moore, 1975).
Applications and Enhancements
These algorithms have been instrumental in the development of AI for game playing. For
instance, in computer chess, Alpha-Beta pruning has been utilized to enhance search efficiency,
enabling programs to evaluate positions more deeply and make more informed decisions
(Campbell et al., 2002). Further improvements, such as iterative deepening and move ordering
Recent Developments
Recent research has explored various enhancements to these algorithms. For example, an
iterative optimal minimax search method has been proposed, which incorporates Alpha-Beta
ANALYSIS/DISCUSSION
Adversarial Search:
Adversarial search is an effective strategy in a competitive context when two or more actors have
opposing goals. The adversarial search can be used in two-player zero-sum games, which means
that what is excellent for one player will be bad for the other. In such a circumstance, there is no
especially in competitive situations such as games and strategic engagements. Adversarial search
allows AI agents to make optimal judgments while predicting the actions of an opponent with
opposing aims. Its goal is to help a player make an informed decision by taking into account the
which aim to determine the best possible move or strategy for a player in a competitive
environment against one or more components. This necessitates strategic thinking, the
b. Game-playing: The adversarial search has a wide range of applications in game play,
including well-known games such as chess, go, and poker. The adversarial search
provides the simplified character of these games by representing the state of a game in a
basic manner, and agents are constrained to a small set of actions whose repercussions
DFS, BFS, and A* search algorithms are well-suited for single-agent situations where many
agents do not compete or conflict directly. These algorithms are appropriate for determining the
best answer in such situations. In zero-sum games, where two players compete directly against
each other, adversarial search algorithms such as Minmax and Alpha-Beta pruning are preferable
because they can decide the optimum course of action for each player.
MINIMAX ALGORITHM
Minimax is a type of backtracking algorithm that is used in game theories and decision
making to find the most effective or ideal move for a player, assuming that your opponent also
plays optimally. It is widely used in two player turn-based games such as Tic-Tac-Toe,
Backgammon, Mancala, Chess, etc. In Minimax, the two players are referred to as maximizer
and minimizer. The maximizer aims to get the best possible score, while the minimizer tries to
get the lowest possible score. Every board state has a value allocated to it. In a given state, if the
maximizer has an advantage, the board's score is anticipated to be positive. If the minimizer has
the upper hand in that board state, it is likely going to be negative in value. The values on the
board are determined using algorithms that are specific to each type of game. The primary goal
of the Minimax algorithm is to minimize the possible loss for a worst-case scenario. This is how
it works:
a. Tree Structure: The algorithm portrays the game as a tree. Each node represents a game
state while the edges represent potential moves. The root of the tree is the current state of
the game while the leaves represent terminal game states with win, loss, or draw
outcomes.
b. Maximizing and Minimizing Layers: The tree is explored layer by layer. One player
(maximizer) aims to maximize the score, while the opponent (minimizer) aims to
minimize it. The maximizer takes the highest-value decision from available options,
c. Recursive Depth-first Search: Starting from the terminal states (leaves), scores are
assigned based on the outcome favorable to the maximizer or minimizer. The algorithm
recursively backtracks from the terminal states to the root, assigning scores to
d. Optimal Strategy: At the root, the score represents the best achievable outcome with
perfect play from both sides. This score dictates the maximizer's optimal move under the
Example:
Consider a game with four final states and paths leading from the root to the four leaves of a
perfect binary tree, as illustrated below. Let's assume that you are the maximizing player and you
have the first opportunity to move, which means that you are at the root and your opponent is on
the next level. Which move would you make as a maximizing player, given that your opponent is
makes a decision.
a. Maximizer goes LEFT: It is now the minimizers turn. The minimizer now has a choice
between 2 and 9. Being the minimizer it will definitely choose the least among both, that
is 2.
b. Maximizer goes RIGHT: It is now the minimizers turn. The minimizer now has a choice
between 3 and 6. He will choose 3 as it is the least among the two values.
Alpha-beta pruning
Alpha-beta pruning is a method for eliminating unnecessary steps to optimize the efficiency of
a minimax algorithm which is used in creating strategies for two-player zero sum games like
implement the other algorithm while ensuring the overall solution remains optimal. Maximizer
and minimizer alternate turns while trying to build the tree of gameplay nodes, one side head-to-
head, constructing the best move possible for themselves while placing the enemy in a
unfavorable position. To implement maximizer and minimizers order optimally in tinkering with
a game tree, Alpha-beta came into the picture as it excluded any branches not pertinent to the
Alpha is the parameter representing the best value currently uncovered for the maximizer
while Beta represents the best deal uncovered for the minimizer and while traversing, if none
over the current node helps in establishing a better deal then it simply ignores the node making
the entire process more efficient. As a result, this optimization allows for deeper investigations in
the game tree allowing for a better decision to be made to mow down the required time and
a. Branch and bound: Alpha-beta pruning is based on the branch and bound method, which
allows you to tackle optimization difficulties by breaking them down into smaller
problems. It enables the algorithm to effectively eliminate branches that did not result in
tree that can be eliminated which promotes the more promising subtree by limiting the
search time.
c. Heuristic improvements: To limit the computation time, the heuristic Alpha-beta tree
search cuts off the search early and applies the heuristic evaluation function to states that
a. Game Theory: Adversarial search is the foundation of game theory, which is utilized in
checkers, Go, and Connect Four. The algorithms described above can help
d. Game Decision making: The computer that memorably defeated world chess champion
Garry Kasparov won by prioritizing the most crucial actions and ignoring the less crucial
ones, these systems are able to operate more faster and make judgments in a couple of
seconds.
CONCLUSION
Adversarial search algorithms have developed as a formidable tool with a wide range of
cybersecurity, robotics and automated negotiating systems, these algorithms help with strategic