SlideShare a Scribd company logo
1 of 29
Download to read offline
Adversarial Search
Chapter 12.
2
Two-Agent Games (1)
 Idealized Setting
– The actions of the agents are interleaved.
 Example
– Grid-Space World
– Two robots : “Black” and “White”
– Goal of Robots
 White : to be in the same cell with Black
 Black : to prevent this from happening
– After settling on a first move, the agent makes the
move, senses what the other agent does, and then
repeats the planning process in sense/plan/act
fashion.
3
4
Two-Agent Games (2)
 Two-agent, perfect information, zero-sum games
 Two agents move in turn until either one of them wins
or the result is a draw.
 Each player has a complete model of the environment
and of its own and the other’s possible actions and
their effects.
5
Minimax Procedure (1)
 Two player : MAX and MIN
 Task : find a “best” move for MAX
 Assume that MAX moves first, and that the two
players move alternately.
 MAX node
– nodes at even-numbered depths correspond to
positions in which it is MAX’s move next
 MIN node
– nodes at odd-numbered depths correspond to
positions in which it is MIN’s move next
6
Minimax Procedure (2)
 Complete search of most game graphs is impossible.
– For Chess, 1040 nodes
 1022 centuries to generate the complete search graph,
assuming that a successor could be generated in 1/3 of a
nanosecond
 The universe is estimated to be on the order of 108 centuries
old.
– Heuristic search techniques do not reduce the effective
branching factor sufficiently to be of much help.
 Can use either breadth-first, depth-first, or heuristic
methods, except that the termination conditions must be
modified.
7
Minimax Procedure (3)
 Estimate of the best-first move
– apply a static evaluation function to the leaf nodes
– measure the “worth” of the leaf nodes.
– The measurement is based on various features thought to
influence this worth.
– Usually, analyze game trees to adopt the convention
 game positions favorable to MAX cause the evaluation function
to have a positive value
 positions favorable to MIN cause the evaluation function to have
negative value
 Values near zero correspond to game positions not particularly
favorable to either MAX or MIN.
8
Minimax Procedure (4)
 Good first move extracted
– Assume that MAX were to choose among the tip
nodes of a search tree, he would prefer that node
having the largest evaluation.
 The backed-up value of a MAX node parent of MIN tip
nodes is equal to the maximum of the static evaluations
of the tip nodes.
– MIN would choose that node having the smallest
evaluation.
9
Minimax Procedure (5)
 After the parents of all tip nods have been assigned
backed-up values, we back up values another level.
– MAX would choose that successor MIN node with the
largest backed-up value
– MIN would choose that successor MAX node with the
smallest backed-up value.
– Continue to back up values, level by level from the
leaves, until the successors of the start node are
assigned backed-up values.
10
Example : Tic-Tac-Toe (1)
 MAX marks crosses and MIN marks circles and it is
MAX’s turn to play first.
– With a depth bound of 2, conduct a breadth-first search
– evaluation function e(p) of a position p
 If p is not a winning for either player,
e(p) = (no. of complete rows, columns, or diagonals that are
still open for MAX) - (no. of complete rows, columns, or
diagonals that are still open for MIN)
 If p is a win of MAX, e(p) = 
 If p is a win of MIN, e(p) = - 
11
Example : Tic-Tac-Toe (2)
 First move
12
Example : Tic-Tac-Toe (3)
13
Example : Tic-Tac-Toe (4)
14
Question?
 How to improve search
efficiency?
 It is possible to cut-off some
unnecessary subtrees?
15
The Alpha-Beta Procedure (1)
 Only after tree generation is
completed does position
evaluation begin  inefficient
 Remarkable reductions in the
amount of search needed are
possible if perform tip-node
evaluations and calculate
backed-up values
simultaneously with tree
generation.
 After the node marked A is
generated and evaluated,
there is no point in generating
nodes B, C, and D.
16
The Alpha-Beta Procedure (2)
 Alpha value
