Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Computational

Economics
Hartmut
Klauck
Content of the
Course
Organization

Computational Economics
Lecture 1

The Game of
Chess

Hartmut Klauck1
1 MAS,SPMS
Nanyang Technological University

August 8, 2016

Outline
Computational
Economics
Hartmut
Klauck
Content of the
Course

Content of the Course

Organization

The Game of Chess

Organization
The Game of
Chess

Computational Economics
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Game Theory
Different Forms of Games (Extensive/Strategic)
Strategies
Equilibria
Games with Imperfect/Incomplete Information

Computational Issues
Computation of Equilibria/Strategies
Linear Programming

Mechanism Design
Social Choice Theory
Mechanisms with Money (Auctions)
Mechanisms without Money (Stable Matching)

Game Theory
Computational
Economics
Hartmut
Klauck

The theory of how to play games!

Content of the
Course

Founded by von Neumann and Morgenstern in 1944

Organization

Models situations in which several players have to


make decisions

The Game of
Chess

Also called Interactive Decision Theory


Players have different goals (often modeled by payoffs)
Players can choose strategies to achieve goals
If strategies have been chosen by all players, there is
an outcome of the game
Often payoffs, or simply win/lose

Game Theory
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Game theory studies how rational players choose their


strategies
There are different notions of desirable ways to play
Equilibrium: rational players have no incentive to
change strategy
MinMax: Best strategy against even irrational/colluding
players

Game Theory
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Can model traditional games like Chess, Backgammon,


Poker
Applications to Economics, Political Science, Biology,
Computer Science etc.
Example: Markets with sellers and buyers (sellers
strategy is setting the price)
Example: Biology, evolution as a game
7 Nobel prizes (12 winners) in Economics went to
game theorists

Computational Issues
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

How can good strategies be computed?


Can good strategies be computed efficiently?
Is it possible for a market to reach an equilibrium state
efficiently?
Computing equilibria in general games
Tool: Linear Programming

Mechanism Design
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Social Choice Theory studies the problem of how to set


up a mechanism/game to choose from a set of
alternatives, given the preferences of a set of players
Preferences must be reported to the mechanism
E.g. elections
How to (best) allocate an item?
How to match interns to hospitals?

A key result is Arrows theorem: in most situations


players can cheat by misrepresenting their preferences!
Example: strategic voting

Mechanism Design
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

In Mechanism Design we want to set up a game to


implement a social choice
The game should have some desirable properties
E.g. one player wants to sell an item, others want to buy
How can we design a game to best achieve this goal?
One solution: conduct an auction
Example question: how can we design an auction so
that players bid truthfully?
Another example: how can we hold an election, where
people vote with their true preferences?

Mechanism Design
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Mechanism Design is the theory of how to design


games/economic mechanisms
E.g.: Truthful Auctions
Auctions in which bidders bid their true valuation of the
item

Problem: assume that bids are secret, highest bidder


wins and pays his bid
Bidders have the incentive to bid less than their
valuation of the item
We will see the solution to this problem later

Mechanism Design
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

We will consider two approaches to Mechanism Design


Mechanisms with money, e.g. auctions
Mechanisms without Money

One main issue/topic is to prevent players from


manipulating the mechanism by lying

The course
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Introduction to Game Theory


Computational Issues in Game Theory
Introduction to Mechanism Design

Organizational Matters
Computational
Economics
Hartmut
Klauck
Content of the
Course

Lectures: Monday 11:30-12:30 LT 4 and Thursday


8:30-10:30 SPMS LT 2
Tutorial: Monday 12:30-13:30 LT 4

Organization
The Game of
Chess

Grading: 60% Final, 40% CA


CA: 20% Midterm, 20% Assignments
Weekly Exercises (normally not graded)
4 assignments will be graded (teaching weeks 4-5, 7-8,
9-10, 11-12)
First tutorial assignment will be out today
Midterm on Oct. 3

Textbook
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Maschler, Solan, Zamir: Game Theory, Cambridge


University Press, 2013
Covers many, but not all topics of the course
Very comprehensive text about game theory
Heavy. . .

Contact
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

I am at NTU on Monday and Thursday afternoon, feel


free to come to MAS 5-44
Feel free to email me anytime
Use the forum thread on NTUlearn

An Example: Chess
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Board game played on 8 by 8 grid


