A synthetic microbial Daisyworld: planetary regulation in the test tube

The idea that the Earth system self-regulates in a habitable state was proposed in the 1970s by James Lovelock, who conjectured that life plays a self-regulatory role on a planetary-level scale. A formal approach to such hypothesis was presented afterwards under a toy model known as the Daisyworld. The model showed how such life-geosphere homeostasis was an emergent property of the system, where two species with different properties adjusted their populations to the changing external environment. So far, this ideal world exists only as a mathematical or computational construct, but it would be desirable to have a real, biological implementation of Lovelock’s picture beyond our one biosphere. Inspired by the exploration of synthetic ecosystems using genetic engineering and recent cell factory designs, here we propose a possible implementation for a microbial Daisyworld. This includes: (i) an explicit proposal for an engineered design of a two-strain consortia, using pH as the external, abiotic control parameter and (ii) several theoretical and computational case studies including two, three and multiple species assemblies. The special alternative implementations and their implications in other synthetic biology scenarios, including ecosystem engineering, are outlined.


Introduction
Our biosphere is the result of a long-term evolutionary experiment where living life forms and their environments have been interacting closely and on multiple scales through millions of years.The composition of our biotas has been changing, sometimes in dramatic ways, as shown by the fossil record of life [1,2].This evolutionary process has been taking place on a planet that has also experienced profound changes.Some were caused (or driven) by astronomical phenomena, from deterministic orbital cycles to fateful asteroid impacts.However, major changes took place as a consequence of the entangled nature between climate and the biosphere [3].The deep connections between environment and life leave a mark in the geological past.How has life influenced climate and vice versa?As pointed out by Vernadsky [4], the emergence of life fundamentally transformed the geosphere.One specially interesting observation made by geochemist James Lovelock in the 1970s was the realization that our planet should have been driven by our Sun into higher temperature regimes.
We know from our two closest planetary neighbours, Mars and Venus, that steady changes in physical parameters can trigger runaway effects leading to an inhabitable planet [5].In general, positive feedback loops can drive a planet to extreme steady states, from boiling temperatures to a snowball [3,6].And yet, life on Earth has emerged and diversified, somehow dealing with the impacts of external drivers.To explain such stability, Lovelock suggested that an active coupling between life and physical systems make up the planet [7][8][9][10].To make this point more explicit, Watson & Lovelock proposed in 1983 a simple model of planetary regulation known as the Daisyworld model (DWM) [11,12].In a nutshell, the DWM considered an ideal planet where two kinds of agents, namely black and white daisies, had a distinct impact on planet albedo thus changing the local temperature in a way that could allow for climate stability over a wide range of solar luminosity values.Since its formulation, the DWM has become a canonical model for Earth system science [13] and has been used to explore a very diverse range of problems, from tipping points [14,15], to evolutionary dynamics [16,17] to climate bistability in exoplanets [18].In contrast to other problems, the planetary scale makes it rather unlikely to approach this coupling between environment and ecology in terms of controlled experimental conditions.Within synthetic biology, successful modelling and implementation of engineered ecosystems has been achieved, including cooperative consortia [19,20], predatorprey systems [21] or even multispecies assemblies [22][23][24].Could such a synthetic counterpart be found for the DWM?
A general formulation of the Watson-Lovelock model is described by means of a set of coupled differential equations defining an ecological model, namely (see [25] and references therein): where x k (k = 1, …, n) is the population size of the kth species.The parameter β k (T ) is a temperature-dependent growth rate, whereas δ k is the corresponding decay (death) rate.A logistic saturation is introduced by the 1 À P j x j term.The basic feedback loops involved are represented in figure 1a for the standard two species (n = 2) model.Increasing luminosity can trigger the growth of both kinds of vegetation, at rates indicated by β k (T ) (with k = 1, 2), here using k to refer to the different kinds of daisies, as a generalization, further on we specify which daisies are at play.In the best known (and simpler) version, two species are considered and the following model was explored, for a 'world' involving black (x b ) and white (x w ) daisies where [1 − x w − x b ] introduces the available bare soil that both species can occupy.In figure 1a, we sketch the basic model components using a spatial version [26][27][28], with dark, white and grey sites indicating black and white daisies and bare soil, respectively (lower inset, figure 1a).These equations remind us of a competition model, but the relevant complexity is captured within the β i (T ) factors (with i = b, w), for black and white, defined by means of a single-humped function involving an optimum.The details of this model can be found elsewhere [11,12] but the crucial intuition is that the growth rates of each kind of daisy is affected by temperature in opposite ways.At low temperature, black ones will thrive since they will warm their local environment and spread.As T increases, white daisies are favoured because they cool their environment locally.The area covered by each species contributes to the albedo and affect local temperatures in such a way that a global temperature regulation emerges, leading to a stable regime of local temperatures, as shown in figure 1b.Here the grey, increasing trend indicates how temperatures will rise in the absence of biological control.The underlying populations of each type are also shown in figure 1c.The DWM, despite its specific traits and potential challenges in translating it to the real biosphere, offers a valuable principle of living homeostasis that warrants consideration under broader assumptions.The concept of a living ecosystem that can respond to external forces and readjust itself to preserve diversity or some global property is inherently intriguing.It opens the door to creating mathematical and In this paper, an equivalent system is proposed (d ) using a bioreactor where an external input is also present (H þ in ) that would increase the pH of the medium, unless feedback controls are present.In this case, two different strains of bacteria able to increase or decrease the pH would replace the daisies.
computational models representing such homeostatic ecologies, but an even more relevant prospect lies in constructing a real living ecosystem that echoes Lovelock's vision.Synthetic biology emerges as an ideal candidate for achieving this ambitious goal.Through genetic engineering techniques, scientists have successfully designed cells with novel functionalities and orchestrated their interactions in intricate ways.Consequently, the main objective of this paper is to demonstrate the theoretical feasibility of constructing a synthetic Daisyworld.
Creating a living surrogate of the original DWM could help explore the general problem in novel ways, as well as providing a rich context to explore the role of lower-scale features (such as molecular regulation) on the global regulation processes.The challenge is not minor: an experimental surrogate of the planetary coupling between life and environment involving cooperative feedback is far from obvious.However, although a potential choice could involve using temperature as the driving parameter, there are other no less important properties that have also been controlled at the planetary level.One of them is acidity [9]: despite the tendency towards acidification associated with increasing oxidation of the atmosphere, the mean pH of the oceans has been remarkably stable over the Phanerozoic [29][30][31][32].As pointed out in [3], 'the daisies are a surrogate for any kind of life that can affect the global temperature-and temperature could equally well be any other environmental variable that life cares about, for instance the oxygen concentrations, or pH."And indeed in their early analysis of the problem, Margulis & Lovelock already pointed out that, along with temperature and atmosphere composition, ocean acidity has been under feedback control [9].
In this work, we choose pH as a relevant environmental parameter that can be used as an external, tuneable input.Thus, we instead consider an alternative that allows a straightforward approach that captures all the relevant feedbacks and allows for a microcosm/mesocosm implementation (figure 1d ) based on a synthetic microbial ecosystem where pH is tuned by two populations that will play the role of our daisies.

