38
Mohsen Afsharchi Multiagent Interaction

Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Embed Size (px)

Citation preview

Page 1: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Mohsen Afsharchi

Multiagent Interaction

Page 2: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

What are Multiagent Systems?

Page 3: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

We are…

Self-interested agents It does not mean that:

they want to harm other agents they only care about things that benefit them

It means that the agent has its own description of states of the

world that it likes, and that its actions are motivated by this description

Page 4: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Utilities and Preferences

Assume we have just two agents: Ag = {i, j} Agents are assumed to be self-interested: they

have preferences over how the environment is Assume {12…}is the set of “outcomes”

that agents have preferences over We capture preferences by utility functions:

ui = Ruj = R

Utility functions lead to preference orderings over outcomes:

’ means ui () > ui (’)

i

Page 5: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

What is Utility? Utility is not money (but it is a useful analogy) Typical relationship between utility & money:

Page 6: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Multiagent Encounters

We need a model of the environment in which these agents will act… agents simultaneously choose an action to

perform, and as a result of the actions they select, an outcome in will result

the actual outcome depends on the combination of actions

assume each agent has just two possible actions that it can perform, C (“cooperate”) and D (“defect”)

Environment behavior given by state transformer function:

Page 7: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Multiagent Encounters

Here is a state transformer function:

(This environment is sensitive to actions of both agents.)

Here is another:

(Neither agent has any influence in this environment.)

And here is another:

(This environment is controlled by j.)

Page 8: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Rational Action

Suppose we have the case where both agents can influence the outcome, and they have utility functions as follows:

With a bit of abuse of notation:

Then agent i’s preferences are:

“C” is the rational choice for i. (Because i prefers all outcomes that arise through C

over all outcomes that arise through D.)

Page 9: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Payoff Matrices We can characterize the previous scenario in

a payoff matrix:

Do we need to engage in strategic thinking? Pay-off matrix in fact defines a game

(technically strategic game)

Page 10: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Game Theory… The study of games!

Bluffing in poker What move to make in chess How to play Rock-Scissors-Paper

Also Also study of auction design, strategic

deterrence, election laws, coaching decisions, routing protocols,...

Page 11: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Game theory… Game theory is a formal way to analyze

interactions among a group of rational agents who behave strategically.

Group: Must have more than one decision maker Otherwise you have a decision problem, not a game

Interaction: What one agent does directly affects at least one other agent

Strategic: Agents take into account that their actions influence the game

Rational: An agent chooses its best action (maximizes its expected utility)

Page 12: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Game in Normal Form

Page 13: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Game in Normal Form…

Page 14: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Strategy

Page 15: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Strategy…

Page 16: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Solution Concepts

Page 17: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Dominant Strategies Given any particular strategy (either C or D) of

agent i, there will be a number of possible outcomes We say s1 dominates s2 if every outcome possible by i

playing s1 is preferred over every outcome possible by i playing s2

A rational agent will never play a dominated strategy

So in deciding what to do, we can delete dominated strategies

Unfortunately, there isn’t always a unique undominated strategy

Page 18: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Dominant Strategies…

Iterated elimination of strictly dominated actions (IESDA) is a solution technique that iteratively eliminates strictly dominated actions from all agents, until no more actions are strictly dominated.

Page 19: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Nash Equilibrium In general, we will say that two strategies s1

and s2 are in Nash equilibrium if:1. under the assumption that agent i plays s1, agent j can

do no better than play s2; and

2. under the assumption that agent j plays s2, agent i can do no better than play s1.

1. Neither agent has any incentive to deviate from a Nash equilibrium

2. Unfortunately:1. Not every interaction scenario has a Nash equilibrium2. Some interaction scenarios have more than one Nash

equilibrium

Page 20: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Nash Equilibrium

There is no dominant strategy. Moreover there is no Nash Equilibrium. Whichever cell you choose, at least one of you would have preferred to make another choice, assuming the other player did not changed their choice.

Page 21: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Mixed Strategy Introducing Randomness… If player has k possible choices, s1 , s2 ,…, sk then

the mixed strategy over these choices takes the form Play s1 with probability p1

Play s2 with probability p2

… Play sk with probability pk

Where p1 + p2 +…+ pk =1

Every game in which every player has a finite set of possible strategies has a Nash equilibrium in mixed strategies

Page 22: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Matching Pennies game Each of two agents chooses either Head or Tail. If

the choices differ, agent 1 pays agent 2 a cent; if they are the same, agent 2 pays agent 1 a cent.

There is no (pure strategy) Nash equilibrium in this game. If we play this game, we should be “unpredictable.”

That is, we should randomize (or mix) between strategies so that we do not get exploited.

Page 23: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Matching Pennies game… But not any randomness will do: Suppose Player 1 plays .75

Heads and .25 Tails (that is, Heads with 75% chance and Tails with 25% chance). Then Player 2 by choosing Tails (with 100% chance) can get an expected payoff of 0.75×1 + 0.25×(-1) =0.5. But that cannot happen at equilibrium since Player 1 then wants to play Tails (with 100% chance) deviating from the original mixed strategy.

Since this game is completely symmetric it is easy to see that at mixed strategy Nash equilibrium both players will choose Heads with 50% chance and Tails with 50% chance.

