|
Telecom Paris
Dep. Informatique & Réseaux
October 2025 |

Module Athens TP-09
| Ada Diaconescu - Associate professor at Telecom-Paris |
| Jean-Louis Dessalles - Associate professor at Telecom-Paris |
| Samuel Reyd - PhD student at Telecom-Paris |
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.
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.
| 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.
|
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? |
| Set Tolerance to 80. What happens and why? |
|
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. |
| Set neighbourhood radius to 10. Explain what we get. |
| Restore default parameters and try 3 colours. Describe what happens. |
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.
|
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.
|
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). |
| Is DH a Nash equilibrium? |
| Is HH a Nash equilibrium? |
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).
| 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. |
|
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. |
|
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? |
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.
| 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. |
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 ).
| From time to time, links are directed towards most cooperative individuals exclusively. Otherwise, there widespread among the whole population. When does the latter occur? |
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').
| 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 ]
Reciprocal 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:
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).
|
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. |
|
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. |