Methods
This paper delves into two crucial aspects concerning the definition of a synthetic microbial Daisyworld.Firstly, we explore a collection of genetic circuits linked to a two-strain consortia specially engineered to regulate the environmental pH.Drawing inspiration from recent research on the controlled management of industrial fermentation [33], we present a novel synthetic microbial consortium aligned with the regulatory feedback principles of the DWM.Secondly, we demonstrate how the well-established impacts of acidity on microbial growth can be mapped onto ecological network models, akin to those of the DWM based on temperature and albedo.

Microbial Daisyworld: synthetic circuits
The success of implementing a pH-based synthetic DWM hinges on two key factors: (i) ensuring a strong alignment with the growth response assumptions originally formulated by Lovelock, which were based on local temperature and (ii) skilfully engineering microbial-environment interactions to effectively regulate local pH, simulating the feedback mechanisms depicted in figure 2a.Extensive research has been conducted on the growth responses of microorganisms to pH, leading to the development of various mathematical models to characterize their behaviour.Notably, the analysis of the relative growth rate against pH reveals a distinctive inverted parabolic pattern [34], which harmonizes with the foundational assumptions of the DWM.These assumptions entailed a smooth curve with a single optimum and welldefined limits.Empirical data from diverse species, such as Escherichia coli or Listeria sp., demonstrate symmetric functional responses within a pH range of [pH m , pH M ], where pH m and pH M represent the zero-growth limits of the fitted curve [34].
While different mathematical models, such as the Presser [35] or Lambert-Pearson [34,36] models, have been proposed, they all exhibit a near-parabolic behaviour.Consequently, the effects of pH closely align, in mathematical terms, with the control space assumptions of the DWM.This congruence underscores the potential feasibility of establishing a synthetic microbial Daisyworld based on pH regulation.
Is it possible to design a synthetic consortium comprising two strains that can effectively control the acidity of the environment?Our aim is to create a pair of designed strains capable of In this context, the acidity level within the medium influences cellular replication (self-replication loops).Simultaneously, both species reciprocally influence the acidity of the medium.A similar logic of feedback loops can be described (b) where now two microbial populations would also reduce or increase local acidity.The whole design, including the corresponding genetic constructs, is depicted in (c).
royalsocietypublishing.org/journal/rsif J. R. Soc.Interface 21: 20230585 responding to changes in pH in a manner that mirrors Lovelock's concept, as illustrated in figure 2a,b.In this scenario, the two engineered strains would function in opposing ways: although they share a common optimum pH, they would either increase or decrease the environmental acidity/alkalinity levels.This complementary behaviour would lead to a mutual self-regulation, ideally maintaining a constant environmental pH value.In a broader context, this approach represents a specific application of metabolic engineering facilitated by synthetic biology [37].Unlike traditional methods that involve continuous monitoring and manual addition of sterile bases and acids as needed [33,38], our case study focuses on developing a system capable of self-correcting deviations from the optimal pH.By doing so, we aim to eliminate the need for constant finetuning, making the process more efficient.
We propose the utilization of two engineered cell types (figure 2c): the acid-producing and the base-producing strains growing in a chemostat supplying a constant flow of nutrients and removing a constant proportion of cells.The acid-producing strain incorporates the ldhA functional gene responsible for expressing lactate dehydrogenase.This enzyme facilitates the conversion of pyruvate to lactic acid, resulting in a decrease in external pH [33].Conversely, the base-producing strain employs the kivd functional gene, encoding α-ketoisovalerate decarboxylase.This enzyme is involved in the decarboxylation of branched-chain α-keto acids derived from branched-chain amino acids transamination into aldehydes [39].In simpler terms, it catalyses the conversion of 2-keto-acid to aldehyde, leading to an overproduction of ammonia, subsequently reducing the medium's acidity by forming ammonium ions.While other genes like glsA or gadA could have been considered to catalyse ammonium ion production through alternative processes [33], using them might result in lower yields.
To ensure robustness in the experiments, we propose employing the E. coli knockout strain with a deletion in the glutamine synthetase gene (Keio collection JW3841-1), yielding the ΔglnA genotype.By blocking ammonia re-uptake through this deletion, we can enhance the performance of the base-producing strain.Additionally, we recommend a deletion in ΔlldP, which encodes an inner membrane permease involved in lactate uptake [40,41].This modification further supports the function of the acid-producing strain, ensuring its efficiency in the system.
Regarding promoter usage, we propose employing pTac in both genetic devices, as it is commonly used to control and overexpress recombinant proteins.However, any controllable promoter without leakiness and with high fold change expression could also be suitable.If an imbalance is detected in the production of both ldhA and kivd genes, the genetic devices could be easily modified to address the issue by changing one device to a different controllable promoter, such as pTet-ldhA or pTet-kivd.Our proposed model involves the production of strong acids/bases, but the generation of such highly reactive chemicals would be detrimental to the survival of the bacteria.Therefore, we suggest using an experimental system with production of weaker, autonomously controlled reactants.This approach aims to minimize differences between the model and the experiments.
Furthermore, to facilitate real-time dynamics of the two strains and track the experimental process, fluorescent reporter genes would be used.We suggest using pH-sensitive fluorophores such as green and red fluorescent proteins.The green fluorescent protein GFP-pHluorin and the red fluorescent protein mCherryEA have been identified as ratiometric pH sensors, where the protonation of the chromophore is pH-dependent.They exhibit an approximately eightfold increase in expression with increasing pH values, ranging from 5 to 9 [42,43].
This synthetic consortium would grow in a bioreactor environment (figure 1c) with a stable supply of fresh media ensuring nitrogen availability (required for a proper ammonia production).

Microbial Daisyworld: two-species model
Using the known parabolic shape of relative growth responses to acidity, a simple mathematical model can be build under the assumption that the two synthetic strains described above can be engineered.The model now requires taking into account the fact that changes can be observed on two, connected scales.One is described in terms of relative cell populations.The second is a cell-level dynamics associated with the pH balances between the intracellular concentration and the one they perceive from their local environment.
The equations that are used to describe the cell dynamics are a coupled set of equations describing the growth of each cell type, similar to standard replicator equations from population genetics: where X a is the concentration of acid-producing cells, X b is the concentration of base-producing cells, fðXÞ describes the negative feedback associated with the finite amount of available space for cells to occupy and δ is the dilution rate.The functional form of β describing the change in growth rate depending on the perceived pH is here chosen as (other choices gave similar results, provided that the dependence is one-humped).It describes a symmetric, single-peaked function with its maximum output located at pH x = pH opt , and positive output for an input in the range pH x ∈ (pH opt ± pH lim ).It guarantees that all factors affecting cell growth that are pH-dependent, including the availability of nutrients, decreasing as pH strays from the optimum.The perceived pH depends on the level of acidity/alkalinity that each cell experiences on a local scale.Thus, we have: where both a e and b e stand for the acid or base produced at the individual cell level and require specific dynamical assumptions (see below), and ω is the sensitivity to the produced substance.pH f is described as the free pH in the media, that depends on the external input pH in and the action of each population.We only take into account the external pH f instead of the usual ΔpH as it is assumed that the cell's internal pH will remain almost constant [44].
Here, a e and b e stand for the external level of acidity/alkalinity a cell is able to excrete to the external surrounding media (see below).Furthermore, if we (reasonable) assume that the pH f dynamics are fast, and thus we can use dpH f /dt ≈ 0 and in such a scenario we have: Here, as has been previously pointed, a e and b e stand as the external concentration of acid or base in each type of cell, and a i and b i are the amount of acid or base that the cell produces inside the membrane.The production rate is γ.The interchange ratios between the inner cell and the exterior are k.The differential equations according to the reactions are It can be assumed that those reactions happening at the molecular level, in fact, are much faster than the population dynamics, therefore, considering dG=dt ¼ 0 for each variable G [ fa i , b i , a e , b e g.In this case, the equilibrium points can be described as constants. 13Þ Using the fast-relaxation assumption, we can now proceed to the analysis of the system dynamical patterns.

Results
Using the previous mathematical model approach and the assumptions made, it is possible now to study the expected dynamical behaviour of our proposed microbial Daisyworld.
We first consider the two-species scenario (A) where a consortium of two microorganisms acts on pH and secondly the more general scenario where (B) a parasitic species is added and (C) multiple species are introduced.For low-dimensional (two to three species) cases, the system dynamics are computed numerically through an iterative Euler method, ensuring stability for both species and pH f under each external pH input.The multispecies equations were numerically solved using a Runge-Kutta fourth-order approximation.In table 1, all the parameters and functions used in our models are summarized.

Two-species consortium
Figure 3 illustrates the behaviour of the synthetic Daisyworld design, using the set of equations described in section §2.2 of the Methods.Here, two species with the same physiological preferences in pH but opposite effects on the surrounding pH establish a wide zone of homeostasis.Similar to the classic work of Watson & Lovelock with temperature, the key parameter ( pH) also increases in the environment where both species coexist.The surface in figure 3a fully captures the presence and range of the homeostatic self-regulation achieved by our system.The three axes correspond to the external pH input ( pH in ), the actual pH in the media ( pH f ) and the γ parameter that gives age rates of the acid/base production.For very small γ values, the strains have no effect on the media pH and thus pH f = pH in .As γ increases, self-regulation emerges leading to a bellshaped curve.This phenomenon can be observed more clearly in figure 3b, which represents a two-dimensional graph showing pH f , against pH in , bounded by two extreme scenarios that would lead to ecosystem collapse (grey areas).If species have no effect on the surrounding pH or there are simply no species alive, the result is a straight line representing both pH measures, therefore, producing an uncontrolled environment.When a sufficiently high production rate is reached, homeostasis around the optimum appears.
In figure 3c, we plot the corresponding equilibrium populations against input pH.The involved strains undergo a switch, therefore, inducing homeostasis.The base production species (X b ) grows rapidly at low pH in since it is able to thrive in acidic environments by alkalizing its surroundings.When the pH is high enough, the acidifying strain experiences a boost and out-competes the first strain until the pH becomes too high, resulting in the collapse of the system.Due to their presence, the pH is regulated around seven within an effective range 3 ≤ pH in ≤ 12, allowing both species to grow within this span.These results are fully consistent with the original DWM and support our proposal that a synthetic,

Two-species plus parasites
The conceptual framework of the DWM is grounded in the presence of cooperative control of the environmental fluctuations.Such control is operated, as described above, by a two-species consortium.The effective outcome of the interactions between the members of the consortium is the stabilization of both populations, although submitted to a marked bias related to the pH input value.How robust is this mechanism of environmental stabilization?One way of answering this question is to consider the introduction of a parasitic component.Parasites are known to destabilize cooperative systems, sometimes pushing the population to the extinction threshold [45][46][47].Such a scenario has been tested in the context of synthetic biology, using a mixotrophic consortium growing in a 2D surface along with a parasitic strain [20].What is the effect of an added parasitic strain?To answer this question, we consider an extended, three-species model where the new set of equations reads as Here X a and X b are the two previously defined strains and X c stands for new strain.The logistic term now reads 2] has been introduced in dX c /dt in order to tune the relative advantage of the extra species in relation to the pair of regulating species.The rest of parameters remain the same.
In order to define a parasitic interaction, the functional form of the β term for X c reads as Therefore, as defined, the added species takes advantage of the two other strains, but (as it must be for a parasite) has no effect on the free pH and thus makes no contribution to regulation.
In figure 4, we summarize the results of our theoretical model.The surface shown in figure 4a dramatically illustrates the fact that the parasite does not undermine the homeostatic effect; instead, it maintains it, enabling the parasite to thrive in an environment with increasing pH levels.In figure 4a, we clearly appreciate the presence of a very broad domain of regulation.
The section defined for the neutral case α = 1 (vertical, grey plane) is shown in figure 4c along with the corresponding populations (right column).The homeostasis region appears mildly perturbed, and remains constant with α (see surface figure 4a).The pH in versus Population graph shows that the parasite is able to thrive almost reaching carrying capacity when all share optimal pH.What if they do not share an optimal pH? Figure 4b shows the robustness of the homeostatic effect.Here the parasite pH opt ranges from 3 to 11 and α has been set to 1. Obviously, when pH opt = 7 we have the same plane S 1 .When the pH opt is acidic or alkaline (planes S 2 and S 3 , respectively), the perturbation in the homeostasis happens at those specific ranges.Plane S 2 (figure 4b,d) experiences a delay in the regulatory effect, diminishing the presence of X b .The inverse effect is expected in S 3 (figure 4b,e).In summary, the introduction of a parasitic component does not (at all) have a detrimental effect on self-regulation.Our model demonstrates that the properties of a pH-regulated DWM are equivalent to those that have already been described for more commonly studied thermostatic DWMs.

Multispecies synthetic Daisyworld: order and chaos
Low-dimensional ecosystems made of two or three species provide the simplest limit cases where general principles can be derived.As it occurs with genetic switches or simple oscillatory systems, a few components coupled through a nonlinear set of interactions can display robust behaviour [48].Here too, the two-species example is our proof of concept that planetary regulation scenarios can be properly represented at small scales.What about a multispecies scenario?Previous work on the DW model has also considered the impact of biodiversity by introducing a range of competitor species displaying different parameters, also including different trophic levels [49].Here, we aim to explore the capacity for self-organization within a community where members have different pH opt and pH lim values that we generate at random, as well as their different effects on pH.The question we seek to answer is whether the community can persist while stabilizing the environmental pH.It is important to note that multi-species population dynamics under nonlinear regimes explored here are likely to develop oscillations and chaos [50].Will homeostasis also emerge in these cases?How is it affected by species diversity?
To address these questions, a new set of equations can be used.Those describing cell populations are already familiar to us: Here, X i represents the concentration of pH-modifying bacteria, where i = 1, 2, …, n.Here fðXÞ ¼ 1 À P n j X j is the negative feedback associated with finite resources, δ represents the dilution rate, and an immigration factor e is introduced.The growth rate β has the same functional form as before, but now extended to multiple species: ð3:6Þ Here, Δ H = pH opt − pH max , and γ represents the production rate of acid or base, which can be positive or negative depending on whether it is an acid or base producer.The range of γ is given by γ ∈ ±[γ min , γ max ].The dynamics for pH f experience a slight change and can be described as Here, the expression differs from our previous models.First, there is no pH in , indicating that the environment does not change due to external factors; rather, the community itself is the only changing factor.Additionally, following [51], since multiple factors (species) influence the pH, a saturation term has been introduced that ensures that pH f remains within the range of [0, 2b] (here b = 7).
As it occurs with most high-dimensional, non-spatial dynamical systems, complex dynamical states might often involve high-amplitude oscillations, hindering species from establishing a suitable environment before collapse [52,53].To address this limitation of well-mixed models, one effective approach is the introduction of a dispersal term or immigration factor [54].Both theoretical and empirical studies have demonstrated that moderate levels of dispersal serve as a primary mechanism for survival, disrupting high-amplitude population dynamics [54][55][56].Furthermore, in challenging  royalsocietypublishing.org/journal/rsif J. R. Soc.Interface 21: 20230585 environments, evolutionary rescue has been observed as a means of population recovery [57].In a mean-field model such as ours, this effect can be effectively simulated through immigration, thus serving as a proxy for both space and evolution, while maintaining the model in its minimal state [58].All species are set in an initial pH = 7 environment.In order to characterize the general patterns of organization emerging from this high-dimensional set of equations, a statistical analysis of their dynamical behaviours has been performed, using different randomly generated communities.The analysis allows us to see the frequency of different dynamical states as a function of diversity (figure 5a).Following previous methods developed elsewhere [59], we use the number of species as a parameter to determine the likelihood to observe our final community in one of these three dynamical states: (i) stable fixed point attractors, (ii) oscillations and chaos and (iii) collapse.These correspond to communities achieving populations that remain constant over time (after some transient), populations that exhibit deterministic fluctuations (either periodic, quasi-periodic or chaotic) and finally those that experience extinction after a short initial instability.In figure 5a, we employed a polynomial fitting of degree 4 for circles (raw data) and degree 3 for squares (raw data) to enhance the visualization of the dynamical states.Additionally, (figure 5a, right axis), we show the fraction of the original species that survive for each initial community size.
For each sampled model ecosystem, we discard a long transient to avoid non-stationary effects.Oscillatory or chaotic behaviours are found by looking at the amplitude variations of the time series of any of the species involved, and we do not distinguish among the different kinds of dynamics.Examples of both point attractors and fluctuating populations, along with the corresponding pH f time series are displayed in figure 5b,c, respectively.We also display three-dimensional reconstructions of the underlying attractors.These are obtained by plotting the dynamics of one chosen species with a population X(t) on a delayed threedimensional space using the vectors X(t), x(t + T ), x(t + 2T ) using a time delay T [60,61].
Interestingly, the observed fractions of dynamical states as a function of diversity allow us to formulate a strong prediction: despite the dominant presence of fluctuating populations for high-dimensional ecosystems, increasing biodiversity has a suppressor effect, favouring point attractors.In other words, species diversity enhances the desired self-regulation effects.It is also worth mentioning that earlier higher diversity seems to increase the chances of a stable sub-community surviving an early upheaval period and going on to regulate their environment due to their complementary environmental impacts, as can be seen in figure 5a.This is in line with previous models on planetary self-regulation that have shown how community restructuring can lead to stability [62].
Is this homeostasis preserved when exogenous fluctuations of pH are present?Will fluctuating populations (such as those in the 'oscillations' phase of figure 5) cope with a time- , pH lim = pH opt + [1, 4] and γ ∈ [0.05, 0.2], δ = 0.1, using ω = 1 and a small immigration factor of e ¼ 10 À3 has been used.
dependent, noisy input?We have explored this problem by introducing a stochastic component in the time evolution of pH in .The multispecies synthetic Daisyworld not only self-organizes to configure its environment optimally, but also exhibits the capacity to buffer external pH perturbations, sustaining oscillatory homeostasis in the face of a fluctuating environment.The external perturbation takes the form of an additive (discrete) uniform white noise sampled at every time step, characterized by a zero mean, and magnitudes between [−5, 5] over an interval.In figure 6, we show several examples of these responses for four different community sizes associated with either chaotic or stable point attractors, respectively.In all these cases, it is found that the community responses display pH buffering and thus robust selfregulation.Further work should address the statistical patterns displayed by stochastic versions of our previous models.

