TelecomParis_IPParis.png Telecom Paris
Dep. Informatique & Réseaux

Dessalles_2018.png J-L. DessallesHome page

October 2025

5

ECS_image.jpg Module Athens TP-09

    Emergence in Complex Systems

Lecturers:
    Ada Diaconescu - Associate professor at Telecom-Paris
    Jean-Louis Dessalles - Associate professor at Telecom-Paris
    Samuel Reyd - PhD student at Telecom-Paris

                                other AI courses
5


Contents








Please answer in English!

Nash equilibria & Evolutionarily Stable Strategies (ESS)

Emergence
in complex systems

    

Nash equilibria
&
Evolutionarily Stable Strategies

    

    

teaching.dessalles.fr/ECS

Game theory

Game theory is a theoretical framework for describing social situations among competing players.

It applies to a variety of situations, in domains such as:

  • decision making
  • micro-economics
  • behavioral economics
  • psychologie
  • sociology
  • evolutionary biology
  • war
  • . . .

Game theory

Agents try to maximize their payoffs.

Game theory tries to find out optimal strategies, i.e. complete plans of actions a player will take in any circumstances that might arise.

8_5100898c6ff0e.jpg

Nash equilibrium

In a Nash equilibrium, no player has an incentive to deviate from their strategy. John Nash (1928-2015)

A symmetric Nash equilibrium is a strategy σ* such that for every i and any alternative strategy σ, player i’s utility verifies:

 σ:     ui(σ*σ*) > ui(σσ*)

Example

Prisoner’s dilemma

Cooperate

Defect

Cooperate

 -1-1 

-80

Defect

0-8

-5-5


Nash equilibrium:    Defect, Defect

Example

Coordination game

s1

s2

s1

 44 

00

s2

00

11


Nash equilibrium:    s1, s1
Nash equilibrium:    s2, s2
Nash equilibrium:    0.2 * s1 + 0.8 * s20.2 * s1 + 0.8 * s2

Example

Snowdrift game

Cooperate

Defect

Cooperate

 b/2 – c/2, b/2 – c/2 

 b/2 – c, b/2 

Defect

 b/2, b/2 – c 

00

Digging out the snowdrift gives each player a benefit of b/2. The cost c is born by the digger and is split when both dig.

(D,D) is the only symmetric Nash equilibrium.

Example

Rock, papers, scissors

R

P

S

R

 00 

-11

1-1

P

1-1

00

-11

S

-11

1-1

00


Nash equilibrium:    σ = (R/3, P/3, S/3)

Payoff matrix

A two-player game is represented by two matrices A and B.
(In preceding tables, A and B were juxtaposed with commas.)

C D
C  -1 -8
D   0 -5
Matrix A for Prisoner’s dilemma:    

In symmetric games, = A.

Strategies are represented by column vectors. $$\pmatrix{1\\0}$$ A pure strategy has one 1 and one 0. Mixed strategies indicate probabilities.

Payoff for strategy σ against strategy τ is given by: σ A τ.

Payoff matrix

A two-player game is represented by two matrices A and B.
Payoff for strategy σ against strategy τ is given by: σ A τ.

C D
C  -1 -8
D   0 -5
Matrix A for Prisoner’s dilemma:    
For instance, $$A D = \pmatrix{-1 & -8\\ 0 & -5} \pmatrix{0\\1} = \pmatrix{-8\\-5}$$

and:         \(C^{\top} A D = \pmatrix{1 & 0} \times \pmatrix{-8\\-5} = -8\)

Evolutionarily Stable Strategy (ESS)

Consider a symmetric two-player game with payoff matrices \(A, B\) (\(A = B^{\top}\)).
Will a (mixed) strategy \(\sigma\) resist invasion by any other strategy?
(\(\sigma\) may represent the proportion of pure strategies in a population.)

Suppose that \(\sigma\) faces the invasion by a small population of mutants that play strategy \(\tau\).

We want to compare payoff \(\sigma^{\top} A \tau\) with payoff \(\sigma^{\top} A \sigma\).

Evolutionarily Stable Strategy (ESS)

If \(\epsilon\) is the proportion of invaders, the payoff of a resident player is: $$\epsilon \sigma^{\top} A \tau + (1-\epsilon)\sigma^{\top} A \sigma = \sigma^{\top} A ((1-\epsilon)\sigma + \epsilon\tau)$$

