You are on page 1of 18

1 Faculty of computing

Lesson Topics

Game Trees (1)

2 Faculty of computing
Objectives

to construct and analyze game trees

to construct matrix game

to understand and implement


heuristic search

3 Faculty of computing
Game Tree

A game tree is a directed graph whose


nodes are positions in a game and whose
edges are moves

4 Faculty of computing
A game tree is called a game in extensive form

A game matrix is called a game in normal form

Any game in extensive form can be reduced to a


game in normal form.

5 Faculty of computing
In matrix games, the players make their choice of
strategy simultaneously, without knowledge of what
the other player is choosing.
Consider a method of modeling such sequential
choice situations by a game tree

1. to describe situations in which the players make


several choice in sequence

2. can also describe games with more than two


players
6 Faculty of computing
Structure of Game Trees
A game tree is structured as follows;
Each node labeled by player making choice
Each branch labeled with particular choice
(of action) made by player
Each final node labeled with payoff to players
Chance events (e.g., roll of die, dealing of
cards, . . .) must also be represented
In this case, node labeled Chance and branches
labeled with probability that Chance will come
7 up with choice
Faculty of computing
Information Sets

Nodes which represent the player’s current


situation given the information at their disposal
but are distinct in the tree due to chance factors
form an information set

Nodes in the same information set are linked via


dotted lines (sometimes in the literature circled in
dotted regions)

8 Faculty of computing
Strategy in Game Tree
 A strategy (action) in a game tree
corresponds to a player’s complete
description of choice to be made at any
information set in the tree

 Knowing strategies of players we can


determine course of play (expect for Chance)

 Knowing Chance’s probabilities we can


calculate expected payoffs
9 Faculty of computing
Mapping Game Tree to Game Matrix

(1) Label rows and columns of matrix with player’s


possible strategies

(2) Place expected payoffs in entries of matrix.


However, number of strategies may be enormous

10 Faculty of computing
EXAMPLE; A game of poker.

Rose & Colin play a game

Each of two players, put $1 into the pot as “ante.”

Each is then dealt a hand, which consists of one


card, from a large deck which consists only of aces
and kings.

Colin must then decide whether to bet $2 or to drop


11 Faculty of computing
If he drops, Rose wins the pot.

If Colin bets, Rose must decide whether to call by matching


Colin’s bet, or to fold.
If she folds, Colin wins the pot.
If Rose calls, the players compare their hands and the
higher card wins the pot.

If the hand tie, the pot is splits equally.

12 Faculty of computing
Chance

A,A A,K K,A K,K


1/4 1/4 1/4 1/4
Colin Colin
Colin Colin

d b d
b d b b d
(1,-1) (1,-1)
Rose (1,-1) Rose Rose Rose (1,-1)

c f c f c f c f

(0,0) (-1,1) (3,-3) (-1,1) (-3,3) (-1,1) (0,0) (-1,1)


Payoffs to (Rose, Colin) b = bet; d = drop
c = call; f = fold
13 Faculty of computing
Rose hand, Payoff to
Probability Colin hand Outcome Rose

1/4 A,A Colin bets, Rose calls, tie 0


1/4 A,K Colin drops +1
1/4 K,A Colin bets, Rose folds −1
1/4 K,K Colin drops +1

1 1 1
Expected payoff to Rose = 0 + 1 + −1 +
4 4 4
1 1
1 =
4 4

14 Faculty of computing
Colin bets
always A only K only Never
always 0 -1/4 5/4 1
A only 1/4 1/4 1 1
Rose calls K only -5/4 -1/2 1/4 1
Never -1 0 0 1

Therefore the game has two saddle points with


value is 1/4

Faculty of computing
15
Assignment
Both player put $1, Then player II If she folds, she loses
called the ante in the not knowing the $1 ante to I no
center of the table. what and player matter what card I
I has must fold has.
or call.
Then player I is dealt
a card from a deck. If II calls she adds $2
If II bets, he puts $2 to the pot.
more into the pot.
It is a winning and with
probability ¼ and Then player card is exposed
losing and with otherwise he loses and I wins $3 from II if he
probability ¾. the $1 ante to II. has a wining card and close
$3 to otherwise.
Player I see this card then his card is inspected he
but keeps at hidden has winning and he wins the (a) Draw the game tree for this
from player II. Player pot and hence win the $1
I then check, ante from II and game.
(b) Write the matrix for the game
16 Faculty of computing
Summary

 Structure of Game Trees

 Information Sets

 Strategy in Game Trees

 Mapping Game Tree To Game Matrix

17 Faculty of computing
Preview Next
Lecture

Two-Person

o Game-Tree
(2)

18 Faculty of computing

You might also like