24
Applications of Computer Science: Game Theory and Computational Biology Instructor: Nihshanka Debroy

Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Applications of Computer Science: Game Theory and Computational Biology

Instructor: Nihshanka Debroy

Page 2: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Game Theory

Page 3: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

What is game theory?

● Study of settings where multiple parties (agents) each have– different preferences– different actions they can take

● Each agent’s utility (potentially) depends on all agents’ actions

● Game theory studies how agents can rationally form beliefs over what other agents will do, and so, how agents should act

Page 4: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Rock-paper-scissors

1, -1

0, 0

-1, 1 1, -10, 0

0, 0-1, 1

-1, 11, -1Row player (player 1)

chooses a row

Column player (player 2)(simultaneously)

chooses a column

A row or column is called an action or

(pure) strategyRow player’s utility is always listed first, column player’s second

Zero-sum game: the utilities in each entry sum to 0 (or a constant)

Page 5: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

“Chicken”

-5, -5-1, 10, 0

1, -1D

S

D S

S

D

D

S

• Two players drive cars towards each other• If one player goes straight, that player wins• If both go straight, they both die

not zero-sum

Page 6: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Dominance● Player i’s strategy si strictly dominates si’ if

– Reward from strategy si is greater than reward from

playing si', when used against any of the other players

– Weak dominance

1, -1

0, 0

1, -1 1, -10, 0

0, 0-1, 1

-1, 1-1, 1strict dominance

weak dominance

Page 7: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Prisoner’s Dilemma

-1, -10, -3-2, -2

-3, 0

confess

• Pair of criminals has been caught• District attorney has evidence to convict them of a minor

crime (1 year in jail); knows that they committed a major crime together (3 years in jail) but cannot prove it

• Offers them a deal:– If both confess to the major crime, they each get a 1 year reduction– If only one confesses, that one gets 3 years reduction

don’t confess

don’t confess

confess

Page 8: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

“Should I buy an SUV?”

-8, -8

-7, -11-10, -10

-11, -7

cost: 5

cost: 3

cost: 5 cost: 5

cost: 5 cost: 5

cost: 8 cost: 2

purchasing cost accident cost

Page 9: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Best-response strategies● Suppose you know your

opponent’s strategy– E.g. your opponent

plays rock 50% of the time and scissors 50%

● Best strategy for you ?● Rock gives .5*0 + .5*1 =

.5● Paper gives .5*1 + .5*(-1)

= 0● Scissors gives .5*(-1) +

.5*0 = -.5● So the best response to

this opponent strategy is to (always) play rock

1, -1

0, 0

-1, 1 1, -10, 0

0, 0-1, 1

-1, 11, -1

Page 10: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Nash equilibria of “chicken”

-5, -5-1, 10, 0

1, -1D

S

D S

S

D

D

S

– (D, S) and (S, D) are Nash equilibria (no player can benefit by changing his or her strategy while the other players keep theirs unchanged)

• Strict Nash equilibria: changing your strategy will make you strictly worse off

Page 11: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

The presentation game

Pay attention (A)

Do not pay attention (NA)

Put effort into presentation (E)

Do not put effort into presentation (NE)

0, 00, -2-16, -144, 4

Presenter

Audience

Page 12: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

The presentation game

Pay attention (A)

Do not pay attention (NA)

Put effort into presentation (E)

Do not put effort into presentation (NE)

0, 00, -2-16, -144, 4

Presenter

Audience

• Nash equilibria: (A, E), (NA, NE)• Can see that some equilibria are strictly better for both players than other equilibria, (Pareto-domination)

Page 13: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

What is mechanism design?● In mechanism design, we get to design the game (or

mechanism)– e.g. the rules of the auction, marketplace, election, …

● Goal is to obtain good outcomes when agents behave strategically

● Mechanism design often considered part of game theory● Sometimes called “inverse game theory”

– In game theory the game is given and we have to figure out how to act

– In mechanism design we know how we would like the agents to act and have to figure out the game

Page 14: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Example: (single-item) auctions• Sealed-bid auction: every bidder submits bid in a sealed envelope• First-price sealed-bid auction: highest bid wins, pays amount of own

bid (does not make sense to bid your true valuation - even if you win, your utility will be 0…)

• Second-price sealed-bid auction: highest bid wins, pays amount of second-highest bid (always makes sense to bid your true valuation)

0

bid 1: $10

bid 2: $5

bid 3: $1

first-price: bid 1 wins, pays $10second-price: bid 1 wins, pays $5

Page 15: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Computational issues in mechanism design

• Algorithmic mechanism design– Sometimes standard mechanisms are too hard to execute computationally – Try to find mechanisms that are easy to execute computationally, together

with algorithms for executing them• Automated mechanism design

– Given the specific setting and the objective, have a computer solve for the best mechanism for this particular setting

Two examples of mechanism design problems● Kidney exchange problem● High-school assignment problem

Page 16: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Where is game theory used?● Economics (& business)

– Auctions, exchanges, price/quantity setting by firms, bargaining, funding public goods, …

● Political science– Voting, candidate positioning, …

● Philosophy– Conventions, ethics, …

● And of course… Computer science!– Game playing programs, electronic marketplaces, networked

systems, …– Computing the solutions that game theory prescribes

Page 17: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Computational Biology

Page 18: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:
Page 19: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:
Page 20: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:
Page 21: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:

Electrostatic Potential Map

Page 22: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:
Page 23: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor:
Page 24: Applications of Computer Sciencedb.cs.duke.edu/courses/cps001/summer07/Lectures/Lecture24.pdf · Applications of Computer Science: Game Theory and Computational Biology Instructor: