powered by NetLogo
view/download model file: Autopoiesis.nlogo
This model shows an implementation of computational autopoiesis (from the greek �autos� = self and "poises" = creation). The term and the concept were coined by H. Maturana and F. Varela (1973, 1974) in order to define the organization (pattern of relations) between the processes and molecular components that constitute unicellular living systems. An autopoietic molecular system is an organization that exists as a network of processes of production (transformation and destruction) of components which: (i) through their interactions and transformations continuously regenerate and realize the network of processes (relations) that produced them; and (ii) constitute the system as a concrete unity in space in which its components exist by specifying a topological domain (a boundary) for its realization as a network (Maturana & Varela, 1980). The network of chemical reactions composing the unit creates its own components, some of which are integrated into the boundary that entraps the network generating them. As result, there is a codependence between the network and the boundary: the later defines the system�s limits in space and restricts the circulation of its constituents, and the former creates its own components plus those required to create the boundary. Thus, autopoietic systems operate by constantly regenerating their circular organization.
This model shows a "minimal case" of computational autopoiesis in a bidimensional space: it has only two synthesis reactions that form two types of molecules (As and Ms) using two different substrates (Bs and Cs). As and Ms are catalysts: they are necessary for the synthesis reactions to occur but do not get transformed in those process. Reactions occur according to the following rules:
2B + 1A --> 1M + 1A
1C + 1M --> 1A + 1M
Note that one product of each reaction is used as a catalyst in the other one, this linking giving rise to <<catalytic closure>>. There is a corresponding disintegration reaction for each synthesis one so that the original substrates are created by spontaneous (non catalyzed) decomposition. This creates a <<chemical closure>>. Each chemical reaction in the system occurs according to a probability and a rate. The disintegration reactions are:
1M --> 2B
1LM --> 2B
1A --> 1C
Ms can be in two states free (Ms) and linked (LMs), the latter constituting the system's boundary. The boundary forms by linking preexisting Ms to LMs, changing their state to LMs. The reaction is:
1M + (n)LM --> LM-LM(n)
where n is the chain length, varying depending on the user configuration. LMs only have two neighbors and two possible links. The boundary restricts the diffusion of the Ms and As entrapping them inside trough local interactions. It allows the flow of B and C substrates in and out. Bs and Cs are the systems nutrients. Except for the boundary components (Ms in a linked state (LMs)), which are immobile and have a predefined position in space, all molecules move in a random walks. Also, the only other exception to this rule is when As and Ms come close to the boundary: when permeability is set to be low, they run away from the boundary and keep moving randomly. Synthesis reactions happen only when reactant(s) and a catalyst meet close in space in at least the required stoichometries. Decompositions happen spontaneously at any point in space including the membrane, and do not require catalysts or other molecules to be within their close neighborhood. LM decomposition gives rise to gaps in the boundary. Catalysts (Ms and As) can escape if boundary gaps are present and are not rapidly repaired by free floating Ms that then change their state to LM by coming into the close neighborhood of the gap and repairing it. Finally, when catalysts are lost, they drift randomly in the world until they touch its borders and disappear from it. This prevents them from executing additional reactions. At the same time, following the decomposition reaction rules, the corresponding number of nutrients is automatically created. This balances the mass losses in the environment where the system exists.
All the chemical reactions form a network that destructs and synthesizes its own components because these processes there are linked in a circular fashion: products of one reaction are used as catalysts in other ones and spontaneous decomposition gives rise to substrates that can be reused by the network. Also, the system produces its own boundary and assembles it by repairing the gaps that it creates using the boundary molecules that it generated. Thus collectively, the system realizes an autopoietic organization in the computer space because it can constantly: i) produce and regenerate the network of chemical processes that creates its components, and ii) define its own limits in the bidimensional space by creating the constituents that integrate and repair its own boundary.
The setup button introduces a system with a preexisting complete boundary (no gaps) of customizable size. Number of boundary components and radius of the unit are user-definable, allowing for different boundary densities and system sizes to be created. It might perhaps be able to sustain an autopoietic organization depending on the circularity between the reactions and the membrane being maintained. Diffusion of As and Ms can be changed using a slider that controls boundary permeability. Chemical initial concentrations can be specified at the beginning using sliders. Each reaction occurs according to a probability (prob = 1 creates a deterministic system) representing a rate. The "localness" of the interactions required for them to occur is controled by the minimal distance required for the reactants to meet. Both the probabilities and distances are user-definable. Each reaction can be turned on or off using a switch. Visualization of B and C substrates can be turned on or off during the simulation to facilitate the observation of the rest of the agents. The go button starts the movement and allows the agents to interact according to the previously discussed rules. It is recommended that 0.4 is used as permeability parameter. This is the minimun distance at which with an initial number of 40 LMs, organized with a radius of 5, As and Ms are entraped. The reaction distance recommended is 0.7 or less. This assures that interactions are local.
If the boundary breaks and there are enough free floating Ms in the close neighborhood of the gap, the system will be able to repair them (repaired gaps will appear green), and keep entrapping the components that create the reaction network. Under certain combinations of boundary permeability, reaction rates and initial concentrations of chemicals, the system is able to constantly self-regenerate its organization. Note that the concentrations of the catalysts inside the boundary highly depends on the integrity and history of gap formation and boundary repair. If too many catalysts are lost the system rapidly looses its circular organization and decays. The model is set up so that when lost catalysts touch the borders they disappear from the world.
Turn on and off the different chemical reactions. Change the probabilities of the decomposition reactions and see how it affects the concentrations of the chemical species in the plots. Also, turn on or off the substrates (Bs and Cs) to better observe the behavior of the rest. Try changing the permeability of the membrane or the initial systems size and membrane densities: which combination(s) of all these parameters gives robust autopoiesis over long time intervals?
The current implementation of computational autopoiesis did not attempt to model the spontaneous emergence of this type of organization. This will require recoding the boundary rules. Can you think of local rules that could link the free Ms creating LMs such that circular structures entrapping reaction networks could spontaneously emerge?
When free membrane elements are linked they become immobile. These two states are represented in the model by to different types of agents (Ms and LMs), but conceptually correspond to the same chemical species. Gaps formation was coded using the primitive hide, which makes the agents invisible to other agents. This allows to hold the boundary as circle while having gaps in it.
The NetLogo Models Library has models of chemical reactions that somewhat related to the implementation used.
This model was created by Nicolas Pelaez at Northwestern University, for the Agent Based Modeling Course (Spring 2009) taught by Uri Wilensky.
Maturana, H. and F. Varela, (1973) De M�quinas y Seres Vivos: Una teor�a sobre la organizaci�n biol�gica, Santiago: Editorial Universitaria. 121.
Maturana, Humberto & Varela, Francisco ([1st edition 1973] 1980). Autopoiesis and Cognition: the Realization of the Living. Robert S. Cohen and Marx W. Wartofsky (Eds.), Boston Studies in the Philosophy of Science 42. Dordecht: D. Reidel Publishing Co.
McMullin B. (1997a), Computational Autopoiesis, the original algorithm. Santa Fe Institute Working paper number 97-01-001.
McMullin B. & Varela F. (1997), Rediscovering Computational Autopoiesis, Santa Fe Institute Working paper number 97-02-012.
McMullin B. (2004), Thirty years of computational autopoiesis: a review. Artificial Life, 10: 277-295.
Varela, F., Maturana, H. R., Uribe, R. B. (1974) Autopoiesis: The organization of living system, its characterization and a model. Biosystems 5: 187-196.
Varela, F. (2000), El Fen�meno de la Vida. Editorial Dolmen, Santiago de Chile
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;COMPUTATIONAL AUTOPOIESIS;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Globals [ counter ]; this counts the total number of repair events turtles-own [ partner ] ; There are 4 chemical species in the model: A, B, C and M. One of them is represnted by two states, coded as two breeds breed [ As A ] ; A is the catalyst of the reaction converting B into M breed [ Bs B ] ; B is a nutrient and is the substrate that is converted into M (see reactions below) breed [ Cs C ] ; C is a nutrient and is the substrate that is converted into A (see reactions below) breed [ Ms M ] ; M is the component of the boundary, as also a catalyst and can spontaneously be degraded ;back into B (see reactions below) breed [ LMs LM ] ; LMs represent the Linked state of the Membrane components. They were separated as a ; different breed form Ms to facilitate coding but represent the same molecular species. to setup clear-all set-default-shape As "molecule4" set-default-shape Cs "dot" set-default-shape Bs "dot" set-default-shape LMs "molecule3" set-default-shape Ms "molecule3" create-As Number-A-Catalysts [ setxy 0 0 set color blue ] create-Ms Initial-Number-Ms [ setxy 0 0 set color green ] create-Bs Number-B-Substrates [ setxy random-xcor random-ycor ifelse See-B-substrates? [ set color red + 1 ] [ set color black ] ] tick ask turtles [ set partner nobody ]; this resets partnerships form previous runs. create-Cs Number-C-Substrates [ setxy random-xcor random-ycor ifelse see-C-substrates? [ set color gray ] [ set color black ] ; this allows turing on or off these substrates ] create-ordered-LMs Initial-Number-LMs ; use 40 LMs as initial number. [ ; this procedure creates the initial boundary components required to start the simulation let i 1 foreach sort LMs [ ask ? [ create-link-with (item i sort LMs) ] set i (i + 1) mod count LMs ] layout-circle sort LMs size-cell ask links [ tie ] set color magenta + 1 ] setup-plot set counter 0 ; this the counter to zero end to go tick move-turtles if (count Bs <= 0) or (count Cs <= 0) ; these are a set of stoping conditions or (count Ms <= 0) or (count As <= 0) or (count LMs with [ not hidden? ] <= ( 2 * Initial-Number-LMs / 3)); this condition implies that if 2/3 of the ; boundary are not present (not visible) the simulation stops. [ stop ] ask turtles [ if (breed = Bs) [ ifelse see-B-substrates? [ set color red + 1] [ set color black ] ] if (breed = Cs) [ ifelse see-C-substrates? [ set color gray ] [ set color black ] ] if (breed = As) [ if (xcor >= max-pxcor or xcor <= min-pxcor or ycor >= max-pycor or ycor <= min-pycor) [ hatch-Cs 1 ; this removes As that escaped form the system form the ends of the world prenting ;them to further react outside of the boundary.The corresponding number of Cs is returned. die ] synthesize-Ms ; do the M synthesis reaction, Free-Ms also act as catalysts of another raction disintegrate-As ] if (breed = Ms) [ if (xcor >= max-pxcor or xcor <= min-pxcor or ycor >= max-pycor or ycor <= min-pycor) [ hatch-Bs 2 ; this removes Bs that escaped form the system form the ends of the world preventing ;them to further react outside the boundary.The corresponding number of Bs is returned. die ] synthesize-As ; this synthesizes A, the catalyst of one of the reaction creating the Ms. disintegrate-Ms ; this spontaneously disintegrates the Ms into Bs. ] ; do M spontaneous disintegration reaction if (breed = LMs) [ ifelse (hidden?) [ link-LMs ] [ disintegrate-LMs ] ] ] do-plot end to move-turtles ask turtles [ if breed = As ; thise moves the As in a random walk except when they get close to the boundary. [ left random 40 right random 40 forward 0.1 let nearbyMembraneMs (LMs in-radius permeability-As) with [ not hidden? ] if any? nearbyMembraneMs ; this makes the As stay away form the Ms. This property is required in [ ; order to achive impermeability of As through the membrane. face one-of nearbyMembraneMs right 180 fd 0.1 ] ] if breed = Bs [ left random 40 right random 40 forward 0.1 ] if breed = Cs [ left random 40 right random 40 forward 0.1 ] if breed = Ms ; thise moves the Ms in a random walk except when they get close to the boundary. [ left random 40 right random 40 forward 0.1 let nearbyMembraneMs (other LMs in-radius permeability-Ms) with [ not hidden? ] if any? nearbyMembraneMs ; this makes the As stay away form the Ms. This property is required in [ ; order to achive impermeability of As through the membrane. face one-of nearbyMembraneMs right 180 fd 0.1 ] ] ] end to synthesize-Ms ;M synthesis rule is: if 1A + 2Bs come close enough this gives 1M an A and the Bs disapear if synthesize-M? ; this turns on and off the synthesis reaction according to a switch [ if random-float 100 <= Probability-Ms-synthesis [ if (count Bs in-radius synthesis-reaction-distance) >= 2 ; this checks if the number of Bs close ;to an A is bigger or equal to 2. ; the distance control the localness of the interactions required for the reaction to occur. [ let reacting-Bs n-of 2 Bs in-radius synthesis-reaction-distance; ; this distance control the localness of the ; interactions required for the reaction to occur. ask reacting-Bs [ die ] hatch-Ms 1 [ set color green ] ; this is the product of the reaction. ] ] ] end to synthesize-As ; synthesis of As is given by the rule: if 1M + 1C come close enough according to a rate ;parameter (distance) this creates 1A plus one M (already there) and the Bs dissapear if synthesize-As? [ if random-float 100 <= Probability-As-synthesis [ if (count Cs in-radius synthesis-reaction-distance) >= 1 ; this checks if the number of Cs close ;to an M is bigger or equal to 1. [ let reacting-Cs n-of 1 Cs in-radius synthesis-reaction-distance; this distance control the localness of the ; interactions required for the reaction to occur. ask reacting-Cs [ die ] hatch-As 1 [ set color blue ] ] ] ] end to disintegrate-Ms ; some few Ms once formed disintegrate spontaneously and give back 2Bs if disintegrate-M? ; this turns on and off the disintegration reaction according to a switch [ if random-float 100 <= Probability-M-disintegration [ hatch-Bs 2 ; this is the product of the disintegration reaction die ] ] end to disintegrate-As ; some Ms once formed disintegrate spontaneously and give back 2Bs ; according to a probability. if disintegrate-As? ; this turns on and off the disintegration reaction according to a switch [ if random-float 100 <= Probability-A-disintegration [ hatch-Cs 1 ; this is the product of the disintegration reaction die ] ] end to disintegrate-LMs ; some Ms once part of the boundary disintegrate spontaneously and forming 2Bs and creating a gap. if disintegrate-LM? ; this switch turns on and off the disintegration reaction according to a switch. [ if random-float 1000 <= Probability-LM-disintegration; ; disintegration occurs according to a probability. [ hatch-Bs 2 ;this is the product of the disintegration reaction hide-turtle ; the gap formation is coded by hiding the turtle so that it might not be available ; for any furter interactions. ask my-links [ hide-link ] ; the links of the hidden turtle are also hidden. ] ] end to link-LMs ; this links the free floating Ms to prelinked MS (represented in the model by the breed LMs) ; the procedure intends to repair the membrane when it has gaps between single linked LMs. ask LMs with [ hidden? and any? LMs in-radius 1 with [ not hidden? ]] ;not hidden? are the turtles that ; are currently not forming gaps. The procedure looks for LMs whithin a given radius and replaces ; them with free floating Ms that are within a given radius. [ let replacement-candidates (Ms in-radius LMs-linking-reaction-distance); this creates a list ;of free Ms (candidates) to be used later in the linking process used to repair the gaps. if (any? replacement-candidates ) ; this evaluates the list [ ask one-of replacement-candidates [ die ] ; this replaces the chosen candidate by a hidden LM show-turtle ; the hidden turtle is shwon again. ask my-links with [ [not hidden?] of other-end ] ; this makes visible the hidden turtle where the gap was present. [ show-link ] ; this shows the hidden links of the turtle again. set color green set counter counter + 1; this updates by one TOTAL number of boundary repair events in the counter ] ] end to setup-plot set-current-plot "Molecule Concentrations and Total Gap Repairs" set-current-plot "Boundary Metrics" end to do-plot ; this plots the ratio of the catalyst concentrations and the number of boundary gaps set-current-plot "Boundary Metrics" set-current-plot-pen "Number Boundary Gaps" plot count LMs with [ hidden? ] set-current-plot-pen "Fraction Boundary Present" plot (count LMs with [ not hidden? ] / Initial-Number-LMs ) ; plots fraction of LMs visible in the boundary set-current-plot-pen "Fraction As / Ms" ifelse (count Ms = 0 or count As = 0) [plot 0 ] [ plot ( count As / count Ms )] ;plots catalysts ratio. set-current-plot "Molecule Concentrations and Total Gap Repairs" ; this plots the concentrations of the four chemical species set-current-plot-pen "A Catalysts" plot count As set-current-plot-pen "B Substrates" plot count Bs set-current-plot-pen "C Substrates" plot count Cs set-current-plot-pen "M Product/Catalyst" plot count Ms set-current-plot-pen "Linked Ms (LMs)" plot count LMs with [ not hidden? ] ; this plots the number of LMs that are part of the boundary. set-current-plot-pen "# Gap Repairs" plot counter end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; Model created by Nicolas Pelaez ;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;