Similarly, the payoff of an invader is: $$\epsilon \tau^{\top} A \tau + (1-\epsilon)\tau^{\top} A \sigma = \tau^{\top} A ((1-\epsilon)\sigma + \epsilon\tau)$$

If    \(\tau^{\top} A \sigma \lt \sigma^{\top} A \sigma\)    (i.e. \((\sigma,\sigma)\) is a Nash equilibrium), then for small enough \(\epsilon\), the resident’s payoff is larger than the mutant’s payoff ...
... but in case of equality, invasion is still impossible if:    \(\tau^{\top} A \tau \lt \sigma^{\top} A \tau\)
(meaning: if \(\tau\) is neutral against \(\sigma\), it does poorer against itself.)

If both conditions are met, then strategy \(\sigma\) is said to be
an evolutionarily stable strategy (ESS).

Evolutionarily Stable Strategy (ESS)


An evolutionarily stable strategy (ESS) cannot be invaded by a small number of players adopting a pure alternative strategy.

If all agents but one adopt the ESS, there is no incentive to adopt the new strategy.

In an evolving biological species, the a mutant behavior cannot invade the population.

Evolutionarily Stable Strategy (ESS)

Prisoner’s dilemma

Cooperate

Defect

Cooperate

 -1-1 

-80

Defect

0-8

-5-5


Defect is an ESS.

Evolutionarily Stable Strategy (ESS)

Coordination game

A

B

A

 44 

00

B

00

11


A is an ESS, B is an ESS,
0.2 * A + 0.8 * B, 0.2 * A + 0.8 * B is NOT an ESS
(A performs better against it).

Snowdrift game

Cooperate

Defect

Cooperate

 b/2 – c/2, b/2 – c/2 

 b/2 – c, b/2 

Defect

 b/2, b/2 – c 

00

Digging out the snowdrift gives each player a benefit of b/2. The cost c is born by the digger and is split when both dig.

When b/2 > c, the ESS is a mixture of C and D individuals.
When b/2 – c/2 > 0 > b/2 – c, (D, D) is the sole ESS
(although (C, C) would provide higher payoffs).

Rock, papers, scissors

R

P

S

R

 00 

-11

1-1

P

1-1

00

-11

S

-11

1-1

00


Nash equilibrium:    σ = (R/3, P/3, S/3)
No ESS.

Bibliography



Emergence of sociality







Emergence of segregationism


Schelling.jpg Thomas Schelling (1971) studied the dynamics of residential segregation to elucidate the conditions under which individual decisions about where to live will interact to produce neighbourhoods that are segregated by race. His model shows that this can occur even though individuals do not act in a coordinated fashion to bring about these segregated outcomes.

Schelling proposed a prototype model in which individual agents are of two types, say red and blue, and are placed randomly on the squares of a checkerboard. The neighbourhood of an agent is defined to be the eight squares adjoining his location. Each agent has preferences over the composition of his neighbourhood, defined as the proportion of reds and blues. In each period, the most dissatisfied agent moves to an empty square provided a square is available that he prefers to his current location. The process continues until no one wants to move.

The typical outcome is a highly segregated state, although nobody actually prefers segregation to integration. You may have a look at this very beautiful visualisation of the phenomenon.

Segregation.gif The program Segregationism.py (in the directory Apps/Segregationism ) implements agents of two types (red and blue) that move randomly. To run it, execute the local command starter and load the configuration file Segregationism.evo. The Configuration Editor allows you to change parameter values.

Schelling decision
Modify the method satisfaction called by decisionToMove in class Individual: agents inspect their neighbourhood (through the method InspectNeighbourhood), and decide whether to move away or not. Copy your modification in the box below.

    

Agents have only weak segregationist local behaviour, in the following sense: each agent wants at most 50% neighbours that differ from her/him; otherwise agents are indifferent. Implement the model and observe how segregation emerges. You may increase the value of DisplayPeriod in the Configuration Editor to speed up the simulation.

Schelling Tolerance (1)
Be sure to have loaded the configuration file Segregationism.evo.
We expect segregation to disappear when individuals can never be satisfied. Diminish Tolerance. With the first solution to the previous exercise, for wich value of Tolerance does segregation disappear?

    