– depending on the backed-up values of the other
successors of the start node, the final backed-up value of
the start node may be greater than -1, but it cannot be
less
 Beta value
– depending on the static values of the rest of node
successors, the final backed-up value of node can be
less than -1, but it cannot be greater
 Note
– The alpha values of MAX nodes can never decrease.
– The beta values of MIN nodes can never increase.
17
The Alpha-Beta Procedure (3)
 Rules for discontinuing the search
1. Search can be discontinued below any MIN node having a
beta value less than or equal to the alpha value of any of
its MAX node ancestors. The final backed-up value of this
MIN node can be set to its beta value.
2. Search can be discontinued below any MAX node having
an alpha value greater than or equal to the beta value of
any of its MIN node ancestors. The final backed-up value of
this MAX node can be set to its alpha value.
18
The Alpha-Beta Procedure (4)
 How to compute alpha and beta values
– The alpha value of a MAX node is set equal to the current
largest final backed-up value of its successors.
– The beta value of a MIN node is set equal to the current
smallest final backed-up value of its successors.
 Cut-off
– Alpha cut-off
– Beta cut-off
 Alpha-Beta Procedure
– The whole process of keeping track of alpha and beta values
and making cut-offs when possible
19
 Pseudocode
1. If n at depth bound, return AB(n) = static evaluation of n,
otherwise, let be the successors of n (in order), set
and, if n is a MAX node, go to step 2; else go to step
The Alpha-Beta Procedure (5)
( ; , )AB n  
1,..., ,...,k bn n n
1k  '
2
2. Set ,
3. If , return ;
else continue.
4. If , return ;
else proceed to ,
i.e. set and go to
step 2
max[ , ( ; , )]AB n   
  
k b 
1kn 
1k k 
2’. Set ,
3’. If , return ;
else continue.
4’. If , return ;
else proceed to ,
i.e. set and go to
step 2’
min[ , ( ; , )]kAB n   
  
