SlideShare a Scribd company logo
AI Game Search
MENOUFIA UNIVERSITY
FACULTY OF COMPUTERS AND INFORMATION
ALL DEPARTMENTS
ARTIFICIAL INTELLIGENCE
‫المنوفية‬ ‫جامعة‬
‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬
‫األقسام‬ ‫جميع‬
‫الذكاء‬‫اإلصطناعي‬
‫المنوفية‬ ‫جامعة‬
Ahmed Fawzy Gad
ahmed.fawzy@ci.menofia.edu.eg
Minimax
Minimax Game Search
Minimax Game Search
Two Players take turns:
Max and Min
Minimax Game Search
Two Players take turns:
Max and Min
Max : Maximizes Score.
Min : Minimizes Score.
MAX
Minimax Game Search
Two Players take turns:
Max and MinMAX
MIN
Minimax Game Search
Two Players take turns:
Max and Min
Max : Maximizes Score.
Min : Minimizes Score.
MAX
MIN
Minimax Game Search
Two Players take turns:
Max and Min
Max : Maximizes Score.
Min : Minimizes Score.
Special Case.
Max is an expert.
Min is a beginner.
MAX
MIN
Minimax Game Search
A
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Hot to find heuristic values
for other nodes?
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Hot to find heuristic values
for other nodes?
Use children heuristics to
calculate parent heuristic.
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Hot to find heuristic values
for other nodes?
Use children heuristics to
calculate parent heuristic.
Minimax Game
Search Steps
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Hot to find heuristic values
for other nodes?
Use children heuristics to
calculate parent heuristic.
Minimax Game
Search Steps
Calculate
Heuristics
Minimax Game Search
Which node to follow?
No heuristic values.
A
B C
Hot to find heuristic values
for other nodes?
Use children heuristics to
calculate parent heuristic.
Minimax Game
Search Steps
Calculate
Heuristics
Search
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B C
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B CB C
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
C
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
C
D E
B C
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
C
D E
B C
D E
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
C
D E
B C
D E
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
B C
D E
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
B C
D E
H I J
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
B C
D E
H I J
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Max
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Max
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Max
5
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
D
H I
C
D E
J
3 -2 5
B C
D E
H I J
Max
5
5
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
C
D E
B C
D E5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
C
D E
B C
D E5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
B C
D E5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
B C
D E
K L M
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
75
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
7
Min
5
75
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
7
Min5
55
75
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
7
Min5
5
55
75
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
B
E
K L
C
D E
M
7 0 3
B C
D E
K L M
Max
7
7
7
Min5
5
55
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B CB C5
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
CB C5
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
C
F G
B C5
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
C
F G
B C5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
C
F G
B C5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
B C5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
B C
N O P
5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
Max
5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
Max
4
5
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
Max
4
5
4
F G
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
Max
4
5
4
F G4
7
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
F
N O
C
F G
P
0 -5 4
B C
N O P
Max
4
5
4
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
C
F G
B C5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
C
F G
B C5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
B C5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
B C
Q R S
5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
47
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min
847
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
847
5
5
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
847
5
5
4
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
847
5
5
4
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
5
8
4
47
5
5
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
5
5
8
4
47
5
5
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
5
5
8
4
5
47
5
5
Max
Phase 1 : Heuristic Value Calculation
Depth-First Search
A
B
C
G
Q R
C
F G
S
-6 8 2
B C
Q R S
Max
8
5
8
F G4 8
Min4
4
4
5
5
8
4
5
47
5
5
If both players play optimally then Max will win by a score 5.
Game Tree After Heuristic Value Calculation
8
4
5
47
5
5
Phase 2 : Game Search
8
4
5
47
5
5
Phase 2 : Game Search
8
4
5
47
5
5
A
Phase 2 : Game Search
8
4
5
47
5
5
BMax
A
Phase 2 : Game Search
8
4
5
47
5
5
B
D
Max
A
Min
Phase 2 : Game Search
8
4
5
47
5
5
B
D
J
Max
Min
Max
A
Minimax Game Search Drawback
• Expands all the tree
while not all
expanded nodes are
useful.
Minimax Game Search Drawback
• Expands all the tree
while not all
expanded nodes are
useful.
• In this example, just
few nodes of the
whole tree was useful
in reaching the goal.
Alpha-Beta Pruning
Alpha-Beta Pruning = Minimax Except
• This game search strategy is a modification to Minimax game search
that avoids exploring nodes that are not useful in the search.
• It gives the same results as Minimax but avoids exploring some
nodes.
• In the previous example, the path explored using Minimax was A-B-D-
J.
• Also the Alpha-Beta Pruning path will be A-B-D-J but without
exploring all nodes as in Minimax.
Alpha-Beta Pruning Motivation
Never explore values that are not useful.
=Min(Max(1, 2, 5), Max(6, x, y), Max(1, 3, 4))
=Min(5, Max(6, x, y), 4)
=Min(Max(6, x, y), 4)
=4
Alpha-Beta Game Search
Alpha-Beta Game Search
Alpha-Beta Game Search
Alpha-Beta Game Search
Alpha-Beta Game Search
Alpha-Beta Game Search
5
Alpha-Beta Game Search
5
5
Alpha-Beta Game Search
5
5
Alpha-Beta Game Search
5
5
Alpha-Beta Game Search
5
5
Alpha-Beta Game Search
7
5
5
Alpha-Beta Game Search
7
5
5
Min(5, max(7, x, y))
=5
Alpha-Beta Game Search
7
5
5
Alpha-Beta Game Search
7
5
5
Alpha-Beta Game Search
7
5
5
Alpha-Beta Game Search
7
5
5
5
Alpha-Beta Game Search
7
5
5
5
Alpha-Beta Game Search
7
5
5
5
Alpha-Beta Game Search
7
5
5
5
Alpha-Beta Game Search
7
5
5
5
Alpha-Beta Game Search
7
5
5
5
4
Alpha-Beta Game Search
7
5
5
5
4
4
Max(5, min(4, x, y, z))
=5
Alpha-Beta Game Search
7
5
5
5
4
4
Alpha-Beta Game Search
7
5
5
5
4
4
Alpha-Beta Game Search
7
5
5
5
4
4
Same results as Minimax
with fewer nodes explored.
5 Unexplored Branches.