In this case the expected payoff to both players is 0.5×1 + 0.5×(-1) = 0 and neither can do better by deviating to another strategy.

Page 24: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Pareto Efficiency Is not really a solution concept. An outcome is Pareto efficient if there is no other

outcome that improves one player’s utility without making somebody else worse off.

Battle of the sexes

Page 25: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Maximizing Social Welfare We measure how much utility is created by an

outcome in total. SW()

Becomes relevant if all the agents within a system have the same owner

Page 26: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Competitive and Zero-Sum Interactions Where preferences of agents are diametrically

opposed we have strictly competitive scenarios

Zero-sum encounters are those where utilities sum to zero:

ui () + uj () = 0 for all Zero sum implies strictly competitive Zero sum encounters in real life are very rare

… but people tend to act in many scenarios as if they were zero sum

Page 27: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

The Prisoner’s Dilemma Two men are collectively charged with a crime

and held in separate cells, with no way of meeting or communicating. They are told that: if one confesses and the other does not, the

confessor will be freed, and the other will be jailed for three years

if both confess, then each will be jailed for two years

Both prisoners know that if neither confesses, then they will each be jailed for one year

Page 28: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

The Prisoner’s Dilemma Payoff matrix for

prisoner’s dilemma:

Top left: If both defect, then both get punishment for mutual defection

Top right: If i cooperates and j defects, i gets sucker’s payoff of 1, while j gets 4

Bottom left: If j cooperates and i defects, j gets sucker’s payoff of 1, while i gets 4

Bottom right: Reward for mutual cooperation

Page 29: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

The Prisoner’s Dilemma The individual rational action is defect

This guarantees a payoff of no worse than 2, whereas cooperating guarantees a payoff of at most 1

So defection is the best response to all possible strategies: both agents defect, and get payoff = 2

But intuition says this is not the best outcome:Surely they should both cooperate and each get payoff of 3!

We have better choice (?) and it is not rational. Why?

Page 30: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

The Prisoner’s Dilemma This apparent paradox is the fundamental

problem of multi-agent interactions.It appears to imply that cooperation will not occur in societies of self-interested agents.

Real world examples: nuclear arms reduction (“why don’t I keep mine. . . ”) free rider systems — public transport;

The prisoner’s dilemma is ubiquitous. Can we recover cooperation?

Page 31: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Arguments for Recovering Cooperation Conclusions that some have drawn from this

analysis: the game theory notion of rational action is wrong! somehow the dilemma is being formulated wrongly

Arguments to recover cooperation: We are not all Machiavelli! and not all games are PD

Yes but there are always punishments !!! The other prisoner is my twin!

Then I am damn fool to behave any other way (Because it is not a game)

The shadow of the future…

Page 32: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

The Iterated Prisoner’s Dilemma

One answer: play the game more than once If you know you will be meeting your

opponent again, then the incentive to defect appears to evaporate

Cooperation is the rational choice in the infinititely repeated prisoner’s dilemma(Hurrah!)

Page 33: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Backwards Induction But…suppose you both know that you will

play the game exactly n times On round n - 1, you have an incentive to

defect, to gain that extra bit of payoff… But this makes round n – 2 the last “real”, and

so you have an incentive to defect there, too. This is the backwards induction problem. Playing the prisoner’s dilemma with a fixed,

finite, pre-determined, commonly known number of rounds, defection is the best strategy

Page 34: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Axelrod’s Tournament Suppose you play iterated prisoner’s dilemma

against a range of opponents…What strategy should you choose, so as to maximize your overall payoff?

Axelrod (1984) investigated this problem, with a computer tournament for programs playing the prisoner’s dilemma

Page 35: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Strategies in Axelrod’s Tournament ALLD:

“Always defect” — the hawk strategy; TIT-FOR-TAT:

1. On round u = 0, cooperate2. On round u > 0, do what your opponent did on

round u – 1

TESTER: On 1st round, defect. If the opponent retaliated,

then play TIT-FOR-TAT. Otherwise intersperse cooperation and defection.

JOSS: As TIT-FOR-TAT, except periodically defect

Page 36: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Recipes for Success in Axelrod’s Tournament Axelrod suggests the following rules for

succeeding in his tournament: Don’t be envious:

Don’t play as if it were zero sum! Be nice:

Start by cooperating, and reciprocate cooperation Retaliate appropriately:

Always punish defection immediately, but use “measured” force — don’t overdo it

Don’t hold grudges:Always reciprocate cooperation immediately

Page 37: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Game of Chicken

The game of chicken:

(Swerving = coop, Driving straight = defect.) Difference to prisoner’s dilemma:

Mutual defection is most feared outcome.(Whereas sucker’s payoff is most feared in prisoner’s dilemma.)

Strategies (C,S) and (S,C) are in Nash equilibrium

Page 38: Mohsen Afsharchi Multiagent Interaction. What are Multiagent Systems?

Other Symmetric 2 x 2 Games Given the 4 possible outcomes of

(symmetric) cooperate/defect games, there are 24 possible orderings on outcomes CC ši CD ši DC ši DD

Cooperation dominates DC ši DD ši CC ši CD

Deadlock. You will always do best by defecting DC ši CC ši DD ši CD

Prisoner’s dilemma DC ši CC ši CD ši DD

Chicken CC ši DC ši DD ši CD

Stag hunt