SlideShare a Scribd company logo
1 of 4
Download to read offline
Game Playing and AI
ā€¢Games are well-deļ¬ned problems that are generally
interpreted as requiring intelligence to play well.

ā€¢Introduces uncertainty since opponents moves can not be
determined in advance.

ā€¢Search spaces can be very large.
For chess:

Game Playing

-Branching factor: 35
-Depth: 50 moves each player
-Search tree: 35100 nodes (~1040 legal positions)
ā€¢Despite this, human players do quite well without doing
much explicit search. They seem to rely on remembering
many patterns.

ā€¢Good test domain for search methods and development of
pruning methods that ignore portions of the search tree that
do not affect the outcome.

1

2

Game Playing Problem

Sample Game Tree (Tic-Tac-Toe)

ā€¢Instance of the general search problem.
MAX (X)

ā€¢States where the game has ended are called terminal
states.
X

X

X

MIN (O)

X

X

X

ā€¢A utility (payoff) function determines the value of terminal
states, e.g. win=+1, draw=0, lose=-1.

X O

X

X O X

X O
X

O

MAX (X)

X
O

...

X O
X

...

ā€¢In two-player games, assume one is called MAX (tries to
maximize utility) and one is called MIN (tries to minimize
utility).

MIN (O)

...

...

...

...

X O X
O X
O

X O X
O O X
X X O

X O X
X
X O O

...

āˆ’1

0

+1

ā€¢In the search tree, ļ¬rst layer is move by MAX, next layer by
MIN, and alternate to terminal states.
TERMINAL

ā€¢Each layer in the search is called a ply.

3

X

Utility

4

X

X
Minimax Algorithm
ā€¢General method for determining optimal move.

Minimax Computation
3

MAX

A1

ā€¢Generate complete game tree down to terminal states.
ā€¢Compute utility of each node bottom up from leaves toward root.
ā€¢At each MAX node, pick the move with maximum utility.

A3

A2

3

MIN
A 11

3

2
A 21

A 13

A 12

12

8

4

A 31

A 22 A 23

2

2

6

A 32

14

A 33

5

2

ā€¢Can be performed using a depth-ļ¬rst search
ā€¢At each MIN node, pick the move with minimum utility
(assumes opponent always acts correctly to minimize utility).

ā€¢When reach the root, optimal move is determined.

function MINIMAX-DECISION(game) returns an operator
for each op in OPERATORS[game] do
VALUE[op] MINIMAX-VALUE(APPLY(op, game), game)
end
return the op with the highest VALUE[op]
function MINIMAX-VALUE(state, game) returns a utility value
if TERMINAL-TEST[game](state) then
return UTILITY[game](state)
else if MAX is to move in state then
return the highest MINIMAX-VALUE of SUCCESSORS(state)
else
return the lowest MINIMAX-VALUE of SUCCESSORS(state)

5

6

Imperfect Decisions

Determining Cutoff

ā€¢Generating the complete game tree for all but the simplest

ā€¢Search to a uniform depth (ply) d.

games is intractable.

ā€¢Use iterative deepening to continue search to deeper levels
ā€¢Instead, cut off search at some nodes and estimate

until time runs out (anytime algorithm).

expected utility using a heuristic evaluation function.

ā€¢Could end in states that are very dynamic (not quiesent) in
ā€¢Ideally, a heuristic measures the probability that MAX will

which evaluation could change quickly, as in (d) below.

win given a position characterized by a given set of
features.

ā€¢Sample chess evaluation function based on ā€œmaterial
advantage:ā€ pawn=1, knight/bishop=3, rook=5, queen=9

ā€¢An example of a weighted linear function:

(a) White to move

(b) Black to move

Fairly even

White slightly better

w1 f 1 + w2 f 2 + ā€¦ + wn f n

(d) Black to move

(c) White to move

White about to lose

Black winning

7

8
Determining Cutoff (cont)

Alpha-Beta Pruning

ā€¢Continue quiescence search at dynamic states to improve
utility estimate.

ā€¢Frequently, large parts of the search space are irrelevant to
the ļ¬nal decision and can be pruned.