More Related Content

What's hot

AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
Tajim Md. Niamat Ullah Akhund
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
Md. Tanvir Masud
 
Machine Learning in Cyber Security
Machine Learning in Cyber SecurityMachine Learning in Cyber Security
Machine Learning in Cyber Security
Rishi Kant
 
AI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by ExamplesAI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by Examples
Ahmed Gad
 
Clustering paradigms and Partitioning Algorithms
Clustering paradigms and Partitioning AlgorithmsClustering paradigms and Partitioning Algorithms
Clustering paradigms and Partitioning Algorithms
Umang MIshra
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
Tajim Md. Niamat Ullah Akhund
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
Tekendra Nath Yogi
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchNilu Desai
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Simplilearn
 
Informed search
Informed searchInformed search
Informed search
Amit Kumar Rathi
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
Air Cargo transport
 Air Cargo transport Air Cargo transport
Air Cargo transport
Faimin Khan
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
Oswald Campesato
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
sandeep54552
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksFrancesco Collova'
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
vikas dhakane
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceBise Mond
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2
DigiGurukul
 

What's hot (20)

AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Planning
Planning Planning
Planning
 
Machine Learning in Cyber Security
Machine Learning in Cyber SecurityMachine Learning in Cyber Security
Machine Learning in Cyber Security
 
AI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by ExamplesAI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by Examples
 
Clustering paradigms and Partitioning Algorithms
Clustering paradigms and Partitioning AlgorithmsClustering paradigms and Partitioning Algorithms
Clustering paradigms and Partitioning Algorithms
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
 
Informed search
Informed searchInformed search
Informed search
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Air Cargo transport
 Air Cargo transport Air Cargo transport
Air Cargo transport
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural Networks
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2
 

More from Ahmed Gad

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic Algorithm
Ahmed Gad
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
Ahmed Gad
 
Python for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd EditionPython for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd Edition
Ahmed Gad
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Ahmed Gad
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
Ahmed Gad
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Ahmed Gad
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
Ahmed Gad
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Ahmed Gad
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with Regularization
Ahmed Gad
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Ahmed Gad
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
Ahmed Gad
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Ahmed Gad
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and Gradient
Ahmed Gad
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - Revision
Ahmed Gad
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Ahmed Gad
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNs
Ahmed Gad
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by Example
Ahmed Gad
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
Ahmed Gad
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
Ahmed Gad
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Ahmed Gad
 

More from Ahmed Gad (20)

ICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic AlgorithmICEIT'20 Cython for Speeding-up Genetic Algorithm
ICEIT'20 Cython for Speeding-up Genetic Algorithm
 
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
NumPyCNNAndroid: A Library for Straightforward Implementation of Convolutiona...
 
Python for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd EditionPython for Computer Vision - Revision 2nd Edition
Python for Computer Vision - Revision 2nd Edition
 
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
Multi-Objective Optimization using Non-Dominated Sorting Genetic Algorithm wi...
 
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded ScenesM.Sc. Thesis - Automatic People Counting in Crowded Scenes
M.Sc. Thesis - Automatic People Counting in Crowded Scenes
 
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...Derivation of Convolutional Neural Network from Fully Connected Network Step-...
Derivation of Convolutional Neural Network from Fully Connected Network Step-...
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
 