Discussion
The DWM provides a rationale for a stable self-organized biosphere resulting from a feedback between living beings and their environment, which they modify in predictable ways.Despite (or perhaps because of) its simplicity, the DWM has been instrumental in developing the field of Earth systems science [13].Can new synthetic ecosystems help further develop the field by allowing experimental testing in the test tube?Previous work on synthetic ecosystems, both in vivo and in silico, have considered communities that illustrate the success or failure of feedback control in microbial ecosystems.
Examples include ecosystem-level nutrient recycling in the Flask model [63] or the potential for collapse (ecological suicide) in microbial communities where sustained modification of environmental pH by the microbes can end in their extinction [64].Our proposal instead is that of an engineered biological system capable of self-adjusting itself under a given range of external parametric conditions, actively acting on stabilizing a global environmental driver.We propose a specific design for the genetic constructs required to self-tune the system.The one-humped nature of growth responses against pH displayed by microorganisms makes our candidate designs perfectly fit to match the original DWM assumptions.Moreover, under a multispecies context, biodiversity is a firewall to prevent the system from becoming de-regulated.This, in our view, represents a novel concept.
There are several potential extensions of our work that are worth exploring.On one hand, the regulatory nature of the system described here can be extended to other systems beyond the ecological context considered here.One avenue is the potential of terraformation scenarios based on synthetic biology, where cooperative consortia might be required for a successful spread over large scales [65].Another one concerns those physiological systems (such as glucose regulation by glucagon and insulin) that can be described in similar terms [66,67].These 'rein control' systems could be constructed synthetically and used to target given regulation goals within a model organism.Finally, we have not included a major player in Lovelock's picture: evolutionary dynamics.Previous work on evolutionary dynamics in DWMs [68][69][70][71].The role played by evolution has been a matter of intense discussion within the context of the DWM [3,72] and we may wonder if some of these debates could be settle by evolving synthetic communities.Extensions of our model approach could guide future developments towards this goal.
Ethics.This work did not require ethical approval from a human subject or animal welfare committee.
Declaration of AI use.We have not used AI-assisted technologies in creating this article.

