0% found this document useful (0 votes)
4 views13 pages

Group9 - Adversarial Search (Minimax Algorithm and Alpha-Beta Pruning)

Uploaded by

omobsdaniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Group9 - Adversarial Search (Minimax Algorithm and Alpha-Beta Pruning)

Uploaded by

omobsdaniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

ADVERSARIAL SEARCH: AND MINIMAX ALGORITHM

AND ALPHA-BETA PRUNING


GROUP 9
COURSE CODE : CSC 405 (ARTIFICIAL INTELLIGENCE)
NAMES OF CONTIBUTORS:
1. DAVID EMMANUEL ILERIOLUWA 21/9187
2. OMOGBAI DANIEL OSHIONE 21/8947
3. ⁠OKORO EVIDENCE CHUKWUEMEKA 21/7935
4. ⁠BRANDON CHIKEZIE 21/8111
5. BRAIMOH OMOKHOGIE PAUL 21/8316
6. COKER DANIEL 21/8777
7. ⁠OKORIE FAVOUR KOKOMMA 21/8555
8. ⁠OKAFOR CHIBUIKE SIMEON. 21/8376
9. ⁠CHIEGBU LAMBERT 21/9199
10. ⁠OKROSI DANIEL 21/8640
11. ⁠OKONTA EMMANUEL 21/7867
12. OKEKE CHIKAMSO FRANKLIN 21/9083
13. BOYO ORITSEDERE CHUKWUEBUKA 21/8849
14. ⁠OKEKE NNEOMA JESSICA 21/8414
15. EMORUWA MARVELLOUS AFOLABI. 22/11710
16. ⁠OKORIE FAVOUR KOKOMMA 21/8555
17. ⁠CHOICE-EDAH EFETOBORE CHOICE (21/8340)
18. OKONKWO DANIEL CHIBUZOR 21/8322
INTRODUCTION

Introduction to Adversarial Search

Adversarial search is a fundamental concept in the field of Artificial Intelligence (AI),

particularly in the realm of game playing and decision-making. It involves searching for the best

move or action in a competitive environment, where an opponent is trying to achieve a

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.

Relevance of Adversarial Search

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

decisions and play against human opponents.

• Decision-making: Adversarial search can be applied to real-world problems, such as

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

environment, where the robot must adapt to changing circumstances.

Minimax Algorithm and Alpha-Beta Pruning

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

potential gain (maximin).

Alpha-Beta Pruning is an optimization technique used to improve the efficiency of the

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

The research objectives for this project topic are:

1. To investigate the effectiveness of the Minimax algorithm in solving adversarial

search problems.

2. To evaluate the performance of Alpha-Beta Pruning in improving the efficiency of the

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.

4. To explore the applications of adversarial search and Minimax algorithm with

Alpha-Beta Pruning in real-world problems, such as game playing, decision-making,

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

of problems in AI and other fields.


LITERATURE REVIEW

Adversarial Search: Minimax Algorithm and Alpha-Beta Pruning

Adversarial search is a fundamental concept in artificial intelligence (AI), particularly in the

domain of game theory and decision-making for competitive environments. It involves

algorithms designed to make optimal decisions by anticipating and countering an opponent's

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

root (Russell & Norvig, 2020).

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

heuristics, have been applied to optimize the performance of these algorithms.

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

pruning to eliminate unnecessary nodes and improve efficiency (Beal, 1980).

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

win-win solution. Adversarial search is critical in artificial intelligence decision-making,

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

opponents' potential actions and counter-moves.


Role of Adversarial Search in AI

a. Decision-making: Decision-making is fundamental to adversarial search algorithms,

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

assessment of alternative outcomes, and adaptive decision-making during the game.

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

are defined by exact rules.

Adversarial search algorithms

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,

while the minimizer takes the lowest.

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

intermediate nodes based on whether it's the maximizer's or minimizer's turn.

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

assumption that the minimizer is also playing optimal

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

also playing optimally?


Since this is a backtracking based algorithm, it tries all possible moves, then backtracks and

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

chess, checkers or tic-tac-toe. Alpha-beta reduces the computational power required to

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

final evaluation of the game.

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

power needed for AI applications such as the chess engine.

a. Alpha - denotes the value of the best or highest value.

b. Beta - denotes the value of the best or lowest value.

Alpha-beta pruning is considered an effective algorithm in the adversarial search because;

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

the optimal answer.


b. Branch elimination: The Alpha-beta pruning algorithm relies on the branches of the game

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

treat the non-terminal nodes as if they were terminal nodes.

Practical applications of Adversarial search algorithms

a. Game Theory: Adversarial search is the foundation of game theory, which is utilized in

domains such as economics, political science, and biology to describe strategic

interactions among rational decision makers.

b. Adversarial search is most commonly utilized in board games such as chess,

checkers, Go, and Connect Four. The algorithms described above can help

computers compete against human opponents or other computer players.

c. Puzzle-solving: Adversarial search algorithms can be used to solve puzzles and

optimization issues that require determining the optimum sequence of movements

or actions to reach a desired result.

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

applications in various disciplines. From understanding complex board games to improving

cybersecurity, robotics and automated negotiating systems, these algorithms help with strategic

decision-making in dynamic competitive contexts.


REFERENCES

Beal, D. F. (1980). An analysis of minimax. Artificial Intelligence, 20(2), 173–199.


https://doi.org/10.1016/0004-3702(83)90028-1
Campbell, M., Hoane, A. J., & Hsu, F.-h. (2002). Deep Blue. Artificial Intelligence, 134(1–2),
57–83. https://doi.org/10.1016/S0004-3702(01)00129-1
Knuth, D. E., & Moore, R. W. (1975). An analysis of Alpha-Beta pruning. Artificial Intelligence,
6(4), 293–326. https://doi.org/10.1016/0004-3702(75)90019-3
Russell, S., & Norvig, P. (2020). Artificial intelligence: A modern approach (4th ed.). Pearson.

You might also like