SlideShare a Scribd company logo
Artificial
Intelligence 1:
game playing
Lecturer: Tom Lenaerts
Institut de Recherches Interdisciplinaires et de
Développements en Intelligence Artificielle
(IRIDIA)
Université Libre de Bruxelles
Notes adapted from lecture notes for CMSC 421 by B.J. Dorr
TLo (IRIDIA) 2October 13, 2015
Outline
 What are games?
 Optimal decisions in games
 Which strategy leads to success?
 α-β pruning
 Games of imperfect information
 Games that include an element of chance
TLo (IRIDIA) 3October 13, 2015
What are and why study
games?
 Games are a form of multi-agent environment
 What do other agents do and how do they affect our
success?
 Cooperative vs. competitive multi-agent environments.
 Competitive multi-agent environments give rise to
adversarial problems a.k.a. games
 Why study games?
 Fun; historically entertaining
 Interesting subject of study because they are hard
 Easy to represent and agents restricted to small
number of actions
TLo (IRIDIA) 4October 13, 2015
Relation of Games to Search
 Search – no adversary
 Solution is (heuristic) method for finding goal
 Heuristics and CSP techniques can find optimal solution
 Evaluation function: estimate of cost from start to goal
through given node
 Examples: path planning, scheduling activities
 Games – adversary
 Solution is strategy (strategy specifies move for every
possible opponent reply).
 Time limits force an approximate solution
 Evaluation function: evaluate “goodness” of
game position
 Examples: chess, checkers, Othello, backgammon
TLo (IRIDIA) 5October 13, 2015
Types of Games
TLo (IRIDIA) 6October 13, 2015
Game setup
 Two players: MAX and MIN
 MAX moves first and they take turns until the game is
over. Winner gets award, looser gets penalty.
 Games as search:
 Initial state: e.g. board configuration of chess
 Successor function: list of (move,state) pairs specifying
legal moves.
 Terminal test: Is the game finished?
 Utility function: Gives numerical value of terminal states.
E.g. win (+1), loose (-1) and draw (0) in tic-tac-toe (next)
 MAX uses search tree to determine next move.
TLo (IRIDIA) 7October 13, 2015
Partial Game Tree for Tic-Tac-Toe
TLo (IRIDIA) 8October 13, 2015
Optimal strategies
 Find the contingent strategy for MAX assuming an
infallible MIN opponent.
 Assumption: Both players play optimally !!
 Given a game tree, the optimal strategy can be determined
by using the minimax value of each node:
MINIMAX-VALUE(n)=
UTILITY(n) If n is a terminal
maxs∈ successors(n) MINIMAX-VALUE(s) If n is a max node
mins∈ successors(n) MINIMAX-VALUE(s) If n is a max node
TLo (IRIDIA) 9October 13, 2015
Two-Ply Game Tree
TLo (IRIDIA) 10October 13, 2015
Two-Ply Game Tree
TLo (IRIDIA) 11October 13, 2015
Two-Ply Game Tree
TLo (IRIDIA) 12October 13, 2015
Two-Ply Game Tree
The minimax decision
Minimax maximizes the worst-case outcome for max.
TLo (IRIDIA) 13October 13, 2015
What if MIN does not play
optimally?
 Definition of optimal play for MAX assumes
MIN plays optimally: maximizes worst-case
outcome for MAX.
 But if MIN does not play optimally, MAX will do
even better. [Can be proved.]
TLo (IRIDIA) 14October 13, 2015
Minimax Algorithm
function MINIMAX-DECISION(state) returns an action
inputs: state, current state in game
v←MAX-VALUE(state)
return the action in SUCCESSORS(state) with value v
function MIN-VALUE(state) returns a utility value
if TERMINAL-TEST(state) then return UTILITY(state)
v ← ∞
for a,s in SUCCESSORS(state) do
v ← MIN(v,MAX-VALUE(s))
return v
function MAX-VALUE(state) returns a utility value
if TERMINAL-TEST(state) then return UTILITY(state)
v ← ∞
for a,s in SUCCESSORS(state) do
v ← MAX(v,MIN-VALUE(s))
return v
TLo (IRIDIA) 15October 13, 2015
Properties of Minimax