ā€¢Horizon problem: Inevitable problems can be pushed over
the search boundary.

ā€¢No need to explore options that are already deļ¬nitely worse
ā€¢Example: Delay inevitable queening move by pawn by

than the current best option.

exploring checking moves.
3

MAX

A1
3

MIN
A 11

3

A 12

12

A3

A2
<=2
A 21

A 13

8

A 22 A 23

2

2
A 31

A 32

14

A 33

5

2

Black to move

9

10

Alpha-Beta General Principle

Alpha-Beta Algorithm

ā€¢Consider a node n where it is Playerā€™s choice of moving to
that node. If Player has a better choice m at either the
parent node of n or at any choice point further up, then n
will never be reached in actual play.

if CUTOFF-TEST(state) then return EVAL(state)
for each s in SUCCESSORS(state) do
MAX( , MIN-VALUE(s, game, , ))
if
then return
end
return

Player

Opponent

function MAX-VALUE(state, game, , ) returns the minimax value of state
inputs: state, current state in game
game, game description
, the best score for MAX along the path to state
, the best score for MIN along the path to state

m

..
..
..

function MIN-VALUE(state, game, , ) returns the minimax value of state

Player
Opponent

n

if CUTOFF-TEST(state) then return EVAL(state)
for each s in SUCCESSORS(state) do
MIN( , MAX-VALUE(s, game, , ))
then return
if
end
return

ā€¢Maintain two parameters in depth-ļ¬rst search, Ī±, the value
of the best (highest) value found so far for MAX along any
path; and Ī², the best (lowest) value found along any path for
MIN. Prune a subtree once it is known to be worse than the
current Ī± or Ī².

11

12
Effectiveness of Alpha-Beta
ā€¢Amount of pruning depends on the order in which siblings

State of the Art Game Programs

ā€¢In optimal case where the best options are explored ļ¬rst,

ā€¢Chess: DeepBlue beat world champion
-Customized parallel hardware
-Highly-tuned evaluation function developed with expert
-Comprehensive opening and end-game databases

ā€¢With successors randomly ordered, assymptotic bound is

ā€¢Checkers:
-Samuelā€™s learning program eventually beat developer.
-Chinook is world champion, previous champ held title for

are explored.

time complexity reduces from O(bd) to O(bd/2), a dramatic
improvement. But entails knowledge of best move in
advance!

O((b/logb)d) which is not much help but only accurate for
b>1000. More realistic expectation is something like
O(b3d/4).

40 years had to withdraw for health reasons.

ā€¢Othello: Programs best players (e.g. Iago).
ā€¢Fairly simple ordering heuristic can produce closer to
optimal results than random results (e.g. check captures &
threats ļ¬rst).

ā€¢Theoretical analysis makes unrealistic assumptions such
as utility values distributed randomly across leaves and
therefore experimental results are necessary.

13

ā€¢Backgammon: Neural-net learning program TDGammon
one of worldā€™s top 3 players.

ā€¢Go: Branching factor of ~360 kills most search methods.
Best programs still mediocre.

17

More Related Content

Viewers also liked

Summer+training 2
Summer+training 2Summer+training 2
Summer+training 2Praveen Kumar
Ā 
Comerv3 1-12(2)
Comerv3 1-12(2)Comerv3 1-12(2)
Comerv3 1-12(2)Praveen Kumar
Ā 
Math350 hw2solutions
Math350 hw2solutionsMath350 hw2solutions
Math350 hw2solutionsPraveen Kumar
Ā 
Summer2014 internship
Summer2014 internshipSummer2014 internship
Summer2014 internshipPraveen Kumar
Ā 

Viewers also liked (7)

Lecture3
Lecture3Lecture3
Lecture3
Ā 
Graphtheory
GraphtheoryGraphtheory
Graphtheory
Ā 
Matching
MatchingMatching
Matching
Ā 
Summer+training 2
Summer+training 2Summer+training 2
Summer+training 2
Ā 
Comerv3 1-12(2)
Comerv3 1-12(2)Comerv3 1-12(2)
Comerv3 1-12(2)
Ā 
Math350 hw2solutions
Math350 hw2solutionsMath350 hw2solutions
Math350 hw2solutions
Ā 
Summer2014 internship
Summer2014 internshipSummer2014 internship
Summer2014 internship
Ā 