k b 
1kn 
1k k 
20
An Example
2.steptogo
and1seti.e.,
toproceedelse;returnIf4.
continue.else;return,If3.
)],,AB(n;,max[Set2.
2'.steptogoelse2;steptogonode,MAXaisnifand,1set
order),(inofsuccesorsthebe,,,,letOtherwise,
n,ofevaluationstaticAB(n)returnbound,depthatnif1.
),;(
1
1






 kkn
b,k
k
nnnn
nAB
k
bk





21
22
Search Efficiency (1)
 Notation
– b : depth of tree
– d : number of successors of every node (except a tip
node)
– bd : number of tip nodes
– Suppose that an alpha-beta procedure generated
successors in the order of their true backed-up values.
 This order maximizes the number of cut-offs that will
minimizes the number of tip nodes generated.
 Nd : this minimal number of tip nodes
23
Search Efficiency (2)
 [Slager & Dixon 1969, Knuth & Moore 1975]
– The number of tip nodes of depth d that would be generated by
optimal alpha-beta search is about the same as the number of tip
nodes that would have been generated at depth d / 2 without
alpha-beta.
– Alpha-beta, with perfect ordering, reduces the effective branching
factor from b to approximately .
 [Pearl 1982]
– The average branching factor is reduced to
approximately .





 
dbb
db
N dd
d
d
oddfor1
evenfor12
2/)1(2/)1(
2/
b
4 3
b
24
Other Important Matters (1)
 Various Difficulties
– Search might end at a position in which MAX (or MIN)
is able to make a great move.
– Make sure that a position is quiescent before ending
search at that position.
– Quiescent position
 Its static value is not much different from what its backed-
up value would be by looking a move or two ahead.
25
Other Important Matters (2)
 Horizon Effect
– There can be situations in which disaster or success
lurks just beyond the search horizon.
 Both minimax and alpha-beta extension assume that
the opposing player will always make its best move.
– There are occasions in which this assumption is
inappropriate.
– Minimax would be inappropriate if one player had
some kind of model of the other player’s strategy.
26
Games of Chance (1)
 Backgammon(西洋双陆棋)
– MAX’s and MIN’s turns now each involve a throw of the die.
– Imagine that at each dice throw, a fictitious third player, DICE, makes
a move.
27
Games of Chance (2)
 Expectimaxing
– Back up the expected (average) values of the values of the
successors instead of a maximum or minimum.
– Back up the minimum value of the values of successors of nodes
for which it is MIN’s move, the maximum value of the values of
successors of nodes for which it is MAX’s move, and the
expected value of the values of successors of nodes for which it
is the DICE’s move.
 Introducing a chance move often makes the game tree branch
too much for effective searching.
– Important to have a good static evaluation function
28
Learning Evaluation Functions (1)
 TD-GAMMON
– play Backgammon by training
a layered, feedforward neural
network
– overall value of a board
position
 v = p1 + 2p2 - p3 -2p4
29
Learning Evaluation Functions (2)
 Temporal difference training of the network
– accomplished during actual play
– vt+1 : the estimate at time t + 1
– Wt : vector of all weights at time t
– Training method have been performed by having the
network play many hundreds of thousands of games
against itself.
– Performance of a well-trained network is at or near
championship level.
W
W


 
t
ttt
v
vvc )( 1

More Related Content

What's hot

Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Alp Çoker
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligencelordmwesh
 
Project on ai gaming
Project on ai gamingProject on ai gaming
Project on ai gamingRoshan Panday
 
Game playing in artificial intelligent technique
Game playing in artificial intelligent technique Game playing in artificial intelligent technique
Game playing in artificial intelligent technique syeda zoya mehdi
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceAltafur Rahman
 
Battle dashboard tutorial
Battle dashboard tutorial Battle dashboard tutorial
Battle dashboard tutorial chaosof ragnarok
 
Fun Getting into Trouble
Fun Getting into TroubleFun Getting into Trouble
Fun Getting into TroubleLorisha Riley
 
Better Chess through Genetic Programming
Better Chess through Genetic ProgrammingBetter Chess through Genetic Programming
Better Chess through Genetic Programmingcaswenson
 
How DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoHow DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoTim Riser
 
Robust Price of Anarchy
Robust Price of AnarchyRobust Price of Anarchy
Robust Price of Anarchy鴻鈞 王
 
Badiya haihn
Badiya haihnBadiya haihn
Badiya haihnamitp26
 

What's hot (20)

Min-Max algorithm
Min-Max algorithmMin-Max algorithm
Min-Max algorithm
 
Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )
 
Minimax
MinimaxMinimax
Minimax
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI Lesson 07
AI Lesson 07AI Lesson 07
AI Lesson 07
 
Two player games
Two player gamesTwo player games
Two player games
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Games.4
Games.4Games.4
Games.4
 
Project on ai gaming
Project on ai gamingProject on ai gaming
Project on ai gaming
 
Game playing in artificial intelligent technique
Game playing in artificial intelligent technique Game playing in artificial intelligent technique
Game playing in artificial intelligent technique
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Battle dashboard tutorial
Battle dashboard tutorial Battle dashboard tutorial
Battle dashboard tutorial
 
Fun Getting into Trouble
Fun Getting into TroubleFun Getting into Trouble
Fun Getting into Trouble
 
Game Playing
Game Playing Game Playing
Game Playing
 
Better Chess through Genetic Programming
Better Chess through Genetic ProgrammingBetter Chess through Genetic Programming
Better Chess through Genetic Programming
 
How DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoHow DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of Go
 
Robust Price of Anarchy
Robust Price of AnarchyRobust Price of Anarchy
Robust Price of Anarchy
 
Computer Chess 2004
Computer Chess 2004Computer Chess 2004
Computer Chess 2004
 
Badiya haihn
Badiya haihnBadiya haihn
Badiya haihn
 
Learning Through Gaming
Learning Through GamingLearning Through Gaming
Learning Through Gaming
 

Viewers also liked

Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruningHema Kashyap
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsArtifacia
 
Stochastic Variational Inference
Stochastic Variational InferenceStochastic Variational Inference
Stochastic Variational InferenceKaede Hayashi
 
Artificial Intelligence in Computer and Video Games
Artificial Intelligence in Computer and Video GamesArtificial Intelligence in Computer and Video Games
Artificial Intelligence in Computer and Video GamesLuke Dicken
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks남주 김
 
Branch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsBranch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsChamin Nalinda Loku Gam Hewage
 

Viewers also liked (13)

Alpha beta pruning
Alpha beta pruningAlpha beta pruning
Alpha beta pruning
 
Alpha beta prouning
Alpha beta prouningAlpha beta prouning
Alpha beta prouning
 
Alphabeta
AlphabetaAlphabeta
Alphabeta
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruning
 
Soap xp-wg
Soap xp-wgSoap xp-wg
Soap xp-wg
 
Writing a good cv
Writing a good cvWriting a good cv
Writing a good cv
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their Applications
 
Stochastic Variational Inference
Stochastic Variational InferenceStochastic Variational Inference
Stochastic Variational Inference
 
Fp growth
Fp growthFp growth
Fp growth
 
Artificial Intelligence in Computer and Video Games
Artificial Intelligence in Computer and Video GamesArtificial Intelligence in Computer and Video Games
Artificial Intelligence in Computer and Video Games
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
 
Branch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsBranch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection Algorithms
 

Similar to 12 adversal search

Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxPriyadharshiniG41
 
It is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topicsIt is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topicschougulesup79
 
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
 
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
 
Juegos minimax AlfaBeta
Juegos minimax AlfaBetaJuegos minimax AlfaBeta
Juegos minimax AlfaBetanelsonbc20
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchpramod naik
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.pptVihaanN2
 
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppthanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.pptssuser148ae0
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptxumairshams6
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphSyed Zaid Irshad
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AIvikas dhakane
 

Similar to 12 adversal search (20)

Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1
 
Minmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptxMinmax and alpha beta pruning.pptx
Minmax and alpha beta pruning.pptx
 
Game playing.ppt
Game playing.pptGame playing.ppt
Game playing.ppt
 
It is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topicsIt is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topics
 
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
 
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
 
AI_unit3.pptx
AI_unit3.pptxAI_unit3.pptx
AI_unit3.pptx
 
Chess engine presentation
Chess engine presentationChess engine presentation
Chess engine presentation
 
1.game
1.game1.game
1.game
 
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
 
cai
caicai
cai
 
Juegos minimax AlfaBeta
Juegos minimax AlfaBetaJuegos minimax AlfaBeta
Juegos minimax AlfaBeta
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.ppt
 
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppthanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
hanoosh-tictactoeqqqqqqqaaaaaaaaaaaa.ppt
 
Alpha beta
Alpha betaAlpha beta
Alpha beta
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx
 
AI Lesson 08
AI Lesson 08AI Lesson 08
AI Lesson 08
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graph
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 

More from Tianlu Wang

14 pro resolution
14 pro resolution14 pro resolution
14 pro resolutionTianlu Wang
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculusTianlu Wang
 
11 alternative search
11 alternative search11 alternative search
11 alternative searchTianlu Wang
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculusTianlu Wang
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learningTianlu Wang
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidenceTianlu Wang
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledgeTianlu Wang
 
17 2 expert systems
17 2 expert systems17 2 expert systems
17 2 expert systemsTianlu Wang
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based systemTianlu Wang
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolutionTianlu Wang
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolutionTianlu Wang
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic searchTianlu Wang
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed searchTianlu Wang
 

More from Tianlu Wang (20)

L7 er2
L7 er2L7 er2
L7 er2
 
L8 design1
L8 design1L8 design1
L8 design1
 
L9 design2
L9 design2L9 design2
L9 design2
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculus
 
11 alternative search
11 alternative search11 alternative search
11 alternative search
 
10 2 sum
10 2 sum10 2 sum
10 2 sum
 
22 planning
22 planning22 planning
22 planning
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculus
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learning
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidence
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledge
 
17 2 expert systems
17 2 expert systems17 2 expert systems
17 2 expert systems
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolution
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
15 predicate
15 predicate15 predicate
15 predicate
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed search
 
07 plan agent
07 plan agent07 plan agent
07 plan agent
 

Recently uploaded

Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...akbard9823
 
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...anilsa9823
 
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call Girls
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call GirlsCall Girl Service In Dubai #$# O56521286O #$# Dubai Call Girls
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call Girlsparisharma5056
 
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...akbard9823
 
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...anilsa9823
 
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhi
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | DelhiFULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhi
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhisoniya singh
 
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...akbard9823
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson
 
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...anilsa9823
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboardthephillipta
 
FULL ENJOY - 9953040155 Call Girls in Sector 142 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 142 | NoidaFULL ENJOY - 9953040155 Call Girls in Sector 142 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 142 | NoidaMalviyaNagarCallGirl
 
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...anilsa9823
 
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶delhimunirka444
 
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...hanshkumar9870
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKedwardsara83
 
exhuma plot and synopsis from the exhuma movie.pptx
exhuma plot and synopsis from the exhuma movie.pptxexhuma plot and synopsis from the exhuma movie.pptx
exhuma plot and synopsis from the exhuma movie.pptxKurikulumPenilaian
 
Deconstructing Gendered Language; Feminist World-Making 2024
Deconstructing Gendered Language; Feminist World-Making 2024Deconstructing Gendered Language; Feminist World-Making 2024
Deconstructing Gendered Language; Feminist World-Making 2024samlnance
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...gurkirankumar98700
 
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...anilsa9823
 

Recently uploaded (20)

Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
 
Dubai Call Girl Number # 00971588312479 # Call Girl Number In Dubai # (UAE)
Dubai Call Girl Number # 00971588312479 # Call Girl Number In Dubai # (UAE)Dubai Call Girl Number # 00971588312479 # Call Girl Number In Dubai # (UAE)
Dubai Call Girl Number # 00971588312479 # Call Girl Number In Dubai # (UAE)
 
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...
Lucknow 💋 Female Escorts Service in Lucknow | Service-oriented sexy call girl...
 
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call Girls
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call GirlsCall Girl Service In Dubai #$# O56521286O #$# Dubai Call Girls
Call Girl Service In Dubai #$# O56521286O #$# Dubai Call Girls
 
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
 
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...
Lucknow 💋 Call Girl in Lucknow Phone No 8923113531 Elite Escort Service Avail...
 
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhi
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | DelhiFULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhi
FULL ENJOY - 8264348440 Call Girls in Rohini Sector 22 | Delhi
 
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around Europe
 
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboard
 
FULL ENJOY - 9953040155 Call Girls in Sector 142 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 142 | NoidaFULL ENJOY - 9953040155 Call Girls in Sector 142 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 142 | Noida
 
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...
Lucknow 💋 Russian Call Girls Lucknow - Book 8923113531 Call Girls Available 2...
 
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
(9711106444 )🫦#Sexy Desi Call Girls Noida Sector 4 Escorts Service Delhi 🫶
 
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
 
exhuma plot and synopsis from the exhuma movie.pptx
exhuma plot and synopsis from the exhuma movie.pptxexhuma plot and synopsis from the exhuma movie.pptx
exhuma plot and synopsis from the exhuma movie.pptx
 
Deconstructing Gendered Language; Feminist World-Making 2024
Deconstructing Gendered Language; Feminist World-Making 2024Deconstructing Gendered Language; Feminist World-Making 2024
Deconstructing Gendered Language; Feminist World-Making 2024
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
 
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
 

12 adversal search

  • 2. 2 Two-Agent Games (1)  Idealized Setting – The actions of the agents are interleaved.  Example – Grid-Space World – Two robots : “Black” and “White” – Goal of Robots  White : to be in the same cell with Black  Black : to prevent this from happening – After settling on a first move, the agent makes the move, senses what the other agent does, and then repeats the planning process in sense/plan/act fashion.
  • 3. 3
  • 4. 4 Two-Agent Games (2)  Two-agent, perfect information, zero-sum games  Two agents move in turn until either one of them wins or the result is a draw.  Each player has a complete model of the environment and of its own and the other’s possible actions and their effects.
  • 5. 5 Minimax Procedure (1)  Two player : MAX and MIN  Task : find a “best” move for MAX  Assume that MAX moves first, and that the two players move alternately.  MAX node – nodes at even-numbered depths correspond to positions in which it is MAX’s move next  MIN node – nodes at odd-numbered depths correspond to positions in which it is MIN’s move next
  • 6. 6 Minimax Procedure (2)  Complete search of most game graphs is impossible. – For Chess, 1040 nodes  1022 centuries to generate the complete search graph, assuming that a successor could be generated in 1/3 of a nanosecond  The universe is estimated to be on the order of 108 centuries old. – Heuristic search techniques do not reduce the effective branching factor sufficiently to be of much help.  Can use either breadth-first, depth-first, or heuristic methods, except that the termination conditions must be modified.
  • 7. 7 Minimax Procedure (3)  Estimate of the best-first move – apply a static evaluation function to the leaf nodes – measure the “worth” of the leaf nodes. – The measurement is based on various features thought to influence this worth. – Usually, analyze game trees to adopt the convention  game positions favorable to MAX cause the evaluation function to have a positive value  positions favorable to MIN cause the evaluation function to have negative value  Values near zero correspond to game positions not particularly favorable to either MAX or MIN.
  • 8. 8 Minimax Procedure (4)  Good first move extracted – Assume that MAX were to choose among the tip nodes of a search tree, he would prefer that node having the largest evaluation.  The backed-up value of a MAX node parent of MIN tip nodes is equal to the maximum of the static evaluations of the tip nodes. – MIN would choose that node having the smallest evaluation.
  • 9. 9 Minimax Procedure (5)  After the parents of all tip nods have been assigned backed-up values, we back up values another level. – MAX would choose that successor MIN node with the largest backed-up value – MIN would choose that successor MAX node with the smallest backed-up value. – Continue to back up values, level by level from the leaves, until the successors of the start node are assigned backed-up values.
  • 10. 10 Example : Tic-Tac-Toe (1)  MAX marks crosses and MIN marks circles and it is MAX’s turn to play first. – With a depth bound of 2, conduct a breadth-first search – evaluation function e(p) of a position p  If p is not a winning for either player, e(p) = (no. of complete rows, columns, or diagonals that are still open for MAX) - (no. of complete rows, columns, or diagonals that are still open for MIN)  If p is a win of MAX, e(p) =   If p is a win of MIN, e(p) = - 
  • 11. 11 Example : Tic-Tac-Toe (2)  First move
  • 14. 14 Question?  How to improve search efficiency?  It is possible to cut-off some unnecessary subtrees?
  • 15. 15 The Alpha-Beta Procedure (1)  Only after tree generation is completed does position evaluation begin  inefficient  Remarkable reductions in the amount of search needed are possible if perform tip-node evaluations and calculate backed-up values simultaneously with tree generation.  After the node marked A is generated and evaluated, there is no point in generating nodes B, C, and D.
  • 16. 16 The Alpha-Beta Procedure (2)  Alpha value – depending on the backed-up values of the other successors of the start node, the final backed-up value of the start node may be greater than -1, but it cannot be less  Beta value – depending on the static values of the rest of node successors, the final backed-up value of node can be less than -1, but it cannot be greater  Note – The alpha values of MAX nodes can never decrease. – The beta values of MIN nodes can never increase.
  • 17. 17 The Alpha-Beta Procedure (3)  Rules for discontinuing the search 1. Search can be discontinued below any MIN node having a beta value less than or equal to the alpha value of any of its MAX node ancestors. The final backed-up value of this MIN node can be set to its beta value. 2. Search can be discontinued below any MAX node having an alpha value greater than or equal to the beta value of any of its MIN node ancestors. The final backed-up value of this MAX node can be set to its alpha value.
  • 18. 18 The Alpha-Beta Procedure (4)  How to compute alpha and beta values – The alpha value of a MAX node is set equal to the current largest final backed-up value of its successors. – The beta value of a MIN node is set equal to the current smallest final backed-up value of its successors.  Cut-off – Alpha cut-off – Beta cut-off  Alpha-Beta Procedure – The whole process of keeping track of alpha and beta values and making cut-offs when possible
  • 19. 19  Pseudocode 1. If n at depth bound, return AB(n) = static evaluation of n, otherwise, let be the successors of n (in order), set and, if n is a MAX node, go to step 2; else go to step The Alpha-Beta Procedure (5) ( ; , )AB n   1,..., ,...,k bn n n 1k  ' 2 2. Set , 3. If , return ; else continue. 4. If , return ; else proceed to , i.e. set and go to step 2 max[ , ( ; , )]AB n       k b  1kn  1k k  2’. Set , 3’. If , return ; else continue. 4’. If , return ; else proceed to , i.e. set and go to step 2’ min[ , ( ; , )]kAB n       k b  1kn  1k k 
  • 21. 21
  • 22. 22 Search Efficiency (1)  Notation – b : depth of tree – d : number of successors of every node (except a tip node) – bd : number of tip nodes – Suppose that an alpha-beta procedure generated successors in the order of their true backed-up values.  This order maximizes the number of cut-offs that will minimizes the number of tip nodes generated.  Nd : this minimal number of tip nodes
  • 23. 23 Search Efficiency (2)  [Slager & Dixon 1969, Knuth & Moore 1975] – The number of tip nodes of depth d that would be generated by optimal alpha-beta search is about the same as the number of tip nodes that would have been generated at depth d / 2 without alpha-beta. – Alpha-beta, with perfect ordering, reduces the effective branching factor from b to approximately .  [Pearl 1982] – The average branching factor is reduced to approximately .        dbb db N dd d d oddfor1 evenfor12 2/)1(2/)1( 2/ b 4 3 b
  • 24. 24 Other Important Matters (1)  Various Difficulties – Search might end at a position in which MAX (or MIN) is able to make a great move. – Make sure that a position is quiescent before ending search at that position. – Quiescent position  Its static value is not much different from what its backed- up value would be by looking a move or two ahead.
  • 25. 25 Other Important Matters (2)  Horizon Effect – There can be situations in which disaster or success lurks just beyond the search horizon.  Both minimax and alpha-beta extension assume that the opposing player will always make its best move. – There are occasions in which this assumption is inappropriate. – Minimax would be inappropriate if one player had some kind of model of the other player’s strategy.
  • 26. 26 Games of Chance (1)  Backgammon(西洋双陆棋) – MAX’s and MIN’s turns now each involve a throw of the die. – Imagine that at each dice throw, a fictitious third player, DICE, makes a move.
  • 27. 27 Games of Chance (2)  Expectimaxing – Back up the expected (average) values of the values of the successors instead of a maximum or minimum. – Back up the minimum value of the values of successors of nodes for which it is MIN’s move, the maximum value of the values of successors of nodes for which it is MAX’s move, and the expected value of the values of successors of nodes for which it is the DICE’s move.  Introducing a chance move often makes the game tree branch too much for effective searching. – Important to have a good static evaluation function
  • 28. 28 Learning Evaluation Functions (1)  TD-GAMMON – play Backgammon by training a layered, feedforward neural network – overall value of a board position  v = p1 + 2p2 - p3 -2p4
  • 29. 29 Learning Evaluation Functions (2)  Temporal difference training of the network – accomplished during actual play – vt+1 : the estimate at time t + 1 – Wt : vector of all weights at time t – Training method have been performed by having the network play many hundreds of thousands of games against itself. – Performance of a well-trained network is at or near championship level. W W     t ttt v vvc )( 1