Criterion Minimax
Complete? Yes
Time O(bm
)
Space O(bm)
Optimal? Yes



TLo (IRIDIA) 16October 13, 2015
Multiplayer games
 Games allow more than two players
 Single minimax values become vectors
TLo (IRIDIA) 17October 13, 2015
Problem of minimax search
 Number of games states is exponential to the
number of moves.
 Solution: Do not examine every node
 ==> Alpha-beta pruning
 Alpha = value of best choice found so far at any choice
point along the MAX path
 Beta = value of best choice found so far at any choice
point along the MIN path
 Revisit example …
TLo (IRIDIA) 18October 13, 2015
Alpha-Beta Example
[-∞, +∞]
[-∞,+∞]
Range of possible values
Do DF-search until first leaf
TLo (IRIDIA) 19October 13, 2015
Alpha-Beta Example
(continued)
[-∞,3]
[-∞,+∞]
TLo (IRIDIA) 20October 13, 2015
Alpha-Beta Example
(continued)
[-∞,3]
[-∞,+∞]
TLo (IRIDIA) 21October 13, 2015
Alpha-Beta Example
(continued)
[3,+∞]
[3,3]
TLo (IRIDIA) 22October 13, 2015
Alpha-Beta Example
(continued)
[-∞,2]
[3,+∞]
[3,3]
This node is worse
for MAX
TLo (IRIDIA) 23October 13, 2015
Alpha-Beta Example
(continued)
[-∞,2]
[3,14]
[3,3] [-∞,14]
,
TLo (IRIDIA) 24October 13, 2015
Alpha-Beta Example
(continued)
[−∞,2]
[3,5]
[3,3] [-∞,5]
,
TLo (IRIDIA) 25October 13, 2015
Alpha-Beta Example
(continued)
[2,2][−∞,2]
[3,3]
[3,3]
TLo (IRIDIA) 26October 13, 2015
Alpha-Beta Example
(continued)
[2,2][-∞,2]
[3,3]
[3,3]
TLo (IRIDIA) 27October 13, 2015
Alpha-Beta Algorithm
function ALPHA-BETA-SEARCH(state) returns an action
inputs: state, current state in game
v←MAX-VALUE(state, - ∞ , +∞)
return the action in SUCCESSORS(state) with value v
function MAX-VALUE(state,α , β) returns a utility value
if TERMINAL-TEST(state) then return UTILITY(state)
v ← - ∞
for a,s in SUCCESSORS(state) do
v ← MAX(v,MIN-VALUE(s, α , β))
if v ≥ β then return v
α ← MAX(α ,v)
return v
TLo (IRIDIA) 28October 13, 2015
Alpha-Beta Algorithm
function MIN-VALUE(state, α , β) returns a utility value
if TERMINAL-TEST(state) then return UTILITY(state)
v ← + ∞
for a,s in SUCCESSORS(state) do
v ← MIN(v,MAX-VALUE(s, α , β))
if v ≤ α then return v
β ← MIN(β ,v)
return v
TLo (IRIDIA) 29October 13, 2015
General alpha-beta pruning
 Consider a node n somewhere
in the tree
 If player has a better choice at
 Parent node of n
 Or any choice point further
up
 n will never be reached in
actual play.
 Hence when enough is known
about n, it can be pruned.
TLo (IRIDIA) 30October 13, 2015
Final Comments about Alpha-
Beta Pruning
 Pruning does not affect final results
 Entire subtrees can be pruned.
 Good move ordering improves effectiveness of pruning
 With “perfect ordering,” time complexity is O(bm/2
)
 Branching factor of sqrt(b) !!
 Alpha-beta pruning can look twice as far as minimax in
the same amount of time
 Repeated states are again possible.
 Store them in memory = transposition table