Schelling Tolerance (2)
Set Tolerance to 80. What happens and why?

    


Schelling Radius (1)
Be sure to reload the configuration file Segregationism.evo to bring parameters back to standard values.
Set neighbourhood radius from 1 to 4. Explain what we get with this larger value.

    

Schelling Radius (2)
Set neighbourhood radius to 10. Explain what we get.

    

Schelling Colours
Restore default parameters and try 3 colours. Describe what happens.

    

Ising model

Schelling’s segregation model is often compared with a model of magnetism: the Ising model.

Suggestions for further work







The hawk-dove dilemma


HawkDove.png The existence of society supposes that violence remains contained. Can it be so in the absence of policing? Obviously, aggressive behaviour (intimidation) provides immediate payoff when performed against a non-aggressive victim. However, aggressors may loose a lot when confronting each other.
In Maynard Smith’s hawk-dove game, possible interactions are hawk-hawk, dove-dove and dove-hawk. The matrix below gives the payoffs for strategies indicated in the first column:

Hawk-dove game

hawk

dove

hawk

(V - C)/2

V

dove

0

V/2

Two players confront each other over a resource whose full value is V to either of them. Each player may play one of two strategies: H (Hawk) or D (Dove). Doves signal that they wish to share the resource equally. Hawks signal they are willing to fight to get the resource. When two Doves meet, each gives the characteristic sharing signal and the resource is divided equally, or, perhaps, a fair coin is tossed and the winner gets all. In any case, the expected return to each of the two Doves is V/2. When a Hawk meets a Dove, the Hawk (as it always does) signals fight, the Dove (as it always does) signals share, then the Dove retreats and the Hawk takes the entire resource. Finally, when two Hawks meet, each signal fight, neither retreats, both fight at a cost of C. In the end, the resource is shared equally, minus the cost, or, perhaps, half the time one Hawk gets the entire resource and half the time the other Hawk gets it. In any case, the expected return to each of the Hawks is (V - C)/2.

HawkDove DD
A Nash equilibrium characterizes a situation in which no player has any incentive to change strategy.
Is DD a Nash equilibrium? (DD means that both players play D).

Nash         Not Nash     Nash if V > C     Nash if V < C

    

HawkDove DH
Is DH a Nash equilibrium?

Nash         Not Nash     Nash if V > C     Nash if V < C

    

HawkDove HH
Is HH a Nash equilibrium?

Nash         Not Nash     Nash if V > C     Nash if V < C

    

The solution of the dilemma between two actual players would be to choose a probabilistic strategy. In a population of players, the proportion of hawks stabilizes to a definite value which defines an evolutionarily stable strategy.

Launch Evolife from the Evolife directory with starter. Load the HawkDove.evo configuration. Choose appropriate values for the two parameters V and C (see in the Scenarios/DyadicGames/HawkDove section). Let the program run (button [Run]). Observe the proportion of hawks in the population and the number of peaceful (DD) encounters for various values of the two parameters. The meaning of curves is written in the Legend window.

For what follows, set parameters C and V such that C be significantly larger than V (e.g. 60 and 10).

HawkDove Noise
Open the S_HawkDove.py file (in the directory Scenarii) and locate the hawk() function. As you can see, the effect of noise is to blur the distinction between the two strategies. Set the noise level (in the Configuration Editor, Ecology section) to a significant value (e.g. 30). Observe and explain the effect of noise.

    

HawkDove Gradual (1)
The Hawk gene is currently coded using 1 bit in genemap. Make it gradual by using more bits (e.g. 10). Now, the gene indicates the probability of being hawk.
Change the hawk function accordingly and copy the modified line in the box below.

    

HawkDove Gradual (2)
Restore values to default (e.g. relaod HawkDove.evo).
Compare the evolution of Hawk/Dove genes with what we have with single bit genes (you may display the genome window). How did it change? Why?

    

Suggestions for further work







Delayed cooperation