Figure 1 .
Figure1.The conceptual feedbacks in the Watson-Lovelock model, which is the canonical formulation of the DWM.Using a two-dimensional surface (a), increasing levels of solar luminosity L trigger the growth (after a threshold) of two populations of plants, indicated as B and W (white and black squares, grey squares stand for bare soil S, see inset on the left bottom, using a zoom on the area indicated).These are identified as black and white daisies, respectively, in the DWM.Opposite feedbacks emerge from the effects of albedo by the two kinds of daisies.As a consequence of these nonlinear couplings, as shown in (b), the planet temperature can be stabilized (instead of just simply growing with L, grey line) for a wide range of L values, thus indicating a homeostatic response due too the biosphereclimate system.Such stabilization is obtained by means of population arrangements between W and B states (c).In this paper, an equivalent system is proposed (d ) using a bioreactor where an external input is also present (H þ in ) that would increase the pH of the medium, unless feedback controls are present.In this case, two different strains of bacteria able to increase or decrease the pH would replace the daisies.

Figure 2 .
Figure 2. The synthetic microbial Daisyworld.The logic of the zero-dimensional (non-spatial) DWM is summarized in (a) in terms of the interactions between planetary temperature and the distinct role played by the two kinds of daisies (B and W).Using our framework, where acidity would be the controlled variable.In this context, the acidity level within the medium influences cellular replication (self-replication loops).Simultaneously, both species reciprocally influence the acidity of the medium.A similar logic of feedback loops can be described (b) where now two microbial populations would also reduce or increase local acidity.The whole design, including the corresponding genetic constructs, is depicted in (c).
X b b e ð2:6ÞAdditionally, we need to take in account the microscopic balances at the level of individual cells.Therefore, at the molecular level we can assume stoichiometry ruling the internal levels of acid or base production of each cell and the extracelular royalsocietypublishing.org/journal/rsif J. R. Soc.Interface 21: 20230585 transport rates.We have the following reactions.