TLo (IRIDIA) 31October 13, 2015
Games of imperfect information
 Minimax and alpha-beta pruning require too much
leaf-node evaluations.
 May be impractical within a reasonable amount of
time.
 SHANNON (1950):
 Cut off search earlier (replace TERMINAL-TEST by
CUTOFF-TEST)
 Apply heuristic evaluation function EVAL (replacing
utility function of alpha-beta)
TLo (IRIDIA) 32October 13, 2015
Cutting off search
 Change:
 if TERMINAL-TEST(state) then return UTILITY(state)
into
 if CUTOFF-TEST(state,depth) then return EVAL(state)
 Introduces a fixed-depth limit depth
 Is selected so that the amount of time will not exceed what the rules
of the game allow.
 When cuttoff occurs, the evaluation is performed.
TLo (IRIDIA) 33October 13, 2015
Heuristic EVAL
 Idea: produce an estimate of the expected utility of the
game from a given position.
 Performance depends on quality of EVAL.
 Requirements:
 EVAL should order terminal-nodes in the same way as
UTILITY.
 Computation may not take too long.
 For non-terminal states the EVAL should be strongly
correlated with the actual chance of winning.
 Only useful for quiescent (no wild swings in value in near
future) states
TLo (IRIDIA) 34October 13, 2015
Heuristic EVAL example
Eval(s) = w1 f1(s) + w2 f2(s) + … + wnfn(s)
TLo (IRIDIA) 35October 13, 2015
Heuristic EVAL example
Eval(s) = w1 f1(s) + w2 f2(s) + … + wnfn(s)
Addition assumes
independence
TLo (IRIDIA) 36October 13, 2015
Heuristic difficulties
Heuristic counts pieces won
TLo (IRIDIA) 37October 13, 2015
Horizon effect Fixed depth search
thinks it can avoid
the queening move
TLo (IRIDIA) 38October 13, 2015
Games that include chance
 Possible moves (5-10,5-11), (5-11,19-24),(5-10,10-16)
and (5-11,11-16)
TLo (IRIDIA) 39October 13, 2015
Games that include chance
 Possible moves (5-10,5-11), (5-11,19-24),(5-10,10-16) and (5-
11,11-16)
 [1,1], [6,6] chance 1/36, all other chance 1/18
chance nodes
TLo (IRIDIA) 40October 13, 2015
Games that include chance
 [1,1], [6,6] chance 1/36, all other chance 1/18
 Can not calculate definite minimax value, only expected value
TLo (IRIDIA) 41October 13, 2015
Expected minimax value
EXPECTED-MINIMAX-VALUE(n)=
UTILITY(n) If n is a terminal
maxs∈successors(n) MINIMAX-VALUE(s) If n is a max node
mins∈successors(n) MINIMAX-VALUE(s) If n is a max node
∑s ∈successors(n)P(s) . EXPECTEDMINIMAX(s) If n is a chance node
These equations can be backed-up recursively all
the way to the root of the game tree.
TLo (IRIDIA) 42October 13, 2015
Position evaluation with chance
nodes
 Left, A1 wins
 Right A2 wins
 Outcome of evaluation function may not change when values are
scaled differently.
 Behavior is preserved only by a positive linear transformation of
EVAL.
TLo (IRIDIA) 43October 13, 2015
Discussion
 Examine section on state-of-the-art games yourself
 Minimax assumes right tree is better than left, yet …
 Return probability distribution over possible values
 Yet expensive calculation
TLo (IRIDIA) 44October 13, 2015
Discussion
 Utility of node expansion
 Only expand those nodes which lead to significanlty
better moves
 Both suggestions require meta-reasoning
TLo (IRIDIA) 45October 13, 2015
Summary
 Games are fun (and dangerous)
 They illustrate several important points about AI
 Perfection is unattainable -> approximation
 Good idea what to think about
 Uncertainty constrains the assignment of values to
states
 Games are to AI as grand prix racing is to
automobile design.

More Related Content

