Supplementary Material Evolution of trophic structure Bell: Evolution of trophic structure Supplementary Information Part 1: Principles of operation of Uqbar Part 2. Uqbar procedures Part 3. Basic operation manual for Uqbar Part 4. Output files Part 5. Free parameters Part 6. Elementary properties of Uqbar Part 7. Optimal number of SIL 1 Bell Supplementary Material Evolution of trophic structure Bell Part 1: Principles of operation of Uqbar Uqbar is an artificial electronic ecosystem containing organisms that consist of a few lines of computer code. This code specifies the identity of an individual, and determines how it will acquire resources, reproduce, and interact with other individuals. The behaviour of the individual is otherwise under the control of the CPU, which sets system parameters and manipulates individuals according to the instructions they bear. Ecosystem. The habitable part of the ecosystem comprises an ordered list of ‘slots’. The number of slots is fixed and may take any value: the simulations reported typically use 100,000 slots. Each slot is either vacant, or is occupied by a single entity. There are two types of entity: organisms and substrates. A substrate consists of a number of different resources in fixed proportions; different substrates are made up according to different recipes. Each exists in the form of single packets containing a fixed quantity of each resource, made up from ingredients obtained from the Resource Pool. This is a separate compartment, which communicates with the ecosystem but is not habitable. Resources enter the pool either from the ecosystem, through recycling, or as exogenous input from an undefined outside world. The current contents of the resource pool determine the quantities of different resources available to the ecosystem, so that new packets of any given substrate can be formed only 2 Supplementary Material Evolution of trophic structure Bell if the necessary resources are available from the resource pool. A new substrate packet enters the ecosystem from the resource pool with given probability in each move. It is eventually removed from its slot when it decomposes or is consumed by an organism. Extraneous supply of resources at fixed rate External community chemical synthesis Resource Pool Substrate Packet Recycling of unconsumed substrate and dead bodies decomposes UQBAR consumed Producer starves immigration maintenance, respiration consumed grows and reproduces Predator starves consumed grows and reproduces Bell Fig 1 This figure shows the main ecological processes in Uqbar. irreversibly lost from system The ways in which resource supply, decomposition, recycling, maintenance, consumption, reproduction, death and immigration are simulated are described in the text below. Organisms exist as individuals that are able to acquire resources. Some species (called collectively Producers) grow exclusively by consuming substrate packets; others (called 3 Supplementary Material Evolution of trophic structure Bell Predators) by consuming other organisms. Growth beyond a certain point is followed by reproduction, when the parent gives rise to a newborn individual that is allocated a separate ecosystem slot. Individuals eventually die when they starve to death, having been unable to find sufficient, or appropriate, substrates, or when they are consumed by a predator. The resources contained in dead bodies may leave the system, or may be recycled to the resource pool. The number of ecosystem slots is fixed, and a new individual or substrate packet can enter the system only if a slot is available. Structure of entities. Entities are constructed on a common plan, but regions present in some types of entity are lacking in others. The two principal types of entity are organisms and substrates, but an organisms may be a Producer or a Predator (Figure 2). The most complicated entity is an Producer, which consists of four distinct regions. (1) A single identity locus (IDL). This bears a binary number of given length (i.e. given number of bits) that labels the individual as belonging to a particular species. All individuals bearing the same identity number have identical genotypes, that is are identical in state at all other loci. (2) A set of social interaction loci (SIL). Each SIL bears a binary number of given length. The SIL determine the outcome of pairwise interactions between individual organisms. 4 Supplementary Material Evolution of trophic structure Bell (3) A set of resource acquisition loci (RAL). This is a second set of loci each bearing a binary number of given length. The RAL determine the outcome of an interaction between an individual Producer and a resource package. They occur only in Producers. (4) The resource storage sites (RSS). A series of sites each of which holds the individual’s supply of a certain resource. Resources are acquired and expended through interactions or attempted interactions with other organisms or with substrates. The current value and composition of RSS determine whether an individual will reproduce and whether it will die. A Predator has precisely the same structure, except that it lacks RAL. A substrate package consists of two regions only: a single SIL, and a set of RSS. The RSS of a substrate packet have fixed contents that correspond to a particular substrate SIL. 5 Supplementary Material Evolution of trophic structure Bell ID L RAL 1 RAL 2 SIL 1 SIL 2 SIL 3 SIL 4 ID L SIL 1 SIL 2 SIL 3 SIL 4 RSS 1 RSS 1 RSS 2 RSS 2 SIL 1 RSS 1 RSS 2 PRODUCER PREDATOR SUBSTRATE Figure 2. The Uqbar entities. This is the same as Figure 1 of the article. Ecosystem operation. The ecosystem list is used as an ordered queue, with execution proceeding from lower-numbered to higher-numbered slots. In each new move the entity occupying the next highest-numbered slot is selected as the ‘Agent’. A second slot is then selected from the ecosystem list. In the present study the second slot is selected at random, but the program provides the option of selecting it from a limited ‘home range’ centred on the slot occupied by the Agent. The entity that occupies this slot is called the 6 Supplementary Material Evolution of trophic structure Bell ‘Patient’. Agent and Patient then interact according to the rules described below, and their status adjusted appropriately. When the top of the ecosystem list is reached, terminating a “cycle” of moves, execution continues from the bottom; the list is thus essentially circular, with no definite limit to the number of cycles that may occur. Each move consists of a series of external events that may affect the ecosystem, followed by an internal procedure. The external events are as follows; each occurs with some defined probability in each move. (1) Exogenous supply to the resource pool. A given quantity of each resource enters the resource pool from outside. (2) Substrate supply to the ecosystem. A single random substrate packet is added to the ecosystem from the resource pool. (3) Immigration. A single random individual enters the ecosystem from an external species pool. This individual is chosen at random from the initial community used to set up Uqbar. (4) Disturbance. Individuals are liable to be killed by some arbitrary extraneous event. 7 Supplementary Material (5) Invasion. Evolution of trophic structure Bell A large number of individuals enters the ecosystem from an external species pool, displacing residents. The probabilities of each of these events can be defined, so that Uqbar is affected to a greater or lesser extent by external perturbation. In the limit, it can be completely closed and self-contained. The internal procedure depends on the nature of the Agent. If the Agent is a vacant slot, execution proceeds directly to the next slot in sequence. If it is a substrate packet, then the packet may decompose spontaneously and its constituent resources may then be recycled to the resource pool. The probabilities of decomposition and recycling influence the availability of resources in the ecosystem. If the Agent is an organism, then it incurs a metabolic cost represented by the expenditure of fixed quantities of each resource during the move. These resources are recycled to the resource pool with a specified probability. They are expended even if the Agent encounters only a vacant slot; if it encounters an entity, then the consequences depend on the outcome of the interaction between Agent and Patient. Interaction. All interactions are based on the notions of complementarity and compatibility at the SIL and RAL. Two individuals are complementary if a recognition locus of one bears precisely the opposite pattern of bits to a corresponding locus of the other. Thus, 00101 and 11010 are complementary patterns. If Agent and Patient are complementary in this sense, then their interaction is antagonistic. When an Producer 8 Supplementary Material Evolution of trophic structure Bell encounters a substrate packet, the Producer consumes the substrate if any of its RAL are complementary to the single SIL of the substrate. The substrate packet is not consumed if the agent is a non-complementary Producer or a Predator. When two organisms encounter one another, their interaction is antagonistic if one or more of their SIL are complementary. The specificity of interactions between predator and prey is governed by the length of SIL and the rules for complementarity. For simplicity, I distinguish Long systems (with 4 SIL of 5 bits each) from Short systems (with 10 SIL of 2 bits each), with the same quantity of information initially encoded by each individual being the same (20 bits). In either case, any given Predator SIL may interact with a single defined Producer SIL only (interaction in cis) or with all Producer SIL (interaction in trans). This gives four cases as a framework for experiments: Long-Cis, Long-Trans, Short-Cis and Short-Trans (see Fig). The relationship between the extent of complementarity and the probability of capture of a prey organism or a substrate packet is determined by a function that is not liable to change. Any function may be specified; I have assumed that increasing complementarity meets with diminishing returns, and that this can be expressed by the two-parameter nonlinear function Probability of capture = L [1 - exp(- i * complementarity) ] 9 Supplementary Material Evolution of trophic structure Bell where L is the limiting probability of capture when complementarity is very large, and i is an interaction coefficient that determines how rapidly prey capture probability increases with complementarity. A similar function (whose parameter values may differ) is used to tune the complementarity of producer with substrate packet. This is the only equation-driven process in Uqbar. When two complementary individuals meet, a rule must decide which consumes the other. A Predator always consumes an Producer rather than vice versa; the difficulty comes when two Predators meet. Three kinds of rule might operate. The first is phenotypic and invokes a state that varies among individuals of the same species: the larger or stronger individual (that with greater RSS contents) consumes the smaller or weaker. RSS contents are not inherited, so the system cannot evolve. The second possible rule is a genetic criterion that is invariant within a species and consistent for pairwise combinations of species: the individual with the greater value at IDL consumes the other. This has two drawbacks: IDL is not heritable in any straightforward way (because it is a label that distinguishes a descendant from an ancestral taxon), and interactions are forced to be transitive (in the sense that if A eats B and B eats C then C cannot eat A). The final possibility is a genetic criterion that is invariant within a species but not necessarily consistent for pairwise combinations of species: the individual with the greater value at complementary SIL consumes the other. This allows heritability and does not force transitivity, and for these reasons is the rule adopted here, although the other two can be invoked as options in Uqbar. 10 Supplementary Material Evolution of trophic structure Bell Two individuals are compatible if all the SIL of one are identical to the corresponding SIL of the other (first with first, second with second, and so forth). This will be the case if they belong to the same species (that is, have identical IDL); their interaction is sexual. Recombination occurs through random breakage and reunion of SIL and (in Producers) RAL. Two individuals may also be compatible, however, even if they belong to different species: their interaction is then mutualistic. Mutual benefit is created by the possibility of reproducing together even though neither can reproduce alone. Both individuals reproduce if their combined RSS contents are adequate to produce an offspring each; otherwise, neither reproduces. Compatible interactions, whether sexual or mutualistic, are not considered further in this initial report. Individuals that are neither complementary nor compatible are neutral; neither is consumed and neither reproduces. Whether or not consumption occurs, however, the maintenance cost is exacted from any organism involved in a move, whether as Agent or as Patient. This applies even when the Agent encounters an empty slot. The cost of maintenance is not fixed, but depends on the resource-gathering potential of an individual: the maintenance of a Producer is proportional to the number of RAL it bears, and that of a Predator on the number of SIL. In addition, SIL may be more (or less) expensive than RAL, so that heterotrophy is intrinsically more (or less) expensive than autotrophy. Life Cycle. Individuals reproduce when they possess sufficient quantities of each resource; the overall rate of reproduction thus depends on both the required quantity of 11 Supplementary Material Evolution of trophic structure Bell each and on the amount of each available in substrate packets. When the RSS of an individual all exceed the threshold quantity, an ecosystem slot is allocated to the offspring. Only slots that are not occupied by organisms are available. If the slot is occupied by a substrate packet, this is removed, and its contents may be recycled to the resource pool. The genome of the parent (IDL, SIL and, in the case of an Producer, RAL) are then copied to the vacant slot and the appropriate header affixed. Finally, the newborn is provided with a basic ration of each resource, this amount being subtracted from the parent’s stores. If no slot is available, no reproduction can occur. Genetics. The contents of the SIL and RAL are copied with a certain probability of error, representing mutation. Three types of mutation may occur. The first is deletion, the omission of a complete SIL (from a Predator) or RAL (from an Producer). The second is duplication, the addition of a new SIL or RAL with the same structure as the parental locus. Deletion and duplication parallel changes in body size, because the cost of metabolism is borne per locus – per SIL in Predators and per RAL in Producers. The third kind of mutation is point mutation, with each bit of each SIL and RAL being liable to be flipped from one state to the other. When mutation occurs the IDL may be reset to a new random value not possessed by any other organism, subject to the species concept in operation. Two aspects of mutational variation need to be emphasized. The first is that unequivocally beneficial mutations are not allowed. Thus, increasing the number of RAL increases the range of substrates that an Producer could consume. It also increases the 12 Supplementary Material Evolution of trophic structure Bell cost of maintenance, however, and is allowed for this reason. Decreasing the number of SIL, on the other hand, would reduce the vulnerability of an Producer to predation with no countervailing disadvantage, and for this reason is not allowed. Deletion of SIL in Predators, on the other hand, is allowed because although it reduces both the cost of maintenance and the range of possible predators, it also reduces the range of possible prey. The second aspect is that macroevolution is not permitted. Producer and Predator are fixed categories, and organisms are not permitted to evolve from the one into the other. Instead, a Producer that loses all its RAL or a Predator that loses all its SIL by deletion is unable to feed and eventually starves to death. 13 Supplementary Material Evolution of trophic structure Bell Part 2. Uqbar Procedures Uqbar operates in conventional fashion by calling subroutines. They are as follows. Initialization GetVariables Set parameter values CheckVariables Screen parameter input for errors Capital Initial allocation of resources to resource pool Tabledhote Random definition of substrate packets (dishes) Alacarte Specification of substrate packets Feed Initial allocation of substrate packets to ecosystem Colonists Random definition of aboriginal taxa Delegates Specification of aboriginal taxa Stock Initial allocation of individuals to ecosystem Subroutines executed (once) each cycle AdvanceScores Advance cumulative scores and reset move counters Existence Confirm that at least one taxon exists Supply Exogenous input to resource pool Restock Add single immigrant to community with fixed probability 14 Supplementary Material Evolution of trophic structure Resin Distribute substrate to ecosystem throughout history Disturbance Simultaneous arbitrary threat of death at all slots Invasion Simultaneous arbitrary threat of displacement Subroutines executed (often repeatedly) each move Patient Select ecosystem slot with which to interact Vacant Agent is a vacant slot Decomposition Agent is substrate packet AgentNeutral Agent is individual that does not interact with Patient PatientNeutral Patient is individual that does not interact with Agent AgentEatsSubstrate Agent is autotroph able to consume substrate Mutual Agent and Patient are different species but SIL-identical AgentEatsPatient Agent is heterotroph able to consume Patient PatientEatsAgent Patient is heterotroph able to consume Agent Recombination Genetic recombination Maintain Individual pays metabolic costs of maintenance Death Individual dies Birth Individual reproduces, giving birth to single offspring Both Two mutualists each give birth Mutation Genome of newborn is subject to heritable alteration ChangeWeb Change web membership of taxon in complex system. ConfigureWebs Read in characteristics of subsystems from an input file. 15 Bell Supplementary Material Evolution of trophic structure Output Record Record of initial state of Uqbar Census Carry out census of ecolist Report Report on types of activity, nutrient flows, list contents InitialSystem Description of initial source foodweb FinalSystem Description of final source foodweb 16 Bell Supplementary Material Evolution of trophic structure Bell Part 3. Basic operation manual When you open Uqbar, you will be presented with a series of forms that specify the type of ecosystem to be simulated, the values of the parameters, and the initial configuration of the system. This brief text goes through each form in turn and explains how you should complete them. StartForm. This form appears when you start the program, and specifies that it is being used for academic purposes (not that any others have yet been discovered). Click “Enter Uqbar” to proceed. OutputForm. This form specifies the location of the output files. There are several of these, which are described further in Supplementary Information Part 4. Use the scrollbars to specify where you want them stored. I find it convenient to create a folder “Uq Out” on the Desktop to hold them temporarily. The EcoList and the extensive web listings can create large and unwieldy files; check them only if you need them for analysis. PPForm. This form specifies how individuals that meet decide whether one can consume the other. 17 Supplementary Material Evolution of trophic structure Bell Choosing one of the options in the first block of four specifies as simple system with a single food web. This is the default. In a simple system with a single food web, two individuals which meet, and are complementary, must decide which is the predator and which they prey. If one is a Producer and the other a Predator, the Predator always eats the Producer. If both are Predators, then the issue is decided as follows. (a) IDL-based recognition. The individual whose IDL has the greater value is the Predator. Note that this creates completely transitive trophic relastionships. (b) SIL-based recognition. The individual whose value for SIL summed over all complementary loci is the greater is the Predator. This does not necessarily give rise to transitive trophic relationships. At this point you also specify whether interactions are evaluated in cis (between homologous SIL only) or in trans (between all pairwise combinations of SIL). These modes of interaction are explained more fully in Supplementary information Part 1 and in the text. Alternatively, choose the fifth button (in separate box) to specify a complex system with several separate food webs. Individuals assigned to one food web cannot consume nor be consumed by individuals assigned to another food web. You must set the values of three parameters. 18 Supplementary Material Evolution of trophic structure Bell (a) the number of component source webs (subsystems). (b) The “web mutation rate”. This re-allocates species to different subsystems, for the following reason. If all Predators in one subsystem become extinct, all Producers in this subsystem are released from predation, and are then likely to replace all others, leading to a rapid loss of trophic complexity. It seems more reasonable to assume that other Predators would eventually evolve so as to be able to consume them. Accordingly, each species of Producer in the depleted subsystem is reassigned randomly to another subsystem with given probability in each cycle. You specify this probability as the web mutation rate. It is not applied to subsystems which include Predators. (c) The number of resources in substrate packets. The structure of substrate packets is explained in more detail in Supplementary Information Part 1. This parameter is set in a later form (MainForm) for simple systems. The minimum value allowed is 1 and the maximum 4. When you have selected the option and (if appropriate) set parameter values, press “Proceed”. If you have selected a simple system, this takes you to the next form. If you have selected a complex system, you are prompted (on the right-hand side of PPForm) to specify the characteristics of the subsystems, for as many as you have specified. For each subsystem, these characteristics are as follows. 19 Supplementary Material Evolution of trophic structure Bell (a) the frequency of the subsystem: the fraction of all EcoList slots initially occupied by organisms that will be occupied by members of this subsystem. This frequency is of course likely to change during the run. Click in the text box, enter the frequency of the first subsystem, then press Enter. The value that you have specified will then appear in the list box below, so that you can keep track of the configuration you are specifying. It does not matter what the frequencies you enter add up to: they are re-normalized to sum to unity by the program. (b) The mode of interaction, either cis or trans, specified as 0 or 1. Specify one of these and then (and for all subsequent choices) press Enter. (c) The mode of identifying predator and prey, either IDL-based or SIL-based. (d) The number of SIL. (e) The length of each SIL. (f) The interaction coefficient I that influences the probability of prey capture (see Supplementary Information Part 1). (g) The second interaction coefficient L (see Supplementary Information Part 1). (h) The metabolic cost for each resource: this is the quantity of this resource expended for maintenance in each move. Note that all of these parameters are input in a later form (ParameterInputForm) in the case of ac simple system. 20 Supplementary Material Evolution of trophic structure Bell SpeciesForm. This form specifies how species are defined. You can choose either a sexual or an asexual system. The sexual species concept has been written into the program but has not yet been investigated or debugged; it is recommended that at this point you choose one of the two Asexual options (a) Only a point mutation in SIL or RAL (altering the interaction with other species or substrates) creates a new species, of which the mutant individual is the first member. This is the default setting. (b) Deletion or duplication (altering only the strength of affinity and perhaps the cost of maintenance) also result in the creation of a new species. ParameterInputForm. This large and complex form sets the values of most of the parameters in Uqbar. The complete set of parameters, under the headings used on the form, is described below. If you have already specified some of these after choosing a complex system in PPForm, the corresponding boxes will not be visible. (a) EXTENT (1) EcoList. The number of slots in the EcoList (2) ComList The maximum allowable number of taxa existing at any one time. (3) History The number of cycles performed in the run. 21 Supplementary Material Evolution of trophic structure Bell (b) DIVERSITY (4) Res The number of different resources that make up a substrate packet. The minimum value is 1 and the maximum value is 4. (5) Menu. The number of different kinds of substrate packaet, each with a different mix of resources. (6) MaxAbun. The maximum number of individuals of any genotype in the initial population. (7) Diverse. The number of taxa in the initial population. (8) DivAuto. The number of taxa of Producers in the initial population. (c) GENETICS (9) IdlL The length of each IDL (10) SilL The length of each SIL (11) RalL The length of each RAL (12) SilN The number of SIL (13) RalN The number of RAL (14) MaxSIL The maximum number of SIL that can be borne by an individual (15) MaxRAL The maximum number of RAL 22 Supplementary Material Evolution of trophic structure Bell (d) NUTRIENT FLOW (16) Plate. The maximum quantity of resource in a a given kind of substrate packet. (17) Ifeed. The initial number of substrate packets. (18) Mfeed. The probability that a substrate packet is added in each move. (19) Recycle. The probability that the resources remaining in an indiidual that has starved to death are recyucled to the system, by being added to the Resource Pool. (20) Decompose. The probanbility that a substrate, when selected as Agent, decomposes. If it does decompose, it may be recycled or not. (21) XREs1 – Xres4. The quantity of (up to) four resources added to the Resource Pool per move. (e) RATIONS (22) Brat. The quantity of each resource that a newborn individual receives from its parent. (23) Dcrit. The minimum quantity of each resource compatible with life. If any resource falls below this value, the individual starves to death. 23 Supplementary Material (24) Evolution of trophic structure Bell Bcrit. The minimum level of each resource required for an individual to give birth. Reproduction is permitted only whemn all resources meet or exceed this threshold. (25) Meta. The cost of maintenance. This quantity of each resource is expended per move, regardless of the outcome of the move. (26) Heta. The factor by which the cost of maintenance of a Predator exceeds that of a Producer; this can be greater or less than unity. (f) INTERACTION (27) InterSub. The coefficient I in the interation between Producer and substrate packet. (28) LimitSub. The coefficient ILin the interation between Producer and substrate packet. (29) InterAct. The coefficient I in the interaction between two organisms. (30) LimitAct. The coefficient L in the interation between two organisms. (g) IMMIGRATION: check Allowed if immigration is to occur. 24 Supplementary Material (31) Evolution of trophic structure Bell Migrant. The probability that a single random organism is added to the system from an external pool, per move. The species composition of the external pool is that of the initial population. (h) DISTURBANCE: check Allowed if disturbance is to occur. (32) Disturb. The probability that the system is disturbed (by putting each of its occupants at risk) per cycle. (33) Fatal. The probability that any given individual is killed by a disturbance. (i) INVASION: check Allowed if invasion is to occur. (34) Invade. Probability that an invasion occurs, per cycle. The invaders are the external pool, with the same composition as the initial community. (35) Incomer. The probability that in the event of an invasion a resident is displaced by a random invader, per slot. (j) RECOMBINATION: check Allowed if recombination is to occur. (36) RecSIL. Probability of recombination for SIL. (37) RecRAL. Probability of recombination for RAL. 25 Supplementary Material Evolution of trophic structure Bell Note: recombination has not yet been adequately checked. (k) SPECIATION: check Allowed if speciation is to occur. (38) SpeciationRate. The probability given a Sexual species concept that a newborn individual belongs to a new species. (l) MUTATION: check Allowed if mutationis to occur; check Reversible if reversion is allowed. (39) DelR. The probability that a SIL or RAL present in the parent is lost in the newborn individual. (40) DupR. The probability that a SIL or RAL present in the parent is duplicated in the newborn individual. (41) RalMutR. The probability that any given bit in a RAL is flipped in the genome of a newborn individual. (42) SilMutR. The probability that any given bit in a RAL is flipped in the genome of a newborn individual (m) SPATIAL 26 Supplementary Material Evolution of trophic structure (43) Bell Disperse. The probability that a newborn individual is allocated a slot at random (rather than being allocated a slot as near as possible to its parent). (44) Homer. Home range: the region (in slots) on either side of the Agent within which the Patient is chosen; usaed to create local ecological interactions. (45) Patch. The probabiolity that an incoming substrate packet is assigned to a pre-defined local patch, or region within the EcoList, rather than being assigned top a random slot. Used to create environmental heterogeneity. `(m) RANDOMIZATION (46) seed. The random number seed used to minitialize the experiment if “0” is entered the timer is used. The default values assigned to most of these parameters will favour the development of a persistent trophically complex community, although they do not guarantee this. All can be changed at will. StartOverForm. This form can be used to start a new run, to continue with a run that has ended, or to end a run permanently, without the possibility of restarting it. Choose the option you want. 27 Supplementary Material Evolution of trophic structure Bell UqbarMainForm. This form, which contains most of the code for operating Uqbar, sets up the initial community. There are three ways of doing this. (a) As a random community. In this case, the specified number of Producers and Predators are assembled at random, that is, with random SIL and RAL sequences. A special case is the origin of a community from a single random Producer; such a community never develops trophic structure, and this option is used to configure Uqbar for population genetics. (b) As a community specified by the comlist_input (organisms) and sublist_input (substrates) files. These are files that have been created by a previous run, and this option enables you to investigate more fully any past experiment. Note: there is a slight bug in this version that makes it necessary to add one more line of code to each of these input files in order for them to be read in correctly. (c) As a community specified by nominating a list of substrates and genotypes directly in the box on the right-hand side of the form.. You will be prompted to give the following information. Type the values that you have selected for each parameter, followed by Enter. (1) Random number seed (over-rides any previous choice) (2) The quantity of each “dish” (recipe for substrate packet) (3) The amount of each resource in each substrate packet 28 Supplementary Material Evolution of trophic structure Bell (4) The abundance of each kind of organism (5) The number of SIL for each species (6) The number of RAL for each species (7) The genotype at each SIL for each species (8) The genotype at each RAL of each species When the message box announcing that Uqbar has been configured appears, press “OK” to begin the experiment 29 Supplementary Material Evolution of trophic structure Part 4. Output and Input Files Output files All output files are in csv (comma-dseparated variable) format. In the text box on the OutputForm, type any string “X” once you have selected a path for files. They will be then saved as “X “ followed by the following file name. meter.csv Output #1 Parameter values for run stock.csv Output #2 Initial community composition run.csv Append #3 Update of progress of run activity.csv Output #4 summary of different kinds of events comlist.csv Output #5 list of taxa sublist.csv Output #6 list of substrates ecolist.csv Output #7 complete list of occupants of slots FinalSystem.csv Output #8 the food web at the end of the run InitialSystem.csv Output #9 the food web at the beginning of the run state.csv Append #12 population genetics for single genotype Input #10 specified menu of substrates Input files sublist_input.csv 30 Bell Supplementary Material Evolution of trophic structure Bell comlist_input.csv Input #11 specified initial species composition web_input.csv Input #13 characteristics of webs in complex system In addition, a running summary is printed in the Immediate window. By default this includes the following variables for each cycle: Cycle Number of slots available for occupation Number of taxon names available Number of vacant slots Number of slots occupied byv substrate Number of slots occupied by Producers Number of slots occupied by Predators Number of Producer taxa Number of predator taxa Total quantity of resources entering system Total quantity of resources leaving system 31 Supplementary Material Evolution of trophic structure Bell Part 5. Free parameters in Uqbar Parameter Type Definition AbList Long Number of taxa available for speciation BCrit(4) Single Threshold of resource() for birth BRat(4) Single Ration of resource() donated to newborn ComList Long Number of potential taxa in community DCrit(4) Single Threshold of resource() for survival Decompose Single Prob that substrate Agent decomposes DelR Single Prob that locus is deleted Disperse Single rob of random long-distance dispersal Disturb Single Prob of disturbance per cycle DisturbPermit Boolean Turns disturbance on or off DivAuto Integer Initial number of autotrophic taxa Diverse Integer Initial number of taxa DupR Single Prob that locus is duplicated EcoList Long Number of slots in ecosystem Fatal Single rob that occupant of slot is killed by disturbance Heta Single Excess metabolic cost of heterotrophs 32 Supplementary Material Evolution of trophic structure History Long Number of cycles in run Homer Single Region near Agent where Patient can be found IdlL Integer Length in bits of IDL Ifeed Long Initial number of substrate packets Incomer Single Prob incomer arrives, each slot InteractionMode String Sets interactions in trans or in cis InterAnt Double InterAnt = i for predator-prey * InterSub Double InterSub = i for autotroph-substrate * Invade Single Prob of invasion, each cycle InvadePermit Boolean Turns invasion on or off LimitAnt Double LimitAnt = L for predator-prey * LimitSub Double LimitSub = L for autotroph-substrate * MaxAbun nteger Max initial abundance of taxon MaxRal Integer Max number of RAL possible MaxSil Integer Max number of SIL possible Menu Integer Combinations of resources (substrates) Meta(4) Single Metabolic cost per move for resource() Mfeed Single Prob of adding substrate packet per move Migrant Single Prob of adding migrant from pool, each move MigrantPermit Boolean Turns immigration on or off MutatePermit Boolean Allow mutation or not Patch Single Prob that substrate is allocated to local patch Plate Long Max quantity of resource per substrate packet 33 Bell Supplementary Material Evolution of trophic structure Bell PPTransitive Boolean True for IDL-based interaction, False for SIL-based RalL Integer Length in bits of each RAL RalMutR Single Prob of point mutation per bit at RAL RalN Integer Number of RAL among aborigines RecombinePermit Boolean Allows recombination or not RecRal Single Prob of recombination in RAL region RecSil Single Prob of recombination in SIL region Recycle Single Prob that resources recycled from starved organisms Res Integer Number of distinct kinds of resource Revert Boolean Point mutation reversible Seed Long Random number seed SetUpMode String Random or Specified input SilL Integer Length in bits of each SIL SilMutR Single Prob of point mutation per bit at SIL SilN Integer Number of SIL among aborigines SourceWebNumber Integer number of separate source webs in complex systems SpeciationPermit Boolean Sexual speciation permitted SpeciationRate Single Prob sexual speciation per birth SpeciesConcept String Sexual or Asexual species concept TaxBroad Boolean Nature of asexual species concept VacList Long Number of slots available for occupation WebMutation Single Prob per cycle that taxon is assigned to new web XRes(4) Single Quantity of 4 resources added to rpool per move 34 Supplementary Material Evolution of trophic structure Bell * Interaction model is a two-parameter negative exponential: Prob of interaction = L [1 - exp(- i * silfit)] where silfit is number of complementary matches between SIL of Agent and Patient, i is the coefficient of interaction and L is the limiting probability approached as the number of matches becomes large. L and i for interactions with substrates and with other organisms are different. This is the only equation in Uqbar 35 Supplementary Material Evolution of trophic structure Bell Part 6. Elementary properties of Uqbar The purpose of Uqbar is to explore the behaviour of evolvable communities that lie beyond the range of current models. It can be a credible simulacrum, however, only if its behaviour in simple situations conforms to well-established theory. A series of elementary exercises were therefore conducted to validate more ambitious experiments. 1. No organisms, single substrate. With no decomposition there is no loss of substrate from the system, which persists indefinitely unchanged. With no external input of resources, decomposition reduces the quantity of substrate until the system is empty. Recycling substrate resources to the resource pool slows down this process but cannot prevent the emptying of the system. When resources are supplied to the Resource Pool from an external source, the concentration of substrate in the ecosystem depends on the rate of supply relative to the resource content of a resource package. 2. No organisms, two substrates. The frequency of the resources in the ecosystem approaches their frequency in the menu. If any resource required to make substrate has no external source of supply, substrate levels in the ecosystem fall to zero. 3. Single Producer, single substrate. A single Producer able to consume the substrate grows logistically, while resource concentration declines asymptotically towards some positive value. The rate of growth and the carrying capacity depend on the input of substrate to the system, and are affected by the rate of extraneous resource input to the 36 Supplementary Material Evolution of trophic structure Bell resource pool, the rate of transfer of substrate from the pool, the proportion of resources recycled and the rate of spontaneous decomposition of substrate in the ecosystem. These interact in a straightforward manner. Thus, the system is resource-limited through the Resource Pool when the demand created by input to the ecosystem is large relative to allochthonous supply. When this demand is relatively small, population growth depends on the rate of substrate input. Population number depends on the rate of substrate decomposition, with fewer individuals supported when the rate of decomposition is high. The efficiency of substrate use depends on the metabolic cost, which is determined by the number of RAL and the metabolic cost per RAL. Population increases as metabolic cost declines. Moreover, populations with lower metabolic cost drive down substrate to lower levels. 4. Two identical Producers, single substrate. When two identical Producers are introduced at equal frequency the outcome depends on the extent of the ecosystem. If the ecosystem is fairly extensive (more than 5000 slots) the two coexist for long periods of time (thousands of cycles) with little fluctuation in frequency. In smaller ecosystems the fluctuations become greater, until in very small systems (less than 50 slots) one or the other becomes extinct through demographic stochasticity within a few tens or hundreds of cycles . 37 Supplementary Material Evolution of trophic structure Bell 5. Disturbance and rescue by migration. Severe disturbance destroys the community, which can then regrow from migrants. Immigration also prevents permanent stochastic extinction of species. 6. Two dissimilar Producers, single substrate. The type with fewer RAL increases in frequency because its maintenance cost is lower. As it does so, substrate declines as the more efficient form spreads, before stabilizing at a lower level once the less efficient form has been eliminated. The log frequency ratio of the two forms declines linearly through time. The slope of this plot can be used to estimate the selection coefficient; it is –0.03 when the two forms differ by a single RAL, and is additive for larger differences. 7. Obstruction of selection by immigration and invasion. Immigration (defined on p 7) slows down the fixation of the fitter type and may prevent the loss of the less fit type. Invasion (defined on p 8) creates a jagged change in frequency through time because it causes the replacement of a fraction of the resident population by a cohort with the composition of the base population. 8. Interaction strength. All the above results were obtained with strong interaction in which a single complementary RAL assured resource capture. Weaker interaction retards the replacement of a less efficient with a more efficient type. 9. Two Producers on two substrates. If there is no substrate decomposition, two specialized Producers consuming different substrates coexist, forming two separate 38 Supplementary Material Evolution of trophic structure Bell systems. Each grazes its substrate down to the point where resupply from the Resource Pool balances consumption. When the two are equally efficient the replacement level is the same for both substrates. If decomposition occurs, then the type specializing on the substrate with the lower supply rate is eliminated. Thus, the dynamics of two complete and exclusive specialists is determined by the accumulation of substrate. When accumulation is undisturbed by decomposition then each substrate constitutes a refuge and selection is negatively frequency-dependent, with the frequencies of the types approaching substrate input frequencies. When there is little or no accumulation frequency-dependence disappears and the type specializing on the substrate with the greater rate of supply is fixed. 10. Three Producers on two substrates. Two Producers are complete and exclusive specialists; the third is a generalist able to consume both substrates. In the simplest case, the two substrates have equal resource composition. The cost of generalization is then the number of extra RAL required by the generalist. If there is no cost, the generalist is fixed. If the cost just balances the benefit (e.g. 2 RAL for the generalist and 1 RAL for each specialist, with equal supply rates of the two substrates) there is a neutral equilibrium. If the cost falls short of the benefit, the generalist is fixed. Otherwise, the crucial factor in competition is the variance of resource composition among substrates, which favours the generalist: the greater the variance, the more rapidly the generalist spreads, unless the metabolic cost of carrying more RAL prevents this. 39 Supplementary Material Evolution of trophic structure 11. One Producer on a single substrate, with mutation. Bell There is a progressive decrease in the number of RAL through deletion, so that increasingly frugal types evolve, ending in the fixation of the optimal single-RAL type. 12. One Producer on two substrates, with mutation. A type able to exploit the unused resource soon emerges by point mutation and spreads to equal frequency if the substrates have equal rates of production. 13. One substrate, one Producer, one Predator. The predator-prey interaction can be tuned through the strength of interaction between predator and prey, or between organism and substrate, or through the additional metabolic cost of heterotrophy. (a) Strong interaction. Dynamics are always oscillatory. With single SIL there is a narrow zone of coexistence where Predators have high metabolic cost relative to Producers. If this cost is too great, the Predator becomes extinct fairly rapidly. If the cost is low, there are feeble cycles with either the Predator or the Producer going extinct; if the Producer goes extinct first the Predator soon follows, of course. The system is readily rescued by low rates of immigration. (b) Weak interaction between predator and prey. There are persistent, rather low-amplitude cycles even when the additional metabolic burden of predation is low. Thus, weaker predator-prey interaction stabilizes dynamics in a region that would otherwise be unstable. 40 Supplementary Material Evolution of trophic structure 14. One substrate, one Producer, one Predator, with mutation. RAL, Bell Beginning with a 4- 4-SIL Producer with one RAL capable of binding to the sole available substrate, and a 4-SIL Predator capable of eating the Producer, with strong interaction in cis, the consequences of genetic change are as follows. (a) Superfluous RAL and SIL tend to be removed by deletion, since this reduces metabolic cost. Deletion of the sole RAL or SIL required for resource exploitation is lethal, however. (b) Duplications are deleterious because they increase metabolic cost. They are conditionally deleterious, in that they might provide a basis for adaptive divergence in the future, given a beneficial point mutation. (c) Point mutations are usually neutral, because no alternative substrates or prey exist. Mutations at required SIL or RAL are lethal. One class of point mutation is highly beneficial, however: mutation of the Producer RAL to a state that the Predator does not recognise. The initial community of two genotypes quickly diversifies, principally through neutral point mutations, mildly deleterious duplications, and beneficial deletions. The crucial event is a point mutation to resistance in the Producer, which spreads rapidly in the population. As it does so, selection continues to favour more frugal genotypes among the still numerous susceptible Producers and the Predators. With the rise of the resistant type the population of Predators declines, and a new virulent type able to consume the new 41 Supplementary Material Evolution of trophic structure Bell resistant Producers usually fails to appear. This seems to be mainly because its rate of reproduction is very low in the absence of susceptible prey, and mutation occurs only at replication. (Note that the effects of mutation on fitness are asymmetrical: any random change in SIL sequence makes a Producer resistant to its current Predators, whereas only the single appropriate mutation in a Predator will restore its ability to capture the Prey.) The Producer, on the other hand, has a high birth rate because it is able to consume substrate, even though it has a high death rate if it is vulnerable to predation. The type with the greater rate of turnover thus has the evolutionary edge, and the Predator becomes extinct sooner or later. Resistant and susceptible Producers are then neutral, and frugal deleted versions of both increase in frequency, eventually dominating the population. 15. One substrate, two Producers, two specialist Predators. The most interesting system is that in which the more frugal Producer is vulnerable to the more efficient Predator. This was accomplished by letting Producer 1 have a single RAL and Producer 2 two identical RAL, while under weak predator-prey interaction Predator 1 has two SIL both complementary to Producer 1 whereas Predator 2 had two SIL only one of which was complementary to Producer 2. The source web Producer 1 - Predator 1 is then more frugal in pure culture than the alternative source web Producer 2 - Predator 2, because Producer 1 is reduced to lower levels by its predator. The complete system is highly oscillatory (given strong interaction in cis), the more frugal component Producer 1 Predator 1 having the greater variance because it involves the stronger interaction. The usual outcome is that Predator 1 suffers stochastic extinction, releasing Producer 1, which then completely displaces Producer 2 - Predator 2. The system persists longer when the 42 Supplementary Material Evolution of trophic structure Bell Producer-substrate interaction is weak, although sooner or later a deeper trough than usual in the Producer 1 population results in the loss of Predator 1. Weak interaction together with a modest level of immigration secures long-term persistence; with an immigration rate of 0.001 per move only about 5% of new creatures are immigrants (and only 0.5% are Predator 1 immigrants), but an ecosystem with 10,000 slots maintained diversity with no sign of a systematic trend in frequencies for 5000 cycles. 16. Many Producers and many Predators. Communities with hundreds of different species may or may not retain trophic complexity, depending on the values of parameters that affect metabolism and prey capture. Figure 4 of the article shows how capture probability affects the persistence of Predators, given a moderate maintenance cost that permits about ten attempts to locate and capture prey before an individual starves to death. When capture probabilities are low, Predators starve and are maintained only as rare immigrants at very low levels. At modest capture probabilities, however, Predators are able to survive, and the community remains trophically complex. Thus, the long-term persistence of complex food webs in Uqbar does not require some unrealistic or unduly restrictive combination of parameters. It is only for the highly specific interactions in Long-Cis systems that very high capture probabilities are required. These high capture probabilities generate strong coupled oscillations in Predator and Producer, which in closed systems often leads rapidly to the extinction of Predators, with or without the extinction of Producers. The community is readily rescued, however, and retains trophic complexity, by very low levels of immigration, of the order of a single individual per cycle. 43 Supplementary Material Evolution of trophic structure Bell Part 7. Optimal number of SIL The model used for the probability of capture Pcap as a function of complementarity k is: Pcap = L (1 – exp(-ik)) … (1) where L and i are given parameters. Define E as the probability of encounter with potential prey, C as the metabolic cost per move, and B as the benefit derived by the predator (metabolic content of prey). The expected gain G per move is then: G = E Pcap B - C … (2) This is affected by the number of SIL borne by the Predator, Npred, through complentarity k and metabolic cost C, both of which increase with Npred. Complementarity will be equal to the product of the probability that a given Predator SIL is complementary with a given prey SIL (equal to the reciprocal of the length of the SIL, SILL), the number of potentially complementary prey SIL (Nprey, determined by cis or trans interaction), and the number of predator SIL. Hence dk/dNpred = Nprey/SILL. If each additional SIL incurs the same incremental metabolic cost, then dCmet/dNpred = C. Substituting these results in (2) yields dG/dNpred = Ebi(L -= Pcap) (Nprey/SILL) - C … (3) Setting this to zero and substituting for Pcap gives the optimal number of SIL as Npred = - K loge [(1/E) (C/B) K] … (4) where K = (1/iL) (SILL/Nprey}. 44