SlideShare une entreprise Scribd logo
1  sur  73
Games Chapter 6 Dr. Mustafa Jarrar University of Birzeit [email_address] www.jarrar.info   Lecture Notes,  Advanced Artificial Intelligence (SCOM7341)  University of Birzeit 2 nd  Semester, 2011 Advanced Artificial Intelligence  (SCOM7341)
Can you plan ahead with these games
Game Tree (2-player, deterministic, turns) Calculated by utility function, depends on the game. Last state, game is over
Two-Person Perfect Information Deterministic Game Your Moves My Moves My Moves Your Moves Your Moves My Moves My Moves My Moves ,[object Object],[object Object],[object Object],[object Object]
Computer Games ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Minimax ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Minimax Tree Max Min Max Min
Minimax Tree Evaluation ,[object Object],[object Object],[object Object],[object Object]
Minimax Tree Max Min Max Min 100 -24 -8 -14 -73 -100 -5 -70 -12 -3 70 4 12 -3 21 28 23 ,[object Object],[object Object]
Minimax Tree Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Minimax Tree -24 -8 -14 -73 -100 -5 -70 -12 -3 70 4 12 -3 21 28 23 Max Min Max Min ,[object Object]
Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -3 70 4 12 -3 21 28 23 28 -3 12 70 -3 -73 -14 -8 Max Min Max Min ,[object Object]
Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 Max Min Max Min
Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 -3 Max Min Max Min
Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 -3 Max Min Max Min The best next  move for Max
MiniMax Example-2 ,[object Object],4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 Max Max Min Min
MiniMax Example-2 ,[object Object],4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 Max Max Min Min
MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 Max Max Min Min
MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 5 3 4 Max Max Min Min
MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 5 3 4 5 Max Max Min Min
MiniMax Example-2 ,[object Object],Max Max Min Min 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 5 3 4 5
Properties of minimax ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pruning the Minimax Tree ,[object Object],[object Object],[object Object],[object Object]
   Cut Example 100 21 -3 12 70 -4 -73 -14 -3 -4 -3 -73 Max Max Min
   Cut Example ,[object Object],100 21 -3 12 -70 -4 -73 -14 Max Max Min
   Cut Example ,[object Object],[object Object],100 21 -3 12 -70 -4 -73 -14 21 Max Max Min
   Cut Example ,[object Object],[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 Max Max Min
   Cut Example ,[object Object],[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 12 Max Max Min
   Cut Example ,[object Object],[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 -70 Max Max Min
   Cut Example ,[object Object],[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 -70 Max Max Min
   Cut Example ,[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 -70 -73 Max Max Min
   Cut Example ,[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 -70 -73 Max Max Min
   Cut Example ,[object Object],100 21 -3 12 -70 -4 -73 -14 -3 -3 -70 -73 Max Max Min
   Cuts ,[object Object],[object Object]
   Cut Example ,[object Object],100 21 -3 12 70 -4 73 -14 Min Min Max 21 21 70 73
Alpha-Beta Example 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[-∞, +∞] [-∞, +∞] ,[object Object],[object Object],Max Min
Alpha-Beta Example 2 Max Min [-∞, 7] [-∞, +∞] ,[object Object],[object Object],7
Alpha-Beta Example 2 Max Min [-∞, 6] [-∞, +∞] ,[object Object],[object Object],7 6
Alpha-Beta Example 2 Max Min 5 [5, +∞] ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[object Object]
Alpha-Beta Example 2 Max Min [-∞, 5] [5, +∞] ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[object Object],[-∞,3] 3
Alpha-Beta Example 2 Max Min [-∞, 5] [5, +∞] ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[-∞,3] 3
Alpha-Beta Example 2 Max Min [-∞, 5] [5, +∞] ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[-∞,3] 3 [-∞,6] 6
Alpha-Beta Example 2 Max Min [-∞, 5] [5, +∞] ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[-∞,3] 3 [-∞,5] 6 5
Alpha-Beta Example 2 Max Min [-∞, 5] 5 ,[object Object],[object Object],7 6 5 ,[object Object],[object Object],[object Object],[-∞,3] 3 [-∞,5] 6 5
Exercise  max min max min
Exercise (Solution)  max min max min 10 9 14 2 4 10 14 4 10 4 10
 -   Pruning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 -   Pruning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pruning at MAX node ,[object Object],[object Object],[object Object]
Pruning at MIN node ,[object Object],[object Object],[object Object]
Idea of   -   Pruning ,[object Object],[object Object],100 21 -3 12 70 -4 21 21 70
Why is it called α-β? ,[object Object],[object Object],[object Object],[object Object]
Imperfect Decisions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Utility Evaluation Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Utility Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Utility Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evaluation Functions ,[object Object],[object Object],[object Object]
Evaluation Functions for Ordering ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]
Example: Tic-Tac-Toe  (evaluation function) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tic-Tac-Toe 1-Ply E(s12) 8 - 6 = 2 E(s13) 8 - 5 = 3 E(s14) 8 - 6 = 2 E(s15) 8 - 4 = 4 E(s16) 8 - 6 = 2 E(s17) 8 - 5 = 3 E(s18) 8 - 6 = 2 E(s19) 8 - 5 = 3 X X X X X X X X X E(s11) 8 - 5 = 3 E(s0) = Max{E(s11), E(s1n)} = Max{2,3,4} = 4
Tic-Tac-Toe 2-Ply E(s2:16) 5 - 6 = -1 E(s2:15) 5 -6 = -1 E(s28) 5 - 5 = 0 E(s27) 6 - 5 = 1 E(s2:48) 5 - 4 = 1 E(s2:47) 6 - 4 = 2 E(s2:13) 5 - 6 = -1 E(s2:9) 5 - 6 = -1 E(s2:10) 5 -6 = -1 E(s2:11) 5 - 6 = -1 E(s2:12) 5 - 6 = -1 E(s2:14) 5 - 6 = -1 E(s25) 6 - 5 = 1 E(s21) 6 - 5 = 1 E(s22) 5 - 5 = 0 E(s23) 6 - 5 = 1 E(s24) 4 - 5 = -1 E(s26) 5 - 5 = 0 E(s1:6) 8 - 6 = 2 E(s1:7) 8 - 5 = 3 E(s1:8) 8 - 6 = 2 E(s1:9) 8 - 5 = 3 E(s1:5) 8 - 4 = 4 E(s1:3) 8 - 5 = 3 E(s1:2) 8 - 6 = 2 E(s1:1) 8 - 5 = 3 E(s2:45) 6 - 4 = 2 X X X X X X X X X E(s1:4) 8 - 6 = 2 X O X O X O E(s2:41) 5 - 4 = 1 E(s2:42) 6 - 4 = 2 E(s2:43) 5 - 4 = 1 E(s2:44) 6 - 4 = 2 E(s2:46) 5 - 4 = 1 O X O X O X O X X O X O X O X O X X O X O O X X O X O X O X O X O X O X O X O X O O E(s0) = Max{E(s11), E(s1n)} = Max{2,3,4} = 4
Checkers Case Study 31 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23
Checkers MiniMax Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 27 16 -> 11 31 -> 27 31 -> 24 22 -> 13 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -8 -8 1 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23
Checkers Alpha-Beta Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 27 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23 ,[object Object],[object Object],MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -4 -8 1
Checkers Alpha-Beta Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 27 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23 ,[object Object],[object Object],MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -4 -8 1
Checkers Alpha-Beta Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     1  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -4 -8 1
Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     1 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     1  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     1 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 13 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     0 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     -4  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
Checkers Alpha-Beta Example 22 -> 31 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23    1     -8 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1

Contenu connexe

Similaire à Jarrar.lecture notes.aai.2011s.ch6.games

Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxPriyadharshiniG41
 
AI subject - Game Theory and cps ppt pptx
AI subject  - Game Theory and cps ppt pptxAI subject  - Game Theory and cps ppt pptx
AI subject - Game Theory and cps ppt pptxnizmishaik1
 
cs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.pptcs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.pptSamiksha880257
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AIvikas dhakane
 
12 adversal search
12 adversal search12 adversal search
12 adversal searchTianlu Wang
 
Juegos minimax AlfaBeta
Juegos minimax AlfaBetaJuegos minimax AlfaBeta
Juegos minimax AlfaBetanelsonbc20
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchDheerendra k
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptxumairshams6
 
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppthanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.pptssuser148ae0
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCEudayvanand
 
ch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.pptch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.pptSanGeet25
 
Game Theory Operation Research
Game Theory Operation ResearchGame Theory Operation Research
Game Theory Operation ResearchR A Shah
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptganesh15478
 

Similaire à Jarrar.lecture notes.aai.2011s.ch6.games (20)

Jarrar: Games
Jarrar: GamesJarrar: Games
Jarrar: Games
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptx
 
AI subject - Game Theory and cps ppt pptx
AI subject  - Game Theory and cps ppt pptxAI subject  - Game Theory and cps ppt pptx
AI subject - Game Theory and cps ppt pptx
 
cs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.pptcs-171-07-Games and Adversarila Search.ppt
cs-171-07-Games and Adversarila Search.ppt
 
AI_unit3.pptx
AI_unit3.pptxAI_unit3.pptx
AI_unit3.pptx
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
12 adversal search
12 adversal search12 adversal search
12 adversal search
 
Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1
 
1.game
1.game1.game
1.game
 
AI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptxAI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptx
 
Juegos minimax AlfaBeta
Juegos minimax AlfaBetaJuegos minimax AlfaBeta
Juegos minimax AlfaBeta
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Minimax Algorithm
Minimax AlgorithmMinimax Algorithm
Minimax Algorithm
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx
 
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppthanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
ch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.pptch_5 Game playing Min max and Alpha Beta pruning.ppt
ch_5 Game playing Min max and Alpha Beta pruning.ppt
 
Game Theory Operation Research
Game Theory Operation ResearchGame Theory Operation Research
Game Theory Operation Research
 
Data analytics concepts
Data analytics conceptsData analytics concepts
Data analytics concepts
 
Unit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).pptUnit_I_Introduction(Part_III).ppt
Unit_I_Introduction(Part_III).ppt
 

Plus de PalGov

Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferencePalGov
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsPalGov
 
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudyJarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudyPalGov
 
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologiesJarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologiesPalGov
 
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulationJarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulationPalGov
 
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontologyJarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontologyPalGov
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicPalGov
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferencePalGov
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionPalGov
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicPalGov
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchPalGov
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchPalGov
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsPalGov
 

Plus de PalGov (13)

Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
 
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudyJarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
Jarrar.lecture notes.aai.2011s.ontology part5_egovernmentcasestudy
 
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologiesJarrar.lecture notes.aai.2011s.ontology part4_methodologies
Jarrar.lecture notes.aai.2011s.ontology part4_methodologies
 
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulationJarrar.lecture notes.aai.2011s.ontology part3_double-articulation
Jarrar.lecture notes.aai.2011s.ontology part3_double-articulation
 
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontologyJarrar.lecture notes.aai.2011s.ontology part2_whatisontology
Jarrar.lecture notes.aai.2011s.ontology part2_whatisontology
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogic
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagentsJarrar.lecture notes.aai.2011s.ch2.intelligentagents
Jarrar.lecture notes.aai.2011s.ch2.intelligentagents
 

Dernier

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Dernier (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Jarrar.lecture notes.aai.2011s.ch6.games

  • 1. Games Chapter 6 Dr. Mustafa Jarrar University of Birzeit [email_address] www.jarrar.info Lecture Notes, Advanced Artificial Intelligence (SCOM7341) University of Birzeit 2 nd Semester, 2011 Advanced Artificial Intelligence (SCOM7341)
  • 2. Can you plan ahead with these games
  • 3. Game Tree (2-player, deterministic, turns) Calculated by utility function, depends on the game. Last state, game is over
  • 4.
  • 5.
  • 6.
  • 7. Minimax Tree Max Min Max Min
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 Max Min Max Min
  • 14. Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 -3 Max Min Max Min
  • 15. Minimax Tree 100 -24 -8 -14 -73 -100 -5 -70 -12 -4 70 4 12 -3 21 28 23 21 -3 12 70 -4 -73 -14 -8 -3 -4 -73 -3 Max Min Max Min The best next move for Max
  • 16.
  • 17.
  • 18. MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 Max Max Min Min
  • 19. MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 5 3 4 Max Max Min Min
  • 20. MiniMax Example-2 4 7 9 6 9 8 8 5 6 7 5 2 3 2 5 4 9 3 4 7 6 2 6 3 4 5 1 2 5 4 1 2 6 3 4 3 7 6 5 5 6 4 5 3 4 5 Max Max Min Min
  • 21.
  • 22.
  • 23.
  • 24. Cut Example 100 21 -3 12 70 -4 -73 -14 -3 -4 -3 -73 Max Max Min
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Exercise max min max min
  • 46. Exercise (Solution) max min max min 10 9 14 2 4 10 14 4 10 4 10
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61. Tic-Tac-Toe 1-Ply E(s12) 8 - 6 = 2 E(s13) 8 - 5 = 3 E(s14) 8 - 6 = 2 E(s15) 8 - 4 = 4 E(s16) 8 - 6 = 2 E(s17) 8 - 5 = 3 E(s18) 8 - 6 = 2 E(s19) 8 - 5 = 3 X X X X X X X X X E(s11) 8 - 5 = 3 E(s0) = Max{E(s11), E(s1n)} = Max{2,3,4} = 4
  • 62. Tic-Tac-Toe 2-Ply E(s2:16) 5 - 6 = -1 E(s2:15) 5 -6 = -1 E(s28) 5 - 5 = 0 E(s27) 6 - 5 = 1 E(s2:48) 5 - 4 = 1 E(s2:47) 6 - 4 = 2 E(s2:13) 5 - 6 = -1 E(s2:9) 5 - 6 = -1 E(s2:10) 5 -6 = -1 E(s2:11) 5 - 6 = -1 E(s2:12) 5 - 6 = -1 E(s2:14) 5 - 6 = -1 E(s25) 6 - 5 = 1 E(s21) 6 - 5 = 1 E(s22) 5 - 5 = 0 E(s23) 6 - 5 = 1 E(s24) 4 - 5 = -1 E(s26) 5 - 5 = 0 E(s1:6) 8 - 6 = 2 E(s1:7) 8 - 5 = 3 E(s1:8) 8 - 6 = 2 E(s1:9) 8 - 5 = 3 E(s1:5) 8 - 4 = 4 E(s1:3) 8 - 5 = 3 E(s1:2) 8 - 6 = 2 E(s1:1) 8 - 5 = 3 E(s2:45) 6 - 4 = 2 X X X X X X X X X E(s1:4) 8 - 6 = 2 X O X O X O E(s2:41) 5 - 4 = 1 E(s2:42) 6 - 4 = 2 E(s2:43) 5 - 4 = 1 E(s2:44) 6 - 4 = 2 E(s2:46) 5 - 4 = 1 O X O X O X O X X O X O X O X O X X O X O O X X O X O X O X O X O X O X O X O X O O E(s0) = Max{E(s11), E(s1n)} = Max{2,3,4} = 4
  • 63.
  • 64. Checkers MiniMax Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 27 16 -> 11 31 -> 27 31 -> 24 22 -> 13 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -8 -8 1 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23
  • 65.
  • 66.
  • 67. Checkers Alpha-Beta Example 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  1  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1 0 -4 -8 1
  • 68. Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  1 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
  • 69. Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  1  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
  • 70. Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  1 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
  • 71. Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 13 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  0 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
  • 72. Checkers Alpha-Beta Example 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 22 -> 31 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  -4  cutoff : no need to examine further branches MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1
  • 73. Checkers Alpha-Beta Example 22 -> 31 1 0 -4 -8 20 -> 16 21 -> 17 31 -> 26 31 -> 27 22 -> 17 22 -> 18 22 -> 25 22 -> 26 23 -> 26 23 -> 27 21 -> 14 16 -> 11 31 -> 27 16 -> 11 31 -> 27 31 -> 22 16 -> 11 31 -> 27 31 -> 24 22 -> 18 23 -> 30 23 -> 32 20 -> 16 31 -> 27 31 -> 26 21 -> 17 20 -> 16 21 -> 17 20 -> 16 20 -> 16 21 -> 17 31 1 2 3 4 8 6 5 9 10 11 12 16 14 13 17 18 19 20 24 22 21 25 26 27 28 32 30 29 7 15 23  1  -8 MAX MAX MIN 1 1 1 1 1 2 2 6 6 1 1 1 1 1 1 1 1 1 1 1 1 6 6 0 0 0 0 -4 -4 -4 -8 -8 -8 -8 -8 -8 1