What's hot

Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Salah Amean
 
Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-ai
ShaishavShah8
 
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
K Nearest Neighbor V1.0 Supervised Machine Learning AlgorithmK Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
DataMites
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
vikas dhakane
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
vikas dhakane
 
String Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive AlgorithmString Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive Algorithm
Adeel Rasheed
 
Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4
DigiGurukul
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Babu Appat
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
Tekendra Nath Yogi
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
Bharat Bhushan
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
Amar Jukuntla
 
4 informed-search
4 informed-search4 informed-search
4 informed-search
Mhd Sb
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
Kamal Acharya
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
smruti sarangi
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
First order logic
First order logicFirst order logic
First order logic
Megha Sharma
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Edureka!
 
Rule Based System
Rule Based SystemRule Based System
Rule Based System
Suresh Sambandam
 
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCEIntelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Khushboo Pal
 

What's hot (20)

Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
 
Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-ai
 
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
K Nearest Neighbor V1.0 Supervised Machine Learning AlgorithmK Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
String Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive AlgorithmString Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive Algorithm
 
Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
4 informed-search
4 informed-search4 informed-search
4 informed-search
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
First order logic
First order logicFirst order logic
First order logic
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
 
Rule Based System
Rule Based SystemRule Based System
Rule Based System
 
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCEIntelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
 

Viewers also liked

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 in Gaming
Artificial Intelligence in GamingArtificial Intelligence in Gaming
Artificial Intelligence in Gaming
Satvik J
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
u053675
 
13 genetic algorithms
13 genetic algorithms13 genetic algorithms
13 genetic algorithms
Nidul Sinha
 
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
Luke Dicken
 
Artificial Intelligence in games
Artificial Intelligence in gamesArtificial Intelligence in games
Artificial Intelligence in games
DevGAMM Conference
 
Minimax
MinimaxMinimax
Minimax
Nagarajan
 
Artificial intelligence in gaming.
Artificial intelligence in gaming.Artificial intelligence in gaming.
Artificial intelligence in gaming.
Rishikese MR
 
Game Playing
Game Playing Game Playing
Game Playing
Maham Huda
 
Game Playing In A I Final
Game  Playing In  A I  FinalGame  Playing In  A I  Final
Game Playing In A I Final
Neelamani Samal
 
Ai for games seminar: N-Grams prediction + intro to bayes inference
Ai for games seminar:  N-Grams prediction + intro to bayes inferenceAi for games seminar:  N-Grams prediction + intro to bayes inference
Ai for games seminar: N-Grams prediction + intro to bayes inference
Andrea Tucci
 
Alpha beta prouning
Alpha beta prouningAlpha beta prouning
Alpha beta prouning
Safwan Hashmi
 
Artificial Intelligence (and Stupidity) in the Game Industry
Artificial Intelligence (and Stupidity) in the Game IndustryArtificial Intelligence (and Stupidity) in the Game Industry
Artificial Intelligence (and Stupidity) in the Game Industry
Lars Liden
 
AI ch6
AI ch6AI ch6
AI ch6
Mhd Sb
 
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
Youichiro Miyake
 
01 intro1
01 intro101 intro1
01 intro1
Nidul Sinha
 
검색어 대중도, 연결망 분석 - 21021899 김수빈
검색어 대중도, 연결망 분석 - 21021899 김수빈검색어 대중도, 연결망 분석 - 21021899 김수빈
검색어 대중도, 연결망 분석 - 21021899 김수빈Webometrics Class
 
Artificial intelligence
Artificial intelligence Artificial intelligence
Artificial intelligence
Jagadeesh Kumar
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
Sukhdeep Kaur
 
Presentation on artificial intelligence
Presentation on artificial intelligencePresentation on artificial intelligence
Presentation on artificial intelligence
Kawsar Ahmed
 

Viewers also liked (20)

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 in Gaming
Artificial Intelligence in GamingArtificial Intelligence in Gaming
Artificial Intelligence in Gaming
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
13 genetic algorithms
13 genetic algorithms13 genetic algorithms
13 genetic algorithms
 
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
 