Similar to Game Playing and AI Problems

GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.pptVihaanN2
Ā 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptSabrinaShanta2
Ā 
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
Ā 
Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1berasrujana
Ā 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCEudayvanand
Ā 
chess-algorithms-theory-and-practice_ver2017.pdf
chess-algorithms-theory-and-practice_ver2017.pdfchess-algorithms-theory-and-practice_ver2017.pdf
chess-algorithms-theory-and-practice_ver2017.pdfrajdipdas12
Ā 
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
Ā 
CptS 440/ 540 AI.pptx
CptS 440/ 540 AI.pptxCptS 440/ 540 AI.pptx
CptS 440/ 540 AI.pptxDrDejaVu2
Ā 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchDheerendra k
Ā 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchShiwani Gupta
Ā 

Similar to Game Playing and AI Problems (20)

GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.ppt
Ā 
Games
GamesGames
Games
Ā 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
Ā 
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
Ā 
cai
caicai
cai
Ā 
Two player games
Two player gamesTwo player games
Two player games
Ā 
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
Ā 
Capgemini 1
Capgemini 1Capgemini 1
Capgemini 1
Ā 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
Ā 
chess-algorithms-theory-and-practice_ver2017.pdf
chess-algorithms-theory-and-practice_ver2017.pdfchess-algorithms-theory-and-practice_ver2017.pdf
chess-algorithms-theory-and-practice_ver2017.pdf
Ā 
1.game
1.game1.game
1.game
Ā 
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
Ā 
l3.pptx
l3.pptxl3.pptx
l3.pptx
Ā 
CptS 440/ 540 AI.pptx
CptS 440/ 540 AI.pptxCptS 440/ 540 AI.pptx
CptS 440/ 540 AI.pptx
Ā 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Ā 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Ā 
Ai
AiAi
Ai
Ā 
AI.ppt
AI.pptAI.ppt
AI.ppt
Ā 
AI_unit3.pptx
AI_unit3.pptxAI_unit3.pptx
AI_unit3.pptx
Ā 

More from Praveen Kumar

Summer+training
Summer+trainingSummer+training
Summer+trainingPraveen Kumar
Ā 
Scholarship sc st
Scholarship sc stScholarship sc st
Scholarship sc stPraveen Kumar
Ā 
Mithfh lecturenotes 9
Mithfh lecturenotes 9Mithfh lecturenotes 9
Mithfh lecturenotes 9Praveen Kumar
Ā 
Line circle draw
Line circle drawLine circle draw
Line circle drawPraveen Kumar
Ā 
Lec2 state space
Lec2 state spaceLec2 state space
Lec2 state spacePraveen Kumar
Ā 
Graphics display-devicesmod-1
Graphics display-devicesmod-1Graphics display-devicesmod-1
Graphics display-devicesmod-1Praveen Kumar
Ā 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithmPraveen Kumar
Ā 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Praveen Kumar
Ā 
Cse3461.c.signal encoding.09 04-2012
Cse3461.c.signal encoding.09 04-2012Cse3461.c.signal encoding.09 04-2012
Cse3461.c.signal encoding.09 04-2012Praveen Kumar
Ā 
Cimplementation
CimplementationCimplementation
CimplementationPraveen Kumar
Ā 
Artificial intelligence lecturenotes.v.1.0.4
Artificial intelligence lecturenotes.v.1.0.4Artificial intelligence lecturenotes.v.1.0.4
Artificial intelligence lecturenotes.v.1.0.4Praveen Kumar
Ā 
445 colouring0
445 colouring0445 colouring0
445 colouring0Praveen Kumar
Ā 

More from Praveen Kumar (20)

