{'fraction_non_alphanumeric': 0.039837947332883185, 'fraction_numerical': 0.01185385250206317, 'mean_word_length': 4.414094232331438, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 2, '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}}
Phase transitions in a conservative Game of Life

We investigate the dynamics of a conservative version of Conway's Game of Life, in which a pair consisting of a dead and a living cell can switch their states following Conway's rules but only by swapping their positions, irrespective of their mutual distance. Our study is based on square-lattice simulations as well as a mean-field calculation. As the density of dead cells is increased, we identify a discontinuous phase transition between an inactive phase, in which the dynamics freezes after a finite time, and an active phase, in which the dynamics persists indefinitely in the thermodynamic limit. Further increasing the density of dead cells leads the system back to an inactive phase via a second transition, which is continuous on the square lattice but discontinuous in the mean-field limit.


I. INTRODUCTION
Since it was proposed by Conway about 50 years ago [1], the cellular automaton known as the Game of Life has been investigated by statistical physicists as a paradigm for emergent complex behavior based on simple, local rules. In its original version, cells situated on a square lattice can be either "alive" or "dead", and switch synchronously from one state to the other depending on how many of their 8 neighboring cells (a Moore neighborhood) are alive. More precisely, a dead cell becomes alive if exactly 3 of its neighbors are alive, while a living cell becomes dead unless it has 2 or 3 neighboring living cells. Dynamical evolution under these rules leads to a variety of complex behavior, in which living cells are able to exhibit a mixture of static (or "still-life"), oscillatory, and progressive (or "spaceship") patterns, depending on the initial conditions. From a computer-science perspective, these patterns can be used to build a universal Turing machine [2], which is able to simulate any circuit and therefore any algorithm.
From the point of view of statistical physics, the automaton gained widespread interest due to discussions [3][4][5][6] on whether it represented an example of self-organized criticality [7] in the absence of conserved quantities. It now seems that the Game of Life is in a slightly subcritical state, corresponding to a fine-tuned quasicritical nucleation process at the border of extinction [8][9][10][11].
A related topic is the appearance of phase transitions when some stochastic ingredient is added. Some previous investigations [12,13] replaced the original deterministic automaton by a stochastic one, in which Conway's rules were obeyed or subverted with various probabilities. By tuning those probabilities, the long-time behavior associated with the dynamics can be changed from one in which all cells are dead to another in which life thrives. Both continuous [13] and discontinuous [12] phase transitions can be observed, depending on the choice of probabilities. Another possibility is to keep the deterministic nature of the automaton, but introduce randomness by changing the nature of the lattice into a small-world network, obtained by replacing nearest-neighbor links with longrange ones [14]. Increasing the probability of such rewiring induces a continuous nonequilibrium phase transition from an inactive (sparse) state to an active (dense) one.
A common feature of these previous studies is that they preserve the nonconservative nature of the dynamical rules. Here, on the other hand, we modify the dynamical rules in order to enforce conservation of the number of cells of both types. We work on the square lattice, treating the system as asynchronous, and at each time step we randomly select an "unsatisfied" pair of cells, consisting of a living cell that is to become dead and a dead cell that is to become alive according to Conway's (local) rules, and we switch their positions, irrespective of their mutual distance. The evolution freezes if there are no remaining unsatisfied living or dead cells. By keeping track of the dependence of the average freezing time and of the average fractions of unsatisfied cells on the lattice size, we identify a discontinuous nonequilibrium phase transition, induced by increasing the density of dead cells, between a state in which the evolution freezes at a finite time and another state in which the dynamics persists indefinitely. Further increasing the density of dead cells leads the system back to an inactive phase via a second but now continuous transition. This paper is organized as follows. In Sec. II we describe the details of our simulations, also discussing some peculiar finite-size effects, as well as the nature of the phase transitions. In Sec. III, we present a mean-field calculation which is able to reproduce various features of our simulation results. We close the paper with a discussion in Sec. IV.

II. SIMULATIONS
Following Conway [1], we consider a square lattice and assume that each cell in a L × L lattice can be either in state a ("alive") or in state d ("dead"), and has 8 neighboring cells, i.e. a Moore neighborhood. We implement periodic boundary conditions. A living cell is satisfied if either 2 or 3 of its neighbors are also alive, and is otherwise unsatisfied; a dead cell is satisfied unless exactly 3 of its neighbors are alive. In contrast to the original version of the Game of Life, we assume a conservative, asynchronous and nonlocal dynamics: at each time step, we randomly select an unsatisfied living cell and an unsatisfied dead cell and we switch their states, also checking for changes in the satisfaction of any neighboring cell, and then we repeat the previous steps. When there are no more unsatisfied cells in either state a or state d, the evolution is frozen, which is bound to happen eventually for any finite system. Notice that the nonlocal character of the switching does not imply that the model has a mean-field character, as the satisfaction rules are still locally defined. This is analogous to what happens for the conservative contact process [15], which remains in the directed-percolation universality class despite nonlocal switches. Although the conservative and random character of the dynamics does not allow for the appearance of oscillatory or spaceship patterns, we do observe familiar static patterns when the density of dead cells is large enough, as illustrated in Fig. 1(d). For very small densities of dead cells, most living cells are unsatisfied upon freezing, as shown in Fig. 1 We work with lattice sizes ranging from L = 16 to L = 23000, performing averages over up to 10 5 random initial configurations, and for each configuration we fix the densities ρ d and ρ a = 1 − ρ d of cells in states d and a, respectively. These densities are kept invariant by the dynamics. Time increments between consecutive simulation steps are measured in units of 0.501850 (mean-field) separating the small-ρ d inactive phase from the active phase. Statistical error bars for the simulation curves are at most the size of the symbols. In the active phase, n u,a is obtained from the t → ∞ limit of the fraction of unsatisfied living cells, while in the inactive phases it represents the value of the same fraction upon freezing, which happens at a finite time. All simulation values of n u,a correspond to the largest sizes studied for each value of ρ d , and are expected to be indistinguishable from the infinite-size results at the scale of the plots. The mean-field approximation predicts an active phase comprising the region for which n u,a is a constant. the inverse number of unsatisfied cells, being given by in which N u,a and N u,d are the numbers of unsatisfied cells in states a and d, respectively. We keep track of the fractions of unsatisfied cells in each state, in which ρ a L 2 and ρ d L 2 are respectively the total number of living and dead cells. Notice from these definitions that, irrespective of the density ρ d of dead cells, we have 0 ≤ n u,a ≤ 1 and 0 ≤ n u,d ≤ 1. We also register the accumulated time T until a simulation freezes, as well as the survival probability P s (t), defined as the fraction of simulations reaching time t.
Depending on the density ρ d of dead cells, we identify three dynamical regimes, which we now discuss in turn. The resulting phase diagram is summarized in Fig. 2.
We focus first on the case of sufficiently low densities of dead cells, ρ d < ρ (1) d 0.52223. As the system size is in- (1) d 0.52223. Here we take t = 10 7 to mean t → ∞, but we checked that taking instead t = 10 6 yields indistinguishable results. Error bars not shown are at most the size of the symbols. Within statistical errors, the stationary survival probability exactly for ρ d = ρ (1) d is asymptotically size-independent, being approximately equal to 50%. (b) Time dependence of the fraction n u,d of unsatisfied dead cells for creased for a fixed ρ d ρ (1) d , the long-time survival probability first increases and then decreases to zero, as shown in Fig.  3(a). This is reflected in the time dependence of the average behavior of the fraction n u,d of unsatisfied dead cells, which, as the system size is increased for ρ d = 0.52216 < ρ (1) d , exhibits an exponential drop visible around t 100, whose depth increases with the system size; see Fig. 3(b), left panel. We thus expect that simulations freeze due to the fact that eventually there are no unsatisfied dead cells, and this is indeed verified. In the whole regime ρ d < ρ (1) d we observe that the average freezing time increases with ρ d , diverging approxi- mately as − ln ρ d − ρ (1) d , and that the corresponding average fraction n u,a of unsatisfied living cells decreases with ρ d . For this last quantity, this is shown in Fig. 2. We emphasize that, due to the fact that, as the survival probability first increases and then decreases with L for a fixed ρ d ρ (1) d , it is necessary to be extra cautious about finite-size effects.
When ρ d is slightly larger than ρ (1) d , the drop of n u,d (t) around t 100 becomes asymptotically independent of L, as suggested by Fig. 3(b), right panel. On the other hand, the survival probability tends to 1 as L → ∞; see Fig. 3(a), upper plot. Notice from Fig. 3(b) that the t → ∞ limit of n u,d (t) is size-independent and varies only slightly with ρ d , although for ρ d < ρ (1) d that value is never reached for L → ∞, as the system freezes at a finite time. We therefore expect a discontinuous behavior for both n u,d and n u,a at ρ d = ρ (1) d , and this is confirmed in the simulations; see Fig. 2, inset. This discontinuous transition between the small-ρ d inactive phase and the active phase is reproduced by a mean-field treatment discussed in Sec. III.
Inside the active phase, the freezing time diverges exponentially with the system size L. The long-time value n u,a (t → ∞) first increases with ρ d , reaching a maximum around ρ d 0.7, and then decreases, as illustrated in Figs. 2 and 4 (left panel). When ρ d approaches ρ (2) d 0.961, the decrease of n u,a (t → ∞) is compatible with a power law as suggested by the finite-size scaling analysis presented in Fig. 4 (right panel), based on the ansatz with ε = ρ d − ρ (2) d . The best data collapse, obtained using the pyfssa package [16], corresponds to ρ (2) d = 0.961(5), ν ⊥ = 1.54(5) and β 0.52 (5). The same parameters yield a collapse of data for n u,d (t → ∞), although with a narrower scaling region.
At the critical point, n u,a (t) follows a power law t −θ , with θ 0.15; see Fig. 4 (left panel). Close to the critical point, and inside the active phase, we expect this power law to be obeyed up to a relaxation time τ n which can be estimated by We therefore expect a dynamical exponent z = ν /ν ⊥ governing the relation between the relaxation time and the system size at the critical point, Finally, we discuss the case of even larger densities of dead cells, ρ d > ρ (2) d . Now the fraction of living cells is so small Figure 6. Examples of 4 local configurations around an initially unsatisfied dead cell, relevant in the large-ρ d limit, for which most likely each configuration is surrounded by dead cells. Satisfied (unsatisfied) dead cells are shown in blue (cyan), while satisfied (unsatisfied) living cells are shown in red (yellow). The upper (lower) row indicates situations before (after) the central cell is switched to a living cell. Notice the increase in the number of unsatisfied dead cells from 1 to 2 (first column) or 3 (second, third and fourth column) and the decrease in the number of unsatisfied living cells from 3 (first column) or 4 (second, third and fourth column) to 0 (first and second columns), 1 (third column) or 3 (fourth column). Take into account that, although not shown in the pictures, the central dead cells in the upper row become satisfied after switching, while the central living cells in the lower row were unsatisfied before switching. that starting from a random configuration most living cells only have dead neighbors, so that the fraction of unsatisfied living cells is very close to unity, while the fraction of unsatisfied dead cells is very small. As shown in Figs. 5(a) and (b), n u,d (t) first increases, then reaches a maximum before starting to decrease with time, whereas n u,a (t) steeply decreases as n u,d (t) increases, and then closely follows the behavior of n u,d (t) at later times. These long-time decays are faster than a power law, but slower than an exponential, possibly suggesting a power law with logarithmic corrections. The initial behavior of n u,d (t) and n u,a (t) can be understood by inspection of the relevant local configurations around an unsatisfied dead cell to be switched. Due to the small number of living cells, these relevant configurations are those in which, before the switch, almost all neighboring living cells are unsatisfied, while all neighboring dead cells are satisfied. This changes after the switch, as illustrated for some configurations in Fig. 6. As time advances, switches modify the distribution of configurations, interrupting and then reversing the increase of n u,d (t). For sufficiently large L, the dynamics is eventually frozen due to the disappearance of unsatisfied living cells, in contrast to what happens for small ρ d , a case in which freezing is due to the disappearance of unsatisfied dead cells. Nevertheless, both fractions of unsatisfied cells upon freezing approach zero in the thermodynamic limit, as shown in Figs. 5(a) and (b).
On the other hand, the average freezing time T grows with the system size L at most with a power law rather than an exponential form for large L; see Fig. 5(c). Assuming a linear relation between T and τ n at the critical point, that power law would be L z , with z 2.25, which is compatible with the behavior observed in Fig 5(c). We also observe that the distribution of freezing times (not shown) is quite narrow, with the survival probability remaining equal to unity up to approximately the average freezing time for each choice of ρ d and L, after which it decreases to zero exponentially, with a characteristic time roughly equal to the average freezing time itself. This is therefore an inactive phase, but with a different character than the one observed for small values of ρ d , in which characteristic times remain finite in the L → ∞ limit.
Finite-size effects in the large-ρ d inactive phase are influenced by the probability of a dead cell being unsatisfied in the initial random configuration. The system size L d for which we expect one unsatisfied dead cell in the initial configuration, therefore kicking off the dynamics for most configurations, is given by the solution of in which we imposed the condition that a dead cell is unsatisfied only if it has exactly 3 living cells among its 8 neighbors.
The distinction between the regimes L < L d and L > L d is reflected on the behavior of n u,d (T ), the fraction of unsatisfied dead cells upon freezing, versus the average freezing time, shown in Fig. 5(d) for three values of ρ d in the large-ρ d inactive phase. When L L d , n u,d (T ) takes values of the order of the right-hand side of Eq. (4), whereas it becomes smaller and smaller as L (and therefore T ) increases, leading to the interpretation that this corresponds to an inactive phase with somewhat peculiar properties, resembling a critical phase.
The set of critical exponents for the transition between the active phase and the large-ρ d inactive phase is therefore β 0.52, ν ⊥ 1.54, ν 3.5, z 2.25 and θ 0.15. This set is quite distinct both from the ones characterizing the directedpercolation universality class and from the sets obtained for conservative (fixed-energy) sandpile models [17], as well as the sets corresponding to other (nonconservative) variants of the Game of Life [13,14]. It is also quite different from the continuous nonequilibrium phase transitions mean-field exponents β = θ = ν = 1, ν ⊥ = 1/2 and z = 2 [18,19].

III. A MEAN-FIELD APPROXIMATION
Features resembling the ones described in the previous Section can be reproduced by a simple mean-field calculation, which can provide an estimate of the dependence, on the density of dead cells, of the asymptotic values of n u,a and n u,d . The calculation proceeds by disregarding spatial correlations, effectively replacing the Moore-neighborhood square lattice by a Cayley tree with coordination number 8, which has no loops. (As a matter of fact, as we are interested in what happens in the deep interior of the tree, we effectively work on the Bethe lattice; see e.g. Ref. [20].) The relevant variables for the calculation are the average fractions of cells of both types having k living cells as their neighbors. We denote these fractions by φ d,k for the dead cells and by φ a,k for the living cells. We have n u,d = φ d, 3 and n u,a = 1 − φ a,2 − φ a,3 .
We now consider all the possible exchanges that can happen in the lattice, which involve switching the positions of a selected unsatisfied dead cell (that always has exactly 3 neighboring living cells) and of a selected unsatisfied living cell (a cell with less than 2 or more than 3 neighboring living cells). We ignore the possibility that the selected unsatisfied cells are mutual neighbors, a situation which occurs with negligible probability in the thermodynamic limit. By analyzing each possible exchange at a time, we can keep track of the change in the average number of cells of each type having k neighboring living cells (0 ≤ k ≤ 8). Denoting these numbers by N a,k and N d,k , with N a,k = ρ a L 2 φ a,k and N d, in which here L 2 denotes the number of sites in the lattice, the corresponding changes can be calculated by taking into account that, given a specific movement involving a selected unsatisfied living cell with living neighbors: (i) the selected unsatisfied dead cell moves into a neighborhood which contains living cells, thus reducing N d, 3 and increasing N d, both by p , the probability of selecting an unsatisfied living cell with living neighbors; (ii) the selected unsatisfied living cell moves into a neighborhood containing 3 living cells, thus increasing N a,3 and reducing N a, both by p ; (iii) the old neighbors of the selected dead cell now have one more living neighbor, reducing N d,k and N a,k while increasing N d,k+1 and N a,k+1 by amounts which depend both on and on the probabilities of finding a neighbor with k living neighbors (0 ≤ k ≤ 7); (iv) the old neighbors of the selected living cell now have one less living neighbor, reducing N d,k and N a,k while increasing N d,k−1 and N a,k−1 by amounts which depend both on and on the probabilities of finding a neighbor with k living neighbors (1 ≤ k ≤ 8). In order to properly account for the various possibilities and their respective probabilities, it should be kept in mind that φ a,k and φ d,k , for a given k, combine different local configurations containing k neighboring living cells.
Going through the above considerations, we can write in which s ∈ {a, d} indicates the type of cell, U s,k, ∈ {0, ±1} comes from points (i) and (ii) above, W s,k, ≥ 0 and X s,k, ≤ 0 come from the increases and decreases in N s,k due to point (iii) above, while Y s,k, ≤ 0 and Z s,k, ≥ 0 come from the decreases and increases in N s,k due to point (iv) above. Explicitly, we have U s,k, = W s,k, = X s,k, = Y s,k, = Z s,k, = 0 for = 2 or = 3, while, for = 2 and =3, The factors in Eq. (7), with represent the conditional probabilities that a type-s old neighbor of the selected dead cell had k living neighbors, given the allowed range 0 ≤ k ≤ 7, while the analogous factors represent the conditional probabilities that a type-s old neighbor of the selected living cell had k living neighbors, given the allowed range 1 ≤ k ≤ 8. The binomial coefficients account for the number of ways of arranging the 7 remaining neighbors of a site neighboring a central site, out of the various possibilities for the configurations of those neighbors. Finally, p can be written as with p 2 = p 3 = 0. We can write differential equations for the time evolution of the fractions φ s,k by noting that, as stated in the previous Section, a single exchange advances time by ∆t such that In the limit L → ∞, ∆t approaches zero and we obtain, by using Eq. (6), with ∆N s,k given by Eq. (7). We numerically solved the differential equations (15) starting from random initial conditions, which correspond to For 0 ≤ ρ d ≤ ρ (mf) d 0.501850, φ d,3 (equal to the fraction of unsatisfied dead cells n u,d ) is the only φ s,k that eventually  Fig. 7, the mean-field freezing time tends to a finite value T (mf) 3.23148, at which n u,d and its time derivative both become zero, right before n u,d rises again, approaching a value 3.4 × 10 −4 as t → ∞. For larger values of ρ d there are no zeros for any φ s,k (t), meaning that the freezing time is infinite, a signature of the active phase. Finally, as shown in the left inset of Fig. 3, the fraction of unsatisfied living cells n u,a as ρ d is increased towards ρ (mf) d approaches a nonzero value n (mf) u,a 0.263120, which differs only slightly from the mean-field result n u,a (t → ∞) 0.258111 obtained throughout the active phase, as seen in the blue dashed curve in Fig. 7.
Therefore, in agreement with simulations, the mean-field approximation predicts a discontinuous transition between a small-ρ d inactive phase and an intermediate-ρ d active phase. As shown in Fig. 3, there is quite good quantitative agreement between simulations and mean-field theory for densities ρ d 0.2, regarding the fraction of unsatisfied living cells upon freezing, but also (not shown) the average freezing time. Notice also the qualitative agreement, in the neighborhood of the transition, between the behaviors of the curves for n u,d (t) obtained from the mean-field calculation (continuous red and brown curves in Fig. 7) and the large-L simulation results (extrapolation of the curves in Fig. 3(b)).
The freezing time remains infinite for intermediate densi- .878211, but becomes finite again for higher densities, ρ (mf2) d < ρ d < 1, signaling the onset of a second, large-ρ d inactive phase, although simulations predict a critical-like behavior for the whole region ρ (2) d < ρ d < 1. This discrepancy between simulation and mean-field theory comes from the fact that, as discussed towards the end of Sec. II, at higher densities most exchanges on the square lattice involve isolated unsatisfied living cells with 8 dead neighbors, virtually all of which remain unsatisfied after the switching, so that new unsatisfied dead cells mostly appear in the neighborhood of the rare unsatisfied dead cells generated by the initial condition. Such correlations between dead cells cannot be captured by our mean-field treatment.

IV. CONCLUSIONS
We showed, through simulations and a mean-field calculation, that a conservative version of the Game of Life exhibits two nonequilibrium phase transitions separating an active phase from two distinct inactive phases as the density ρ d of dead cells is increased. The long-time fractions n u,a and n u,d of unsatisfied living and dead cells are both nonzero in the active phase, while, in the thermodynamic limit, the dynamics in the small-ρ d (large-ρ d ) inactive phase is interrupted when n u,d (n u,a ) becomes zero. The transition between the small-ρ d inactive phase and the active phase is discontinuous, according to both simulations and mean-field theory. On the other hand, simulations show that the transition between the active phase and the large-ρ d phase is continuous, with a set of critical exponents that, to the best of our knowledge, does not correspond to any of the known universality classes for multicomponent nonequilibrium systems [21].
Improvements to the mean-field approximation can be achieved by analyzing all 2 8 possible local configurations of neighbors surrounding a given cell in order to identify the restrictions imposed by the fact that some of the neighbors of the central cell are also mutual neighbors. This requires dealing not with the fractions of cells having a given number of living cells in their neighborhood, but with the fractions of cells with a specific configuration of neighbors. Thus, instead of a set of 16 differential equations, one ends up with a set of 2 9 differential equations to write and solve. We leave this improvement for future investigations. The simple mean-field calculation described in this paper can nevertheless be used to study phase transitions in other conservative models, such as the extensions of Schelling's model recently investigated by the present authors [22].
Finally, an interesting question arises from the fact that other nonequilibrium models, such as the contact process, can be equivalently defined either (i) in terms of fixed transition rates, with no conserved quantities, the densities of each type of cell being determined by the dynamics, or (ii) by fixing the densities of each type of cell, with the average value of the transition rate determined by the dynamics [15]. One might wonder whether there is a nonconservative version of the Game of Life discussed here, but defined in terms of fixed transition rates, and how that would be related to the original Game of Life. The fact that the dynamical rules are non-Abelian -in other words, that the order in which movements are performed does affect the resulting configurations -suggests that such relation, if it indeed exists, would not be simple. This is also the reason why we resist the temptation to associate the large-ρ d inactive phase identified in our work with the quasicritical behavior of the original automaton [8][9][10][11].