Artificial Intelligence in games
Artificial Intelligence in gamesArtificial Intelligence in games
Artificial Intelligence in games
 
Minimax
MinimaxMinimax
Minimax
 
Artificial intelligence in gaming.
Artificial intelligence in gaming.Artificial intelligence in gaming.
Artificial intelligence in gaming.
 
Game Playing
Game Playing Game Playing
Game Playing
 
Game Playing In A I Final
Game  Playing In  A I  FinalGame  Playing In  A I  Final
Game Playing In A I Final
 
Ai for games seminar: N-Grams prediction + intro to bayes inference
Ai for games seminar:  N-Grams prediction + intro to bayes inferenceAi for games seminar:  N-Grams prediction + intro to bayes inference
Ai for games seminar: N-Grams prediction + intro to bayes inference
 
Alpha beta prouning
Alpha beta prouningAlpha beta prouning
Alpha beta prouning
 
Artificial Intelligence (and Stupidity) in the Game Industry
Artificial Intelligence (and Stupidity) in the Game IndustryArtificial Intelligence (and Stupidity) in the Game Industry
Artificial Intelligence (and Stupidity) in the Game Industry
 
AI ch6
AI ch6AI ch6
AI ch6
 
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
 
01 intro1
01 intro101 intro1
01 intro1
 
검색어 대중도, 연결망 분석 - 21021899 김수빈
검색어 대중도, 연결망 분석 - 21021899 김수빈검색어 대중도, 연결망 분석 - 21021899 김수빈
검색어 대중도, 연결망 분석 - 21021899 김수빈
 
Artificial intelligence
Artificial intelligence Artificial intelligence
Artificial intelligence
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Presentation on artificial intelligence
Presentation on artificial intelligencePresentation on artificial intelligence
Presentation on artificial intelligence
 

Similar to 6 games

Lattice-based Signatures
Lattice-based SignaturesLattice-based Signatures
Visualzing Topic Models
Visualzing Topic ModelsVisualzing Topic Models
Visualzing Topic Models
Turi, Inc.
 
3 problem-solving-
3 problem-solving-3 problem-solving-
3 problem-solving-
Mhd Sb
 
An evolutionary tic tac toe player ccit2012
An evolutionary tic tac toe player ccit2012An evolutionary tic tac toe player ccit2012
An evolutionary tic tac toe player ccit2012
Belal Al-Khateeb
 
Efficient Immutable Data Structures (Okasaki for Dummies)
Efficient Immutable Data Structures (Okasaki for Dummies)Efficient Immutable Data Structures (Okasaki for Dummies)
Efficient Immutable Data Structures (Okasaki for Dummies)
Tom Faulhaber
 
0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx
AhishektttPhm
 

Similar to 6 games (6)

Lattice-based Signatures
Lattice-based SignaturesLattice-based Signatures
Lattice-based Signatures
 
Visualzing Topic Models
Visualzing Topic ModelsVisualzing Topic Models
Visualzing Topic Models
 
3 problem-solving-
3 problem-solving-3 problem-solving-
3 problem-solving-
 
An evolutionary tic tac toe player ccit2012
An evolutionary tic tac toe player ccit2012An evolutionary tic tac toe player ccit2012
An evolutionary tic tac toe player ccit2012
 
Efficient Immutable Data Structures (Okasaki for Dummies)
Efficient Immutable Data Structures (Okasaki for Dummies)Efficient Immutable Data Structures (Okasaki for Dummies)
Efficient Immutable Data Structures (Okasaki for Dummies)
 
0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx
 

More from Mhd Sb

AI ch5
AI ch5AI ch5
AI ch5
Mhd Sb
 
AI ch4
AI ch4AI ch4
AI ch4
Mhd Sb
 
AI ch3
AI ch3AI ch3
AI ch3
Mhd Sb
 
Ai ch2
Ai ch2Ai ch2
Ai ch2
Mhd Sb
 
Ai ch1
Ai ch1Ai ch1
Ai ch1
Mhd Sb
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Mhd Sb
 

