<commit_before>\section*{Results}
Computer simulations of the model presented above show that the probability of property violation $s^{*}$ beyond which cooperation cannot not survive is highly dependent on the migration range $M$ and the population density $d$. At time $t=0$, the simulation starts with an equiprobable number of cooperators and defectors scattered uniformly across occupied sites.\\ 

When there is no migration ($M=0$), and by definition no property violation ($s=0$), evolution occurs only through replication of direct neighbor strategies. Cooperators form clusters to prevent invasion by defectors (see Figure \ref{fig:configurations_t200}{\it A}). In absence of property violation, any migration range $M \geqslant 1$ unambiguously promotes cooperation (see for instance Figures \ref{fig:configurations_t200}{\it B} and \ref{fig:configurations_t200}{\it E}, and defectors rapidly disappear (the migration range has no effect on the speed at which cooperators invade the population. See Figure SI \ref{figSI}).\\

However, considering the evolution of cooperation when individuals have small migration range $M \leqslant 5$, even little property violation can completely destroy cooperation, past an abrupt critical (phase transition) point $s^{*}$. For instance, for a unit Moore's migration range, a $8\%$ probability property violation is sufficient to destroy cooperation (see Figure \ref{fig:configurations_t200}{\it D}, as well as Figure \ref{fig:configurations_t200}{\it G} for $M=5$). For $s < s^{*}$, a majority of cooperators ($c>0.5$), along with a minority of defectors, which cluster together for $M=1$ (see Figure \ref{fig:configurations_t200}{\it C}) or scatter around clusters of cooperators for $M \geqslant 5$ (see e.g., Figure \ref{fig:configurations_t200}{\it F}).\\

With larger Moore migration ranges ($M \geqslant 5$), cooperative populations can sustain much more property violation. For instance, for population density $d=0.5$, cooperators account for on average 80\% of the population after 200 iterations, with property violation as large as $s^{*}_{-} = 0.45$ with migration range $M=11$ (see Figure \ref{fig:configurations_t200_M11plus}{\it B}), as well as for $M=13$ and nearly half chance for property violation (see Figure \ref{fig:configurations_t200_M11plus}{\it F}).\\

Also for large migration ranges ($M \geqslant 5$), an intermediary state $s^{*}_{-} \leqslant s \leqslant s^{*}_{+}$ appears, in which cooperative populations can survive while on average in minority (see Figures \ref{fig:configurations_t200_M11plus}{\it C} and \ref{fig:configurations_t200_M11plus}{\it G}). For $s > s^{*}_{+}$, cooperative populations do not strive (see Figures \ref{fig:configurations_t200_M11plus}{\it D} and \ref{fig:configurations_t200_M11plus}{\it H}).\\

As individuals search their {\it best-shot} -- maximizing expected pay-off at the selected location (in their Moore's migration range $M$) -- they only try to expel another individual, with property violation probability $s$, if this {\it best-shot} location is already occupied. The effects on cooperation, are not only a function of property violation, but also of the migration range as well as the population density: The lower the density $d$ and the larger the migration range $M$, the more opportunities to find a {\it best-shot} location, which is empty. On the contrary, the higher the population density and the smaller the migration range, the more individuals must rely on property violation to make a successful move. As shown on Figure \ref{fig:heatmaps} for $M= \{ 5,7,11,18\}$, the level of property violation $s^{*}$ beyond which cooperation cannot survive, depends on both the migration range $M$ and the population density $s$. For large $M \geqslant  7$, the intermediary state $s^{*}_{-} \leqslant s \leqslant s^{*}_{+}$, where cooperative populations can survive while on average in minority, appears in green. We also find that for high population densities $d > 0.9$, cooperation cannot survive for $s > 0$; Even with no property violation $s=0$, there is a probability that cooperators cannot invade the whole population, in particular for large migration ranges (see SI Section \ref{SI:d09}).\\


\subsection*{Going Further}
To further understand the properties of the {\it property game} as a special {\it success-driven} migration game, we shall consider how individuals exploit the degrees of freedom offered to them, such as empty sites available when $d < 1$ and their capabilities to reach these sites according to their mobility $M > 0$, how they achieve even greater opportunities by expelling individuals from their location. We finally investigate how cooperation is affected by the relocation of expelled individuals. In our model, individuals are fully rational as they will imitate they imitate their neighbors and migrate with probability $1$, if the find a strategy and a location respectively, with higher payoff. Only the probability of property violation is uncertain and controlled by $0 \leqslant s \leqslant 1$. \\

{\bf We consider the actual mobility if individuals $m = \sqrt{|x^2 + y^2|} \leqslant M$ bounded by the migration range $M$, versus average distance of sites (weighted by their payoff and whether they are free or not). This has something to do with the structure of clusters $\rightarrow$ a proxy could be density of cooperators vs. defectors in the migration range}.

{\bf We shall also who uses property violation? defectors or cooperators?}

{\bf Note that the larger the migration range, the more likely to find a number of sites for which the payoff is the same. In that case, the migration site is chosen in the following way: randomly among empty sites, and if there is no empty site, randomly among non empty site with some probability of property violation $s$. Note that calculating payoff from 8 neighbors instead of 4 may help alleviate this intrinsic randomness.}

{\bf Note that if the migration range is large enough, agents can ``jump" from one cluster to another $\rightarrow$  think of hubs (technology, finance, politics)}<commit_msg>updated results section<commit_after>\section*{Results}

\subsection*{Societies may collapse in face of high property violation}

\paragraph{Phase transition: }

{\bf [show a three panels Figure for phase transition with (a) $M=1$, (b) $M=5$ and (c) a plot with $s^{*}$ as a function of $d$ and $M$. Note that $s^{*}$ should be an area, corresponding to the phase transition area. If we want to have it in 3D, or heatmap, we can compute the expected level of cooperation (cooperation $\times$ probability to achieved sustained cooperation]}

\paragraph{Population density and migration ranges: }


\subsection*{Decoupling for sustainable cooperation}
The sudden phase transition from high cooperation to collapse suggests a very fine-grained factor deciding whether a society will strive. To maximize their payoff, players can either update their prisoner's dilemma strategy (cooperate or defect with neighbors), migrate to an empty location, or try to expel another player from her location. The three strategies are opportunity based, deterministic for the first two (i.e., if players are presented with better options they will update their strategy or migrate) and random for property violation, reflecting the unsure nature of taking the property of someone else. 

\paragraph{Payoff dynamics}
At the coarse-grained level, the expected payoff increase $E(update) = p(update) \times p(\Delta_{payoff})$, with $ [p(update) = 1~|~p(\Delta_{payoff}] > 0)$ for prisoner's dilemma strategy update and success-driven migration and $[p(update) = s ~|~p(\Delta_{payoff}) > 0]$ for property violation, shows over time, both how much a strategy is used and how much payoff increase it brings to individuals. At the coarse-grained level, the unconditioned $p(update)$ is measured as the rate of occurrence of each strategy update and migration occurrence. The evolution of the expected $\Delta_{payoff}$ unveils the subtle differences between a sustainable society establishing in presence of property violation compared to a collapse of cooperation.As shown on Figure \ref{fig:tseries} for the same property violation $s = \{ 0.037, 0.042\}$ at the limit of the phase transition range ($d=0.5,M=5$), two outcomes may occur independently of the initial grid configuration: either cooperation can be established (upper panels {\bf a.} and {\bf b.}), or it {\it misses the goal} and cooperation collapses in finite time (lower panels {\bf c.} and {\bf d.}), even though cooperation initially increased to high levels $c > 0.7$ like for the sustainable cases (upper panels). In the sustainable case, the strategy with highest  expected payoff increase is never prisoner's dilemma strategy update: At first, {\it success-driven} migration provides the highest expected payoff increase ($E_{migration} > E_{update} > E_{expell}$), then around $i =150'000$ iterations, a switch occurs and the highest expected payoff increase is provided by property violation ($ E_{expell} > E_{update} > E_{migration}$).\footnote{{\bf nb: It's important to note that overall expected payoff is not increasing overall: players expelled from their site suffer a negative $\Delta_{payoff}$ (not shown), as well as neighbors around the focal player who changes prisoner's dilemma strategy to defect, or a defector migrating or performing a property violation.}}

\paragraph{Theory:} In the first phase of the game ($i \lesssim 150'000$ and $E_{migration} > E_{update} > E_{expell}$), clusters of cooperators don't exist yet, which leave high incentives to migrate (whether defector or cooperator), low incentive to update prisoner's dilemma strategy (because there is a best shot in migration, which is costless), and low incentive to expel (most individuals engaging into property violation are already defectors, but in order to increase substantially their payoff they must shoot for areas with clusters of cooperation, which are still rare). As clusters of cooperators get formed and cooperation increases overall, the expected payoff increase $E$ decreases for all strategies update and migration options (because the population gets organized and less options arise for migration, or for changing prisoner's dilemma strategies) and they all get close to similar levels, but property violation is yielding the highest $E$. Since most individuals engaging into property violation are already defectors ({\bf insert figure here)}), {\bf we propose} that property violators tend to select their best shot location in the middle of cooperation clusters where they can substantially increase their payoff (compared to staying at the boundaries of a cluster). But, by doing so they a leave an empty location to the expelled player (most likely a cooperator), which in turn ``breaks the perimeter" of defectors around the cluster.\footnote{ {\bf [Here, this is clearly the migration game at work, but we must describe it more in details, more clearly, possibly with an illustration]}. Note also that in this regime the overall level of cooperation remains almost stable or grows very limitedly, so the increase of cooperators {\bf (unclear exactly how D $\rightarrow$ C) c.f. visual evidence and Dirk paper} compensates for property violations and to some extent for Prisoner's dilemma strategy updates C $\rightarrow$ D}.

\paragraph{Property violations are tackled locally...}
Part of the theory presented above implicates that in the case of sustained cooperation, migrations from {\it success-driven} migration, property violation and {\it forced} migration as a result of property violation should remain local around cooperation clusters. Figure \ref{fig:migration_range} shows that ranges for all the aforementioned migration types decrease significantly more when sustainable cooperation gets established, compared to the case of collapsing societies. In other words, property violation is best tackled locally while long-range {\it success-driven} migration ({\bf as a result of property-violations? Defectors or Cooperators?}) is a sign of unsustainable society.

\paragraph{...And strategy updates (resp. migrations) are strongly decoupled:}
Similarly, while during the organization phase ($i \lesssim 150'000$) strategy updates and migrations are strongly coupled in both sustainable and unsustainable cases (see correlograms in Figure \ref{fig:crossRankCorr} {\bf a.} and {\bf c.}), the coupling disappears almost completely ($i \gtrsim 150'000$) in the sustainable case, while it remains high in the unsustainable situation (Figure \ref{fig:crossRankCorr} {\bf b.} and {\bf d.}).

\paragraph{As a result:}  In presence of property violation, societies can establish cooperation only if  they achieve spatial and strategy decoupling, during their organization phase. Beyond a level of property violation, which is contingent to population density and migration range, cooperation cannot be established: Even though the cooperation level increases to more than 70\%, it suddenly collapses. An early signal for predicting success is when the order of expected payoff increases switches from $E_{migration} > E_{update} > E_{expell}$ to $ E_{expell} > E_{update} > E_{migration}$. Similarly, a signal of unsustainable organization of society in presence of property violation is when expected payoff increases switches to $ E_{update} > E_{migration} > E_{expell}$ and later on to $ E_{update} > E_{expell} > E_{migration}$. In our simulations, this early signal can be seen around ($i \approx 150'000$ iterations), while collapse tends to happen around ($i \approx 600'000$ iterations).\footnote{It remains unclear which minimum amount property violation must be removed in order to ``correct" the trajectory during this ``incubation" period.}

\subsection*{Enduring and adaptive societies}

3 questions here:

\begin{enumerate}
  \item enduring societies already fitted for property violation at the transition point
  \item enduring societies fitted for no property violation or way below transition point ?
  \item adaptive societies: When property violation is suddenly increased, how much does a society can adapt and/or time a society has before the ``no return" point beyond which lowering property violation is useless (c.f. footnote above)? 
\end{enumerate}

\paragraph{Enduring societies at the transition point:}




%Computer simulations of the model presented above show that the probability of property violation $s^{*}$ beyond which cooperation cannot not survive is highly dependent on the migration range $M$ and the population density $d$. At time $t=0$, the simulation starts with an equiprobable number of cooperators and defectors scattered uniformly across occupied sites.\\ 
%
%When there is no migration ($M=0$), and by definition no property violation ($s=0$), evolution occurs only through replication of direct neighbor strategies. Cooperators form clusters to prevent invasion by defectors (see Figure \ref{fig:configurations_t200}{\it A}). In absence of property violation, any migration range $M \geqslant 1$ unambiguously promotes cooperation (see for instance Figures \ref{fig:configurations_t200}{\it B} and \ref{fig:configurations_t200}{\it E}, and defectors rapidly disappear (the migration range has no effect on the speed at which cooperators invade the population. See Figure SI \ref{figSI}).\\
%
%However, considering the evolution of cooperation when individuals have small migration range $M \leqslant 5$, even little property violation can completely destroy cooperation, past an abrupt critical (phase transition) point $s^{*}$. For instance, for a unit Moore's migration range, a $8\%$ probability property violation is sufficient to destroy cooperation (see Figure \ref{fig:configurations_t200}{\it D}, as well as Figure \ref{fig:configurations_t200}{\it G} for $M=5$). For $s < s^{*}$, a majority of cooperators ($c>0.5$), along with a minority of defectors, which cluster together for $M=1$ (see Figure \ref{fig:configurations_t200}{\it C}) or scatter around clusters of cooperators for $M \geqslant 5$ (see e.g., Figure \ref{fig:configurations_t200}{\it F}).\\
%
%With larger Moore migration ranges ($M \geqslant 5$), cooperative populations can sustain much more property violation. For instance, for population density $d=0.5$, cooperators account for on average 80\% of the population after 200 iterations, with property violation as large as $s^{*}_{-} = 0.45$ with migration range $M=11$ (see Figure \ref{fig:configurations_t200_M11plus}{\it B}), as well as for $M=13$ and nearly half chance for property violation (see Figure \ref{fig:configurations_t200_M11plus}{\it F}).\\
%
%Also for large migration ranges ($M \geqslant 5$), an intermediary state $s^{*}_{-} \leqslant s \leqslant s^{*}_{+}$ appears, in which cooperative populations can survive while on average in minority (see Figures \ref{fig:configurations_t200_M11plus}{\it C} and \ref{fig:configurations_t200_M11plus}{\it G}). For $s > s^{*}_{+}$, cooperative populations do not strive (see Figures \ref{fig:configurations_t200_M11plus}{\it D} and \ref{fig:configurations_t200_M11plus}{\it H}).\\
%
%As individuals search their {\it best-shot} -- maximizing expected pay-off at the selected location (in their Moore's migration range $M$) -- they only try to expel another individual, with property violation probability $s$, if this {\it best-shot} location is already occupied. The effects on cooperation, are not only a function of property violation, but also of the migration range as well as the population density: The lower the density $d$ and the larger the migration range $M$, the more opportunities to find a {\it best-shot} location, which is empty. On the contrary, the higher the population density and the smaller the migration range, the more individuals must rely on property violation to make a successful move. As shown on Figure \ref{fig:heatmaps} for $M= \{ 5,7,11,18\}$, the level of property violation $s^{*}$ beyond which cooperation cannot survive, depends on both the migration range $M$ and the population density $s$. For large $M \geqslant  7$, the intermediary state $s^{*}_{-} \leqslant s \leqslant s^{*}_{+}$, where cooperative populations can survive while on average in minority, appears in green. We also find that for high population densities $d > 0.9$, cooperation cannot survive for $s > 0$; Even with no property violation $s=0$, there is a probability that cooperators cannot invade the whole population, in particular for large migration ranges (see SI Section \ref{SI:d09}).\\
%
%
%\subsection*{Going Further}
%To further understand the properties of the {\it property game} as a special {\it success-driven} migration game, we shall consider how individuals exploit the degrees of freedom offered to them, such as empty sites available when $d < 1$ and their capabilities to reach these sites according to their mobility $M > 0$, how they achieve even greater opportunities by expelling individuals from their location. We finally investigate how cooperation is affected by the relocation of expelled individuals. In our model, individuals are fully rational as they will imitate they imitate their neighbors and migrate with probability $1$, if the find a strategy and a location respectively, with higher payoff. Only the probability of property violation is uncertain and controlled by $0 \leqslant s \leqslant 1$. \\
%
%{\bf We consider the actual mobility if individuals $m = \sqrt{|x^2 + y^2|} \leqslant M$ bounded by the migration range $M$, versus average distance of sites (weighted by their payoff and whether they are free or not). This has something to do with the structure of clusters $\rightarrow$ a proxy could be density of cooperators vs. defectors in the migration range}.
%
%{\bf We shall also who uses property violation? defectors or cooperators?}
%
%{\bf Note that the larger the migration range, the more likely to find a number of sites for which the payoff is the same. In that case, the migration site is chosen in the following way: randomly among empty sites, and if there is no empty site, randomly among non empty site with some probability of property violation $s$. Note that calculating payoff from 8 neighbors instead of 4 may help alleviate this intrinsic randomness.}
%
%{\bf Note that if the migration range is large enough, agents can ``jump" from one cluster to another $\rightarrow$  think of hubs (technology, finance, politics)}
{'fraction_non_alphanumeric': 0.07719657120592247, 'fraction_numerical': 0.012565751022793687, 'mean_word_length': 5.143925792938361, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7463594', 'n_tokens_mistral': 5082, 'n_tokens_neox': 4675, 'n_words': 2873}