cooperation.jpg Launch Evolife from the Evolife directory with starter. Load the Cooperation.evo configuration. Let the program run (button [Run]). In the meantime, examine the S_Cooperation.py scenario (in the directory Scenarii) to see how this basic version of cooperation is implemented. Cooperative behavior is controlled by two genes: Cooperativeness and Exploration. The former controls the amount of wealth you give (at your own expense) to partners during encounters. Cooperative acts are rewarded, because if your gift was large enough for partners to remember you, they will choose you as partner when they are in position to make a gift themselves. However, it is in the interest of those partners to explore the rest of the group to see if there are some more generous individuals around. The exploitation/exploration compromise is controlled by the Exploration gene.
Cooperation (1)
Observe the evolution of both genes in the long term. The meaning of curves is given in the Legend window. Wait until cooperativeness significantly drops. Do you explain what we see? Select profitable strategies.

When agents explore much, cooperate to be remembered
When agents explore much, don’t cooperate

When cooperators are scarce, explore more to find out the best cooperators
When cooperators are scarce, explore less to be avoid uncooperative partners

    


Visualize social links (shortcut ‘n’; you may alternatively uncomment the default_view line in S_Cooperation.py). In this view, individuals are displayed twice, on the lower and on the upper horizontal axis. Links connect individuals on the lower axis to individuals to the upper axis. Individuals are ranked by their cooperativeness (most cooperative to the right; see function update_positions ).

Cooperation (2)
From time to time, links are directed towards most cooperative individuals exclusively. Otherwise, there widespread among the whole population. When does the latter occur?

This happens when the variance of the cooperation level is small
This happens when the variance of the cooperation level is large

Cooperation variance is small when cooperation reaches a high level in the population
Cooperation variance is large when cooperation reaches a high level in the population

    


In the section Genetics of the Configuration Editor, change the GeneCoding parameter to Unweighted. Now, the bits of the genes are added up to give its value. A 10 bit gene may therefore have 11 different values, from 0 to 10 (instead of 2^10 = 1024 in the weighted condition). Run the simulation (button [Run]). Is it different? Why? You may visualize genomes (shortcut ‘g').

Cooperation3
In the Genetics section of the Configuration Editor, set GeneLength to 5 instead of 10. Run the program again (button [Run]) and explain what happens.


    

[ Go to the discussion forum about cooperation ]

Reciprocity


reciprocity.pngReciprocal cooperation is one of the most studied problems in social sciences, economics and theoretical behavioural ecology, as it is often seen as a foundation of many social conducts. The basic scenario is as follows: Cooperation.png The third condition is crucial for cooperation to emerge. With amnesic players, the best strategy would be to let others make the first step and run away with their gift, as reciprocating would be mere charity. But if players can remember who does who does not reciprocate, then reciprocating is a way of being preferentially chosen as partner in the future.
A critical condition for cooperation to emerge is that:     $$ \frac{G R}{C_1 C_2} > 1 + \frac{s(1)}{s’(1)} $$ (see proof there).
s(g2/g2m) is the probability for an individual with gene g2 to be selected as partner in a group in which this gene is on average g2m. The derivative s′(1) measures at equilibrium the marginal efficiency of the ability to detect cooperative agents.

This form of cooperation is still delayed (one agent must take the risk of making the first step), but this time it is the first agent who decides whether it should become friend with the partner.

Modify scenario S_Cooperation.py and implement the interaction. You need to specify two genes to control cooperation, one that controls the amplitude of the first move (g1) and another that controls the amplitude of the response (g2). The function Indiv.best_friend() returns the partner that made the best gift so far. In the interaction section, implement the symmetrical exchange and use the function Indiv.follow(Partner, PartnerOffer) that stores an asymmetrical friendship link from Indiv to Partner.

You may choose to reset the agent’s memory periodically, in the start_game function (use Indiv.detach( )). Note that partnership is not eternal anyway, due to natural death and migration. Set parameter Rounds to the number of times each individual will play the game within a season.

To control the second step, you may need to enable two additional parameters in the Configuration Editor. To do so, exit the Configuration Editor, manually edit EvolifeConfigTree.xml with your favourite editor to delete the two parasitic occurrences of the 'XXX' string and restart the Configuration Editor (starter).

Reciprocity
Copy the relevant lines of your function in the box below.
You should still observe oscillations between the average values of the two genes. You may try to figure out why it is so.

    

Forum: forum cooperation
Models of cooperation are fundamentally unstable. In a cooperating world, there is an incentive for cheating. And yet, the human species seems to be characterized by its prosociality and generalized cooperativeness.
You may share your thoughts about this apparent inconsistency.

        

            
BuntLine.jpg

Back to the main page