Two players, Black and White
Players move pieces
White starts
Goal is to capture the king
White wins: White captures Black king
Black wins: Black captures White king

There can be a draw:


No legal moves
Both players agree
No win possible
Time-Out

Example of a finite, deterministic, full-information game

Game Situations
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Definition (1.1)
A board position records the identity and position of
every piece on the board
A game situation is a finite sequence of board positions
(x0 , . . . , xK ) such that
1
2

x0 is the opening position


For even k , position xk +1 can be reached from xk by a
legal move by White
For odd k , position xk +1 can be reached from xk by a
legal move by Black

H: set of all game situations

Strategies
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

We now consider how to play a game.


Definition (1.2)
A strategy for White is a mapping sW that sends every
game situation (x0 , . . . , xk ) H with even k to a board
position xk +1 , so that (x0 , . . . , xk +1 ) is a game situation
Same for Black and sB (with k odd)
If we fix strategies (sW , sB ) for White and Black, the course
of the game is fixed. x0 is opening, x1 determined by
Whites strategy etc.
A play of the game is a sequence of moves until the game
ends

Strategies
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Every play ends in either White or Black winning, or in a


draw
Definition (1.3)
sW is a winning strategy, if for every strategy sB for
Black, the play on (sW , sB ) ends with White winning.
sB is a winning strategy, if for every strategy sW for
White, the play on (sW , sB ) ends with Black winning.
sW guarantees a draw for White, if for every sB the play
on (sW , sB ) ends in a draw or White winning.
sB guarantees a draw for Black, if for every sW the play
on (sW , sB ) ends in a draw or Black winning.

Comments
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

A winning strategy guarantees victory against any


player, computer, man, alien as long as the rules are
followed
If someone knew a winning strategy, chess would
become pointless
We know how to search for one, but not efficiently
We will next show that there is either a winning strategy
for White, or for Black, or both can force a draw
Nobody knows which is the case

More Comments
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

In principle we can compute the answer to this


question!
Hint: This is a finite problem.
But: such a computation is too inefficient to perform in
practice
Reason: Exhaustive search through all strategies takes
too long!
And: there is a theory that describes why this is
probably unavoidable
This is a part of Computational Complexity

The Theorem
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Theorem (1.4)
In chess, one and only one of the following is true:
1

White has a winning strategy

Black has a winning strategy

Each player has a strategy that guarantees a draw

Explanations
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

Clearly, only one of the three possibilities can be true


(think about it!)
We will see two proofs of this theorem
One short
One longer, but more useful later

Proof: Preparation
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

We will first use a simple logical argument


Let W (x) denote a logical statement (first order logic)
depending on x
x : W (x) means W (x) is true for all values of x
x : W (x) means W (x) is true for at least one value of
x
(x : W (x)) and x : W (x) are equivalent
(x : W (x)) and x : W (x) are equivalent

Short Proof
Computational
Economics
Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

We will denote moves of White by ak , of Black by bk


ak , bk record how pieces are moved in turn k
A game situation is equivalent to a sequence of moves
We assume there is an upper bound K on the number
of turns of any play
By allowing empty moves we may assume every play
has length exactly K
W (a1 , b1 , . . . , aK , bK ) is the logical statement that White
wins, given the moves

Short Proof
Computational
Economics

White has a winning strategy if and only if


a1 b1 a2 b2 a3 aK bK : W (a1 , . . . , bK )

Hartmut
Klauck
Content of the
Course
Organization
The Game of
Chess

So if White does not have a winning strategy then


(a1 b1 a2 b2 a3 aK bK : W (a1 , . . . , bK ))
This is equivalent to
a1 (b1 a2 b2 a3 aK bK : W (a1 , . . . , bK ))
and to
a1 b1 (a2 b2 a3 aK bK : W (a1 , . . . , bK ))
and finally to
a1 b1 a2 b2 a3 aK bK : W (a1 , . . . , bK )
This means there is a strategy for Black that guarantees a
draw!

Short Proof
Computational
Economics
Hartmut
Klauck
Content of the
Course

We have shown that if White does NOT have a winning


strategy, then Black has a strategy that guarantees a
draw

Organization
The Game of
Chess

Analogously we can show that if Black does NOT have


a winning strategy, then White has a strategy that
guarantees a draw
This implies that if neither White not Black have a
winning strategy, then BOTH have a strategy that
guarantees a draw
Also note: It cannot be that White and Black both have
a winning strategy

You might also like