More from Mhd Sb (6)

AI ch5
AI ch5AI ch5
AI ch5
 
AI ch4
AI ch4AI ch4
AI ch4
 
AI ch3
AI ch3AI ch3
AI ch3
 
Ai ch2
Ai ch2Ai ch2
Ai ch2
 
Ai ch1
Ai ch1Ai ch1
Ai ch1
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 

Recently uploaded

[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 

Recently uploaded (20)

[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 

6 games

  • 1. Artificial Intelligence 1: game playing Lecturer: Tom Lenaerts Institut de Recherches Interdisciplinaires et de Développements en Intelligence Artificielle (IRIDIA) Université Libre de Bruxelles Notes adapted from lecture notes for CMSC 421 by B.J. Dorr
  • 2. TLo (IRIDIA) 2October 13, 2015 Outline  What are games?  Optimal decisions in games  Which strategy leads to success?  α-β pruning  Games of imperfect information  Games that include an element of chance
  • 3. TLo (IRIDIA) 3October 13, 2015 What are and why study games?  Games are a form of multi-agent environment  What do other agents do and how do they affect our success?  Cooperative vs. competitive multi-agent environments.  Competitive multi-agent environments give rise to adversarial problems a.k.a. games  Why study games?  Fun; historically entertaining  Interesting subject of study because they are hard  Easy to represent and agents restricted to small number of actions
  • 4. TLo (IRIDIA) 4October 13, 2015 Relation of Games to Search  Search – no adversary  Solution is (heuristic) method for finding goal  Heuristics and CSP techniques can find optimal solution  Evaluation function: estimate of cost from start to goal through given node  Examples: path planning, scheduling activities  Games – adversary  Solution is strategy (strategy specifies move for every possible opponent reply).  Time limits force an approximate solution  Evaluation function: evaluate “goodness” of game position  Examples: chess, checkers, Othello, backgammon
  • 5. TLo (IRIDIA) 5October 13, 2015 Types of Games
  • 6. TLo (IRIDIA) 6October 13, 2015 Game setup  Two players: MAX and MIN  MAX moves first and they take turns until the game is over. Winner gets award, looser gets penalty.  Games as search:  Initial state: e.g. board configuration of chess  Successor function: list of (move,state) pairs specifying legal moves.  Terminal test: Is the game finished?  Utility function: Gives numerical value of terminal states. E.g. win (+1), loose (-1) and draw (0) in tic-tac-toe (next)  MAX uses search tree to determine next move.
  • 7. TLo (IRIDIA) 7October 13, 2015 Partial Game Tree for Tic-Tac-Toe
  • 8. TLo (IRIDIA) 8October 13, 2015 Optimal strategies  Find the contingent strategy for MAX assuming an infallible MIN opponent.  Assumption: Both players play optimally !!  Given a game tree, the optimal strategy can be determined by using the minimax value of each node: MINIMAX-VALUE(n)= UTILITY(n) If n is a terminal maxs∈ successors(n) MINIMAX-VALUE(s) If n is a max node mins∈ successors(n) MINIMAX-VALUE(s) If n is a max node
  • 9. TLo (IRIDIA) 9October 13, 2015 Two-Ply Game Tree
  • 10. TLo (IRIDIA) 10October 13, 2015 Two-Ply Game Tree
  • 11. TLo (IRIDIA) 11October 13, 2015 Two-Ply Game Tree
  • 12. TLo (IRIDIA) 12October 13, 2015 Two-Ply Game Tree The minimax decision Minimax maximizes the worst-case outcome for max.
  • 13. TLo (IRIDIA) 13October 13, 2015 What if MIN does not play optimally?  Definition of optimal play for MAX assumes MIN plays optimally: maximizes worst-case outcome for MAX.  But if MIN does not play optimally, MAX will do even better. [Can be proved.]
  • 14. TLo (IRIDIA) 14October 13, 2015 Minimax Algorithm function MINIMAX-DECISION(state) returns an action inputs: state, current state in game v←MAX-VALUE(state) return the action in SUCCESSORS(state) with value v function MIN-VALUE(state) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v ← ∞ for a,s in SUCCESSORS(state) do v ← MIN(v,MAX-VALUE(s)) return v function MAX-VALUE(state) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v ← ∞ for a,s in SUCCESSORS(state) do v ← MAX(v,MIN-VALUE(s)) return v
  • 15. TLo (IRIDIA) 15October 13, 2015 Properties of Minimax  Criterion Minimax Complete? Yes Time O(bm ) Space O(bm) Optimal? Yes   
  • 16. TLo (IRIDIA) 16October 13, 2015 Multiplayer games  Games allow more than two players  Single minimax values become vectors
  • 17. TLo (IRIDIA) 17October 13, 2015 Problem of minimax search  Number of games states is exponential to the number of moves.  Solution: Do not examine every node  ==> Alpha-beta pruning  Alpha = value of best choice found so far at any choice point along the MAX path  Beta = value of best choice found so far at any choice point along the MIN path  Revisit example …
  • 18. TLo (IRIDIA) 18October 13, 2015 Alpha-Beta Example [-∞, +∞] [-∞,+∞] Range of possible values Do DF-search until first leaf
  • 19. TLo (IRIDIA) 19October 13, 2015 Alpha-Beta Example (continued) [-∞,3] [-∞,+∞]
  • 20. TLo (IRIDIA) 20October 13, 2015 Alpha-Beta Example (continued) [-∞,3] [-∞,+∞]
  • 21. TLo (IRIDIA) 21October 13, 2015 Alpha-Beta Example (continued) [3,+∞] [3,3]
  • 22. TLo (IRIDIA) 22October 13, 2015 Alpha-Beta Example (continued) [-∞,2] [3,+∞] [3,3] This node is worse for MAX
  • 23. TLo (IRIDIA) 23October 13, 2015 Alpha-Beta Example (continued) [-∞,2] [3,14] [3,3] [-∞,14] ,
  • 24. TLo (IRIDIA) 24October 13, 2015 Alpha-Beta Example (continued) [−∞,2] [3,5] [3,3] [-∞,5] ,
  • 25. TLo (IRIDIA) 25October 13, 2015 Alpha-Beta Example (continued) [2,2][−∞,2] [3,3] [3,3]
  • 26. TLo (IRIDIA) 26October 13, 2015 Alpha-Beta Example (continued) [2,2][-∞,2] [3,3] [3,3]
  • 27. TLo (IRIDIA) 27October 13, 2015 Alpha-Beta Algorithm function ALPHA-BETA-SEARCH(state) returns an action inputs: state, current state in game v←MAX-VALUE(state, - ∞ , +∞) return the action in SUCCESSORS(state) with value v function MAX-VALUE(state,α , β) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v ← - ∞ for a,s in SUCCESSORS(state) do v ← MAX(v,MIN-VALUE(s, α , β)) if v ≥ β then return v α ← MAX(α ,v) return v
  • 28. TLo (IRIDIA) 28October 13, 2015 Alpha-Beta Algorithm function MIN-VALUE(state, α , β) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v ← + ∞ for a,s in SUCCESSORS(state) do v ← MIN(v,MAX-VALUE(s, α , β)) if v ≤ α then return v β ← MIN(β ,v) return v
  • 29. TLo (IRIDIA) 29October 13, 2015 General alpha-beta pruning  Consider a node n somewhere in the tree  If player has a better choice at  Parent node of n  Or any choice point further up  n will never be reached in actual play.  Hence when enough is known about n, it can be pruned.
  • 30. TLo (IRIDIA) 30October 13, 2015 Final Comments about Alpha- Beta Pruning  Pruning does not affect final results  Entire subtrees can be pruned.  Good move ordering improves effectiveness of pruning  With “perfect ordering,” time complexity is O(bm/2 )  Branching factor of sqrt(b) !!  Alpha-beta pruning can look twice as far as minimax in the same amount of time  Repeated states are again possible.  Store them in memory = transposition table
  • 31. TLo (IRIDIA) 31October 13, 2015 Games of imperfect information  Minimax and alpha-beta pruning require too much leaf-node evaluations.  May be impractical within a reasonable amount of time.  SHANNON (1950):  Cut off search earlier (replace TERMINAL-TEST by CUTOFF-TEST)  Apply heuristic evaluation function EVAL (replacing utility function of alpha-beta)
  • 32. TLo (IRIDIA) 32October 13, 2015 Cutting off search  Change:  if TERMINAL-TEST(state) then return UTILITY(state) into  if CUTOFF-TEST(state,depth) then return EVAL(state)  Introduces a fixed-depth limit depth  Is selected so that the amount of time will not exceed what the rules of the game allow.  When cuttoff occurs, the evaluation is performed.
  • 33. TLo (IRIDIA) 33October 13, 2015 Heuristic EVAL  Idea: produce an estimate of the expected utility of the game from a given position.  Performance depends on quality of EVAL.  Requirements:  EVAL should order terminal-nodes in the same way as UTILITY.  Computation may not take too long.  For non-terminal states the EVAL should be strongly correlated with the actual chance of winning.  Only useful for quiescent (no wild swings in value in near future) states
  • 34. TLo (IRIDIA) 34October 13, 2015 Heuristic EVAL example Eval(s) = w1 f1(s) + w2 f2(s) + … + wnfn(s)
  • 35. TLo (IRIDIA) 35October 13, 2015 Heuristic EVAL example Eval(s) = w1 f1(s) + w2 f2(s) + … + wnfn(s) Addition assumes independence
  • 36. TLo (IRIDIA) 36October 13, 2015 Heuristic difficulties Heuristic counts pieces won
  • 37. TLo (IRIDIA) 37October 13, 2015 Horizon effect Fixed depth search thinks it can avoid the queening move
  • 38. TLo (IRIDIA) 38October 13, 2015 Games that include chance  Possible moves (5-10,5-11), (5-11,19-24),(5-10,10-16) and (5-11,11-16)
  • 39. TLo (IRIDIA) 39October 13, 2015 Games that include chance  Possible moves (5-10,5-11), (5-11,19-24),(5-10,10-16) and (5- 11,11-16)  [1,1], [6,6] chance 1/36, all other chance 1/18 chance nodes
  • 40. TLo (IRIDIA) 40October 13, 2015 Games that include chance  [1,1], [6,6] chance 1/36, all other chance 1/18  Can not calculate definite minimax value, only expected value
  • 41. TLo (IRIDIA) 41October 13, 2015 Expected minimax value EXPECTED-MINIMAX-VALUE(n)= UTILITY(n) If n is a terminal maxs∈successors(n) MINIMAX-VALUE(s) If n is a max node mins∈successors(n) MINIMAX-VALUE(s) If n is a max node ∑s ∈successors(n)P(s) . EXPECTEDMINIMAX(s) If n is a chance node These equations can be backed-up recursively all the way to the root of the game tree.
  • 42. TLo (IRIDIA) 42October 13, 2015 Position evaluation with chance nodes  Left, A1 wins  Right A2 wins  Outcome of evaluation function may not change when values are scaled differently.  Behavior is preserved only by a positive linear transformation of EVAL.
  • 43. TLo (IRIDIA) 43October 13, 2015 Discussion  Examine section on state-of-the-art games yourself  Minimax assumes right tree is better than left, yet …  Return probability distribution over possible values  Yet expensive calculation
  • 44. TLo (IRIDIA) 44October 13, 2015 Discussion  Utility of node expansion  Only expand those nodes which lead to significanlty better moves  Both suggestions require meta-reasoning
  • 45. TLo (IRIDIA) 45October 13, 2015 Summary  Games are fun (and dangerous)  They illustrate several important points about AI  Perfection is unattainable -> approximation  Good idea what to think about  Uncertainty constrains the assignment of values to states  Games are to AI as grand prix racing is to automobile design.