Summer+training
Summer+trainingSummer+training
Summer+training
Ā 
Solutions1.1
Solutions1.1Solutions1.1
Solutions1.1
Ā 
Slides15
Slides15Slides15
Slides15
Ā 
Scribed lec8
Scribed lec8Scribed lec8
Scribed lec8
Ā 
Scholarship sc st
Scholarship sc stScholarship sc st
Scholarship sc st
Ā 
Networks 2
Networks 2Networks 2
Networks 2
Ā 
Mithfh lecturenotes 9
Mithfh lecturenotes 9Mithfh lecturenotes 9
Mithfh lecturenotes 9
Ā 
Mcs student
Mcs studentMcs student
Mcs student
Ā 
Line circle draw
Line circle drawLine circle draw
Line circle draw
Ā 
Lec2 state space
Lec2 state spaceLec2 state space
Lec2 state space
Ā 
Graphics display-devicesmod-1
Graphics display-devicesmod-1Graphics display-devicesmod-1
Graphics display-devicesmod-1
Ā 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithm
Ā 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Ā 
Cse3461.c.signal encoding.09 04-2012
Cse3461.c.signal encoding.09 04-2012Cse3461.c.signal encoding.09 04-2012
Cse3461.c.signal encoding.09 04-2012
Ā 
Cimplementation
CimplementationCimplementation
Cimplementation
Ā 
Artificial intelligence lecturenotes.v.1.0.4
Artificial intelligence lecturenotes.v.1.0.4Artificial intelligence lecturenotes.v.1.0.4
Artificial intelligence lecturenotes.v.1.0.4
Ā 
Ai ch2
Ai ch2Ai ch2
Ai ch2
Ā 
Aipapercpt
AipapercptAipapercpt
Aipapercpt
Ā 
01127694
0112769401127694
01127694
Ā 
445 colouring0
445 colouring0445 colouring0
445 colouring0
Ā 

Recently uploaded

Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceVip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceApsara Of India
Ā 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesApsara Of India
Ā 
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...Amil baba
Ā 
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceApsara Of India
Ā 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsApsara Of India
Ā 
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Night
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full NightCall Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Night
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Nightssuser7cb4ff
Ā 
Call Girls Ellis Bridge 7397865700 Independent Call Girls
Call Girls Ellis Bridge 7397865700 Independent Call GirlsCall Girls Ellis Bridge 7397865700 Independent Call Girls
Call Girls Ellis Bridge 7397865700 Independent Call Girlsssuser7cb4ff
Ā 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceTina Ji
Ā 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCRdollysharma2066
Ā 
The Fine Line Between Honest and Evil Comics by Salty Vixen
The Fine Line Between Honest and Evil Comics by Salty VixenThe Fine Line Between Honest and Evil Comics by Salty Vixen
The Fine Line Between Honest and Evil Comics by Salty VixenSalty Vixen Stories & More
Ā 
Call Girls CG Road 7397865700 Independent Call Girls
Call Girls CG Road 7397865700  Independent Call GirlsCall Girls CG Road 7397865700  Independent Call Girls
Call Girls CG Road 7397865700 Independent Call Girlsssuser7cb4ff
Ā 
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书zdzoqco
Ā 
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any Time
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any TimeCall Girls Somajiguda Sarani 7001305949 all area service COD available Any Time
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any Timedelhimodelshub1
Ā 
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...Amil Baba Company
Ā 
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba Company
Ā 
Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Sonam Pathan
Ā 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableKomal Khan
Ā 
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Amil Baba Company
Ā 
North Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunNorth Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunKomal Khan
Ā 