Avoid Overfitting with Regularization
Avoid Overfitting with RegularizationAvoid Overfitting with Regularization
Avoid Overfitting with Regularization
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step Example
 
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression AnalysisICCES 2017 - Crowd Density Estimation Method using Regression Analysis
ICCES 2017 - Crowd Density Estimation Method using Regression Analysis
 
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-StepBackpropagation: Understanding How to Update ANNs Weights Step-by-Step
Backpropagation: Understanding How to Update ANNs Weights Step-by-Step
 
Computer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and GradientComputer Vision: Correlation, Convolution, and Gradient
Computer Vision: Correlation, Convolution, and Gradient
 
Python for Computer Vision - Revision
Python for Computer Vision - RevisionPython for Computer Vision - Revision
Python for Computer Vision - Revision
 
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia CourseAnime Studio Pro 10 Tutorial as Part of Multimedia Course
Anime Studio Pro 10 Tutorial as Part of Multimedia Course
 
Brief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNsBrief Introduction to Deep Learning + Solving XOR using ANNs
Brief Introduction to Deep Learning + Solving XOR using ANNs
 
Operations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by ExampleOperations in Digital Image Processing + Convolution by Example
Operations in Digital Image Processing + Convolution by Example
 
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and TrackingMATLAB Code + Description : Real-Time Object Motion Detection and Tracking
MATLAB Code + Description : Real-Time Object Motion Detection and Tracking
 
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...MATLAB Code + Description : Very Simple Automatic English Optical Character R...
MATLAB Code + Description : Very Simple Automatic English Optical Character R...
 
Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...Graduation Project - Face Login : A Robust Face Identification System for Sec...
Graduation Project - Face Login : A Robust Face Identification System for Sec...
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 

