Computational Economics: Hartmut Klauck

You might also like

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

Computational Economics

Lecture 1

Hartmut Klauck1
1 MAS,SPMS

Nanyang Technological University

August 14, 2017

Hartmut Klauck (NTU) Computational Economics August 14, 2017 1 / 41


Outline

1 Content of the Course

2 Organization

3 The Game of Chess

Hartmut Klauck (NTU) Computational Economics August 14, 2017 2 / 41


Computational Economics

Game Theory
I Different Forms of Games (Extensive/Strategic)
I Strategies
I Equilibria
I Games with Imperfect/Incomplete Information
Computational Issues
I Computation of Equilibria/Strategies
I Linear Programming
Mechanism Design
I Social Choice Theory
I Mechanisms with Money (Auctions)
I Mechanisms without Money (Stable Matching)

Hartmut Klauck (NTU) Computational Economics August 14, 2017 3 / 41


Game Theory

The theory of playing games!


Founded by von Neumann and Morgenstern in 1944
Models situations in which several players have to make decisions
Also called Interactive Decision Theory
Players have different goals (often modeled by payoffs)
Players can choose strategies to achieve goals
When strategies have been chosen by all players, there is an
outcome of the game
I Often payoffs, or simply win/lose
I Can be other things, e.g. a contract

Hartmut Klauck (NTU) Computational Economics August 14, 2017 4 / 41


Game Theory

Game theory studies how rational players choose their strategies


We usually assume that players are rational (want to win)
There are different notions of desirable ways to play
I Equilibrium: rational players have no incentive to change strategy
I MaxMin: Best strategy against even irrational/colluding players

Hartmut Klauck (NTU) Computational Economics August 14, 2017 5 / 41


Game Theory

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 6 / 41


Computational Issues

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 7 / 41


Mechanism Design

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
I E.g. elections
I How to (best) allocate an item?
I How to match interns to hospitals?
A key result is Arrows Theorem: in most situations players can
cheat by misrepresenting their preferences!
I Example: strategic voting

Hartmut Klauck (NTU) Computational Economics August 14, 2017 8 / 41


Mechanism Design

In Mechanism Design we want to set up a game to implement a


social choice
I 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?

Hartmut Klauck (NTU) Computational Economics August 14, 2017 9 / 41


Mechanism Design

Mechanism Design is the theory of how to design


games/economic mechanisms
Example: Auctioning an item
I It is good if bidders bid their true valuation of the item
An issue: 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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 10 / 41


Mechanism Design

We will consider two approaches to Mechanism Design


I Mechanisms with money, e.g. auctions
I Mechanisms without Money
One main issue/topic is to prevent players from manipulating the
mechanism by lying

Hartmut Klauck (NTU) Computational Economics August 14, 2017 11 / 41


The course

Introduction to Game Theory


Computational Issues in Game Theory
Introduction to Mechanism Design

Hartmut Klauck (NTU) Computational Economics August 14, 2017 12 / 41


Organizational Matters
Lectures: Monday 11:30-12:30 SPMS-LT1 and Thursday
8:30-10:30 SPMS-LT2
Tutorial: Monday 12:30-13:30 SPMS-LT1

Today: 2 hours lecture


Next Monday there will be no lecture/tutorial!

Grading: 60% Final, 40% CA


CA: 20% Midterm, 20% Assignments
Weekly Sheet of Tutorial problem assignments
4 assignments will be graded (teaching weeks 4-5, 6-7, 9-10,
11-12)
First tutorial assignment will be out Monday, August 21
Midterm on Oct. 9 at LT1A
Hartmut Klauck (NTU) Computational Economics August 14, 2017 13 / 41
Textbook

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. . .

Hartmut Klauck (NTU) Computational Economics August 14, 2017 14 / 41


Contact

Office hours: Monday and Thursday afternoon MAS 5-44


Feel free to email me anytime
Use the forum thread on NTUlearn

Hartmut Klauck (NTU) Computational Economics August 14, 2017 15 / 41


An Example: Chess
Board game played on 8 by 8 grid
Two players, Black and White
Players move pieces
White starts
Goal is to capture/checkmate the king
I White wins: White captures Black king
I Black wins: Black captures White king
There can be a draw:
I No legal moves
I Both players agree
I No win possible
I Time-Out
Example of a finite, deterministic, full-information game

Hartmut Klauck (NTU) Computational Economics August 14, 2017 16 / 41


Game Situations

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 x0 is the opening position
2 For even k , position xk +1 can be reached from xk by a legal move
by White
3 For odd k , position xk +1 can be reached from xk by a legal move by
Black
H: set of all game situations

Hartmut Klauck (NTU) Computational Economics August 14, 2017 17 / 41


Example

A board position

A game situation

Hartmut Klauck (NTU) Computational Economics August 14, 2017 18 / 41


Explanation