Figure 3 .
Figure 3. Steady state surface for the synthetic Daisyworld are depicted using equations (2.1) and (2.2).The flat surface displayed in (a) corresponds to the selfregulation illustrating dynamics of the synthetic microbial Daisyworld.The relationship between pH in and pH f is presented against γ.When γ = 0, neither base nor acid production occurs, resulting in the absence of regulation and a linear increase in pH f with the external input.Conversely, as γ increases, a diverse range of controlled pH values emerges, expanding the homeostatic region of optimal pH.In (b), one section to the surface at γ = 0.04 is made, showing the broad domain of self-regulation surrounded by the collapse domains.The corresponding abundances of each synthetic strain are displayed in (c).X a stands for acid-producing species and X b for base-producing.Here, we used: γ ∈ [0, 0.05], δ = 0.01, ω = 0.5 and both species use pH opt = 7 and pH lim = 9.

αFigure 4 .
Figure 4. Effects of parasitism (using equations (3.1)-(3.3))on self-regulation domains.In (a), the relationship between pH in and pH f is displayed against α as a control parameter, weighting the parasite advantage relative to the regulating species.In (b), the relationship between pH in and pH f is shown for parasites with pH opt ∈ [3, 11] and pH lim = pH opt + 2.5 are introduced, with α = 1.The sections obtained from the vertical planes S cutting through both surfaces are depicted in (c-e), planes S 1 , S 2 and S 3 , respectively.The three cases correspond (for α = 1) to parasite optimal values of (c) pH opt = 7, (d ) pH opt = 4 and (e) pH opt = 10.The corresponding population abundances are depicted in the right column.The remaining parameters are the same as those used in figure 3.