Artificial Intelligence Game Search by Examples

  • 1. AI Game Search MENOUFIA UNIVERSITY FACULTY OF COMPUTERS AND INFORMATION ALL DEPARTMENTS ARTIFICIAL INTELLIGENCE ‫المنوفية‬ ‫جامعة‬ ‫والمعلومات‬ ‫الحاسبات‬ ‫كلية‬ ‫األقسام‬ ‫جميع‬ ‫الذكاء‬‫اإلصطناعي‬ ‫المنوفية‬ ‫جامعة‬ Ahmed Fawzy Gad ahmed.fawzy@ci.menofia.edu.eg
  • 4. Minimax Game Search Two Players take turns: Max and Min
  • 5. Minimax Game Search Two Players take turns: Max and Min Max : Maximizes Score. Min : Minimizes Score. MAX
  • 6. Minimax Game Search Two Players take turns: Max and MinMAX MIN
  • 7. Minimax Game Search Two Players take turns: Max and Min Max : Maximizes Score. Min : Minimizes Score. MAX MIN
  • 8. Minimax Game Search Two Players take turns: Max and Min Max : Maximizes Score. Min : Minimizes Score. Special Case. Max is an expert. Min is a beginner. MAX MIN
  • 10. Minimax Game Search Which node to follow? No heuristic values. A B C
  • 11. Minimax Game Search Which node to follow? No heuristic values. A B C
  • 12. Minimax Game Search Which node to follow? No heuristic values. A B C Hot to find heuristic values for other nodes?
  • 13. Minimax Game Search Which node to follow? No heuristic values. A B C Hot to find heuristic values for other nodes? Use children heuristics to calculate parent heuristic.
  • 14. Minimax Game Search Which node to follow? No heuristic values. A B C Hot to find heuristic values for other nodes? Use children heuristics to calculate parent heuristic. Minimax Game Search Steps
  • 15. Minimax Game Search Which node to follow? No heuristic values. A B C Hot to find heuristic values for other nodes? Use children heuristics to calculate parent heuristic. Minimax Game Search Steps Calculate Heuristics
  • 16. Minimax Game Search Which node to follow? No heuristic values. A B C Hot to find heuristic values for other nodes? Use children heuristics to calculate parent heuristic. Minimax Game Search Steps Calculate Heuristics Search
  • 17. Phase 1 : Heuristic Value Calculation Depth-First Search A
  • 18. Phase 1 : Heuristic Value Calculation Depth-First Search A B
  • 19. Phase 1 : Heuristic Value Calculation Depth-First Search A B C
  • 20. Phase 1 : Heuristic Value Calculation Depth-First Search A B CB C
  • 21. Phase 1 : Heuristic Value Calculation Depth-First Search A B B C
  • 22. Phase 1 : Heuristic Value Calculation Depth-First Search A B B C D E B C
  • 23. Phase 1 : Heuristic Value Calculation Depth-First Search A B B C D E B C D E
  • 24. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D C D E B C D E
  • 25. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J B C D E
  • 26. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J B C D E H I J
  • 27. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J B C D E H I J
  • 28. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J
  • 29. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J Max
  • 30. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J Max 5
  • 31. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J Max 5 5
  • 32. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J Max 5 5 5
  • 33. Phase 1 : Heuristic Value Calculation Depth-First Search A B B D H I C D E J 3 -2 5 B C D E H I J Max 5 5 5 5
  • 34. Phase 1 : Heuristic Value Calculation Depth-First Search A B B C D E B C D E5 5
  • 35. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E C D E B C D E5 5
  • 36. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M B C D E5 5
  • 37. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M B C D E K L M 5 5
  • 38. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M 5 5
  • 39. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 5 5
  • 40. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 5 5
  • 41. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 5 5
  • 42. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 75 5
  • 43. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 7 Min 5 75
  • 44. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 7 Min5 55 75
  • 45. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 7 Min5 5 55 75
  • 46. Phase 1 : Heuristic Value Calculation Depth-First Search A B B E K L C D E M 7 0 3 B C D E K L M Max 7 7 7 Min5 5 55 7 5 5
  • 47. Phase 1 : Heuristic Value Calculation Depth-First Search A B CB C5 7 5 5
  • 48. Phase 1 : Heuristic Value Calculation Depth-First Search A B C CB C5 7 5 5
  • 49. Phase 1 : Heuristic Value Calculation Depth-First Search A B C C F G B C5 7 5 5
  • 50. Phase 1 : Heuristic Value Calculation Depth-First Search A B C C F G B C5 F G 7 5 5
  • 51. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F C F G B C5 F G 7 5 5
  • 52. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P B C5 F G 7 5 5
  • 53. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P B C N O P 5 F G 7 5 5
  • 54. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P 5 F G 7 5 5
  • 55. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P Max 5 F G 7 5 5
  • 56. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P Max 4 5 F G 7 5 5
  • 57. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P Max 4 5 4 F G 7 5 5
  • 58. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P Max 4 5 4 F G4 7 5 5
  • 59. Phase 1 : Heuristic Value Calculation Depth-First Search A B C F N O C F G P 0 -5 4 B C N O P Max 4 5 4 F G4 47 5 5
  • 60. Phase 1 : Heuristic Value Calculation Depth-First Search A B C C F G B C5 F G4 47 5 5
  • 61. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G C F G B C5 F G4 47 5 5
  • 62. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S B C5 F G4 47 5 5
  • 63. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S B C Q R S 5 F G4 47 5 5
  • 64. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S 5 F G4 47 5 5
  • 65. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 5 F G4 47 5 5
  • 66. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 F G4 47 5 5
  • 67. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 47 5 5
  • 68. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 47 5 5
  • 69. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min 847 5 5
  • 70. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 847 5 5
  • 71. Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 847 5 5 4
  • 72. Max Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 847 5 5 4
  • 73. Max Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 5 8 4 47 5 5
  • 74. Max Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 5 5 8 4 47 5 5
  • 75. Max Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 5 5 8 4 5 47 5 5
  • 76. Max Phase 1 : Heuristic Value Calculation Depth-First Search A B C G Q R C F G S -6 8 2 B C Q R S Max 8 5 8 F G4 8 Min4 4 4 5 5 8 4 5 47 5 5 If both players play optimally then Max will win by a score 5.
  • 77. Game Tree After Heuristic Value Calculation 8 4 5 47 5 5
  • 78. Phase 2 : Game Search 8 4 5 47 5 5
  • 79. Phase 2 : Game Search 8 4 5 47 5 5 A
  • 80. Phase 2 : Game Search 8 4 5 47 5 5 BMax A
  • 81. Phase 2 : Game Search 8 4 5 47 5 5 B D Max A Min
  • 82. Phase 2 : Game Search 8 4 5 47 5 5 B D J Max Min Max A
  • 83. Minimax Game Search Drawback • Expands all the tree while not all expanded nodes are useful.
  • 84. Minimax Game Search Drawback • Expands all the tree while not all expanded nodes are useful. • In this example, just few nodes of the whole tree was useful in reaching the goal.
  • 86. Alpha-Beta Pruning = Minimax Except • This game search strategy is a modification to Minimax game search that avoids exploring nodes that are not useful in the search. • It gives the same results as Minimax but avoids exploring some nodes. • In the previous example, the path explored using Minimax was A-B-D- J. • Also the Alpha-Beta Pruning path will be A-B-D-J but without exploring all nodes as in Minimax.
  • 87. Alpha-Beta Pruning Motivation Never explore values that are not useful. =Min(Max(1, 2, 5), Max(6, x, y), Max(1, 3, 4)) =Min(5, Max(6, x, y), 4) =Min(Max(6, x, y), 4) =4
  • 112. Alpha-Beta Game Search 7 5 5 5 4 4 Same results as Minimax with fewer nodes explored. 5 Unexplored Branches.