Recently uploaded (20)

Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceVip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Ā 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Ā 
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
Ā 
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
Ā 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Ā 
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Night
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full NightCall Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Night
Call Girls Prahlad Nagar 9920738301 Ridhima Hire Me Full Night
Ā 
Call Girls Ellis Bridge 7397865700 Independent Call Girls
Call Girls Ellis Bridge 7397865700 Independent Call GirlsCall Girls Ellis Bridge 7397865700 Independent Call Girls
Call Girls Ellis Bridge 7397865700 Independent Call Girls
Ā 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Ā 
young call girls in Hari Nagar,šŸ” 9953056974 šŸ” escort Service
young call girls in Hari Nagar,šŸ” 9953056974 šŸ” escort Serviceyoung call girls in Hari Nagar,šŸ” 9953056974 šŸ” escort Service
young call girls in Hari Nagar,šŸ” 9953056974 šŸ” escort Service
Ā 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
Ā 
The Fine Line Between Honest and Evil Comics by Salty Vixen
The Fine Line Between Honest and Evil Comics by Salty VixenThe Fine Line Between Honest and Evil Comics by Salty Vixen
The Fine Line Between Honest and Evil Comics by Salty Vixen
Ā 
Call Girls CG Road 7397865700 Independent Call Girls
Call Girls CG Road 7397865700  Independent Call GirlsCall Girls CG Road 7397865700  Independent Call Girls
Call Girls CG Road 7397865700 Independent Call Girls
Ā 
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书
办ē†ę»‘铁卢大学ęƕäøščÆęˆē»©å•|č“­ä¹°åŠ ę‹æå¤§ę–‡å‡­čƁ书
Ā 
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any Time
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any TimeCall Girls Somajiguda Sarani 7001305949 all area service COD available Any Time
Call Girls Somajiguda Sarani 7001305949 all area service COD available Any Time
Ā 
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...
No,1 Amil baba Islamabad Astrologer in Karachi amil baba in pakistan amil bab...
Ā 
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Amil Baba in Pakistan Kala jadu Expert Amil baba Black magic Specialist in Is...
Ā 
Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713Call Girl Price Andheri WhatsApp:+91-9833363713
Call Girl Price Andheri WhatsApp:+91-9833363713
Ā 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services Available
Ā 
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Ā 
North Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunNorth Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full Fun
Ā 