Figure 5 .
Figure 5. Statistical analysis and specific examples are illustrated for the multispecies case study.Three different final outcomes are obtained, as summarized in (a): extinction due to collapse and failure of regulation, oscillatory, quasi-periodic or chaotic fluctuations (black) and self-regulating communities displaying constant values after a transient.Although chaotic, oscillatory and collapse states are frequent at low-species numbers, they become rare as diversity increases.Raw data in squares and circles.Two examples of stable (b) and chaotic (c) communities are also shown.In both cases, we show the time series of populations, the reconstructed attractor of one of them, the pH time series and its reconstructed attractor are displayed.The population and pH dynamics for case (c) define strange, chaotic attractors.In addition, the mean percentage of the original species that survive for each initial community size is displayed in (a), in the right y axis (blue).Standard deviation is also plotted with error bars.Here, we used N = 200 replicas for each community size (up to n = 30 species), where parameters have been randomly generated within the intervals pH opt ∈[4, 9], pH lim = pH opt +[1, 4] and γ ∈ [0.05, 0.2], δ = 0.1, using ω = 1 and a small immigration factor of e ¼ 10 À3 has been used.

Figure 6 .
Figure 6.Homeostatic behaviour for multispecies models under stochastic variations in the pH input.Here, we have chosen for different conditions associated with both stable ( point attractors) and oscillating communities (as defined from the phase space in figure 5a).Specifically, the cummulative input pH in fluctuates in time (blue lines) starting from pH in (0) = 7.The time series for populations (left) and pH values (right) are shown.All communities respond by adjusting pH f (black lines) which typically fluctuate within abounded range of values around the deterministic regulated value.

Table 1 .
Functions and parameters defined throughout the paper.
small-scale implementation of planetary regulation can be formulated.How robust is this result?In the next two sections, we answer this question under two distinct and relevant scenarios.