A game situation contains the whole history of how the game has
been played so far
Up until the latest board position
Players may consider previous board positions, not just the
current one, when making decisions

Hartmut Klauck (NTU) Computational Economics August 14, 2017 19 / 41


Strategies

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 20 / 41


Explanation

A strategy tells a player how to proceed in every game situation


When we fix a strategy for a player, the behavior of the player is
fixed
When we fix strategies for both players, the result is a fixed play

Hartmut Klauck (NTU) Computational Economics August 14, 2017 21 / 41


Strategies

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.

Hartmut Klauck (NTU) Computational Economics August 14, 2017 22 / 41


Comments

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 23 / 41


More Comments

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
I Computational Complexity Theory

Hartmut Klauck (NTU) Computational Economics August 14, 2017 24 / 41


The Theorem

Theorem (1.4)
In chess, one and only one of the following is true:
1 White has a winning strategy
2 Black has a winning strategy
3 Each player has a strategy that guarantees a draw

Hartmut Klauck (NTU) Computational Economics August 14, 2017 25 / 41


Explanations

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 26 / 41


Proof: Preparation

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 27 / 41


Short Proof

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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 28 / 41


Short Proof
White has a winning strategy if and only if

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

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!


Hartmut Klauck (NTU) Computational Economics August 14, 2017 29 / 41
Short Proof

We have shown that if White does NOT have a winning strategy,


then Black has a strategy that guarantees a draw
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

Hartmut Klauck (NTU) Computational Economics August 14, 2017 30 / 41


Graphs and Trees

We describe the game of chess as a tree, with vertices


corresponding to game situations, and edges to moves
A (directed) graph is G = (V , E), where V is a set of vertices, and
E V V is a set of edges
A tree is a graph with a special root vertex r V , so that every
vertex can be reached from r by following a unique path of edges
(without repetition of vertices)
2 is the root, then 5,7 are its children
Leaves are vertices without children

Hartmut Klauck (NTU) Computational Economics August 14, 2017 31 / 41


Game Tree
The game tree of chess has vertex set H and r = x0 , the initial
game situation
There is an edge between every pair of game situations x and y
so that y results from x by one move
y is a child of x
Note: there is exactly one path from x0 to a game situation x
Game situations that are wins or draws have no children, they are
leaves

Hartmut Klauck (NTU) Computational Economics August 14, 2017 32 / 41


Extensive Formulation

The game tree is also called the extensive formulation of chess


All rules of chess can be derived from the game tree
E.g. all the 20 opening moves of White at x0
The descendants of a vertex x are all the vertices that can be
reached from x by a sequence of moves
For every vertex x H there is a subtree (x), that has x as its
root and contains all descendants
(x) corresponds to chess with a special starting game situation

Hartmut Klauck (NTU) Computational Economics August 14, 2017 33 / 41


Second Proof (Induction)

Claim: For every game played in (x) either White has winning
strategy, or Black, or both can force a draw
Base (n = 1): subtree with one vertex is a leaf, i.e., win or draw
Induction Hypothesis: claim is true for all subtrees with at most
n vertices

Hartmut Klauck (NTU) Computational Economics August 14, 2017 34 / 41


Second Proof (Induction)
Induction Hypothesis: claim is true for all subtrees with at most
n vertices
Step: We have to show claim is true for all subtrees (x) with
n + 1 vertices
Assume White moves at x and x1 , . . . , xk are the children of x
All (xi ) have n vertices, hence either White or Black has a
winning strategy, or both can force a Draw
1 If there is a child xi so that White has a winning strategy at xi , then
White can win at x: move to xi
2 If for all children Black has a winning strategy, then Black has one
at x
3 Otherwise a): for no child White has a winning strategy, so Black
can at least get a Draw at x
4 Otherwise b): there is a child xi , where Black does not have a
winning strategy, so White can move to xi and at least get a Draw
there.

Hartmut Klauck (NTU) Computational Economics August 14, 2017 35 / 41


Illustration

Hartmut Klauck (NTU) Computational Economics August 14, 2017 36 / 41


Illustration

Hartmut Klauck (NTU) Computational Economics August 14, 2017 37 / 41


Illustration

Hartmut Klauck (NTU) Computational Economics August 14, 2017 38 / 41


Illustration

Hartmut Klauck (NTU) Computational Economics August 14, 2017 39 / 41


Computing Strategies

If we impose an upper bound K on the number of moves, then the


game tree is finite
The size is exponential in K
One can compute whether White or Black have a strategy or there
are draw strategies like in the second proof
This is not feasible because it would take exponential time!
There is good evidence that no algorithm can decide this question
efficiently

Hartmut Klauck (NTU) Computational Economics August 14, 2017 40 / 41


Finally

We might never know whether White has a winning strategy

Hartmut Klauck (NTU) Computational Economics August 14, 2017 41 / 41

You might also like