Game Playing and AI Problems

  • 1. Game Playing and AI ā€¢Games are well-deļ¬ned problems that are generally interpreted as requiring intelligence to play well. ā€¢Introduces uncertainty since opponents moves can not be determined in advance. ā€¢Search spaces can be very large. For chess: Game Playing -Branching factor: 35 -Depth: 50 moves each player -Search tree: 35100 nodes (~1040 legal positions) ā€¢Despite this, human players do quite well without doing much explicit search. They seem to rely on remembering many patterns. ā€¢Good test domain for search methods and development of pruning methods that ignore portions of the search tree that do not affect the outcome. 1 2 Game Playing Problem Sample Game Tree (Tic-Tac-Toe) ā€¢Instance of the general search problem. MAX (X) ā€¢States where the game has ended are called terminal states. X X X MIN (O) X X X ā€¢A utility (payoff) function determines the value of terminal states, e.g. win=+1, draw=0, lose=-1. X O X X O X X O X O MAX (X) X O ... X O X ... ā€¢In two-player games, assume one is called MAX (tries to maximize utility) and one is called MIN (tries to minimize utility). MIN (O) ... ... ... ... X O X O X O X O X O O X X X O X O X X X O O ... āˆ’1 0 +1 ā€¢In the search tree, ļ¬rst layer is move by MAX, next layer by MIN, and alternate to terminal states. TERMINAL ā€¢Each layer in the search is called a ply. 3 X Utility 4 X X
  • 2. Minimax Algorithm ā€¢General method for determining optimal move. Minimax Computation 3 MAX A1 ā€¢Generate complete game tree down to terminal states. ā€¢Compute utility of each node bottom up from leaves toward root. ā€¢At each MAX node, pick the move with maximum utility. A3 A2 3 MIN A 11 3 2 A 21 A 13 A 12 12 8 4 A 31 A 22 A 23 2 2 6 A 32 14 A 33 5 2 ā€¢Can be performed using a depth-ļ¬rst search ā€¢At each MIN node, pick the move with minimum utility (assumes opponent always acts correctly to minimize utility). ā€¢When reach the root, optimal move is determined. function MINIMAX-DECISION(game) returns an operator for each op in OPERATORS[game] do VALUE[op] MINIMAX-VALUE(APPLY(op, game), game) end return the op with the highest VALUE[op] function MINIMAX-VALUE(state, game) returns a utility value if TERMINAL-TEST[game](state) then return UTILITY[game](state) else if MAX is to move in state then return the highest MINIMAX-VALUE of SUCCESSORS(state) else return the lowest MINIMAX-VALUE of SUCCESSORS(state) 5 6 Imperfect Decisions Determining Cutoff ā€¢Generating the complete game tree for all but the simplest ā€¢Search to a uniform depth (ply) d. games is intractable. ā€¢Use iterative deepening to continue search to deeper levels ā€¢Instead, cut off search at some nodes and estimate until time runs out (anytime algorithm). expected utility using a heuristic evaluation function. ā€¢Could end in states that are very dynamic (not quiesent) in ā€¢Ideally, a heuristic measures the probability that MAX will which evaluation could change quickly, as in (d) below. win given a position characterized by a given set of features. ā€¢Sample chess evaluation function based on ā€œmaterial advantage:ā€ pawn=1, knight/bishop=3, rook=5, queen=9 ā€¢An example of a weighted linear function: (a) White to move (b) Black to move Fairly even White slightly better w1 f 1 + w2 f 2 + ā€¦ + wn f n (d) Black to move (c) White to move White about to lose Black winning 7 8
  • 3. Determining Cutoff (cont) Alpha-Beta Pruning ā€¢Continue quiescence search at dynamic states to improve utility estimate. ā€¢Frequently, large parts of the search space are irrelevant to the ļ¬nal decision and can be pruned. ā€¢Horizon problem: Inevitable problems can be pushed over the search boundary. ā€¢No need to explore options that are already deļ¬nitely worse ā€¢Example: Delay inevitable queening move by pawn by than the current best option. exploring checking moves. 3 MAX A1 3 MIN A 11 3 A 12 12 A3 A2 <=2 A 21 A 13 8 A 22 A 23 2 2 A 31 A 32 14 A 33 5 2 Black to move 9 10 Alpha-Beta General Principle Alpha-Beta Algorithm ā€¢Consider a node n where it is Playerā€™s choice of moving to that node. If Player has a better choice m at either the parent node of n or at any choice point further up, then n will never be reached in actual play. if CUTOFF-TEST(state) then return EVAL(state) for each s in SUCCESSORS(state) do MAX( , MIN-VALUE(s, game, , )) if then return end return Player Opponent function MAX-VALUE(state, game, , ) returns the minimax value of state inputs: state, current state in game game, game description , the best score for MAX along the path to state , the best score for MIN along the path to state m .. .. .. function MIN-VALUE(state, game, , ) returns the minimax value of state Player Opponent n if CUTOFF-TEST(state) then return EVAL(state) for each s in SUCCESSORS(state) do MIN( , MAX-VALUE(s, game, , )) then return if end return ā€¢Maintain two parameters in depth-ļ¬rst search, Ī±, the value of the best (highest) value found so far for MAX along any path; and Ī², the best (lowest) value found along any path for MIN. Prune a subtree once it is known to be worse than the current Ī± or Ī². 11 12
  • 4. Effectiveness of Alpha-Beta ā€¢Amount of pruning depends on the order in which siblings State of the Art Game Programs ā€¢In optimal case where the best options are explored ļ¬rst, ā€¢Chess: DeepBlue beat world champion -Customized parallel hardware -Highly-tuned evaluation function developed with expert -Comprehensive opening and end-game databases ā€¢With successors randomly ordered, assymptotic bound is ā€¢Checkers: -Samuelā€™s learning program eventually beat developer. -Chinook is world champion, previous champ held title for are explored. time complexity reduces from O(bd) to O(bd/2), a dramatic improvement. But entails knowledge of best move in advance! O((b/logb)d) which is not much help but only accurate for b>1000. More realistic expectation is something like O(b3d/4). 40 years had to withdraw for health reasons. ā€¢Othello: Programs best players (e.g. Iago). ā€¢Fairly simple ordering heuristic can produce closer to optimal results than random results (e.g. check captures & threats ļ¬rst). ā€¢Theoretical analysis makes unrealistic assumptions such as utility values distributed randomly across leaves and therefore experimental results are necessary. 13 ā€¢Backgammon: Neural-net learning program TDGammon one of worldā€™s top 3 players. ā€¢Go: Branching factor of ~360 kills most search methods. Best programs still mediocre. 17