Cellular Automata – Lab Notes Stephen Roxburgh, 2002 Introduction You will recall from lectures that cellular automata are a class of mathematical model that can be used incorporate spatial information in the study of complex dynamic systems. In a cellular automaton, space is represented by an array of cells. The array can be a single line of cells, a two dimensional grid, or multi-dimensional. The essential features of a cellular automaton are: 1. Space is represented by an aggregation of cells (the array). 2. At any given time, each cell is represented by a state, for example a particular species, or type of forest cover. 3. There is a neighbourhood which defines what neighbouring cells interact with the target cell. I.e., the state of a cell in the next time period depends both on its current state, and also the state of the cells in its neighbourhood. 4. There is a program, which is simply the set of rules which define how the state of a cell changes in response to its current state, and the states of its neighbours. 5. Time proceeds by discrete steps. The strict definition of a cellular automaton specifies that the rules must be deterministic, i.e. there is no randomness. However, the real world is characterised by a certain amount of unpredictability, therefore many cellular automata models in ecology contain elements of randomness. In this lab you will investigate the behaviour of two types of cellular automata. In the first you will write a Microsoft Excel spreadsheet to explore the 1-dimensional ‘linear’ cellular automaton of Molofsky (1994). This model is perhaps the most simple cellular automata which is capable of mimicking simple biological systems. In the second part of the lab you will explore a more complicated two-dimensional cellular automata. This model is based on that of Green (1989). The two-dimensional grid of cells is interpreted as a landscape patch, and within this landscape two ‘species’ grow and interact with one-another, and there are also periodic disturbances which remove the species from the landscape. You will use this model to explore a range of scenarios for using disturbance (fire) as a management tool for maintaining biological diversity. 1 Aims The aims of this lab are to: Gain experience in writing a simple one-dimensional 'deterministic' cellular automaton model for describing population growth, and also to investigate the impact of adding randomness to this simple model. Manipulate a two-dimensional cellular automata model of greater complexity, to investigate the types of behaviour it is capable of, and use it to answer some specific questions relating to the ecological system it models. To gain insight into the types of analyses, ecological systems and management problems that might be investigated using the cellular automata approach. Assessment For this lab there are a four questions that you are required to provide written answers to. These are located in the boxes throughout the text. No more than half a page should be needed to answer each question. Also, throughout the text there are tables to fill out, and places to write particular outcomes of the models. These will also be included in the assessment. There are also questions scattered throughout the text, but not inside boxes. These are not to be included in the assessment, but are designed to make you think more deeply about the models you are constructing. Model 1. One-dimensional cellular automata A one-dimensional cellular automaton can be visualised as a column (or row) of cells. In this example we will be looking at population growth in a strip of cells that we will refer to as a ‘landscape’. Each cell in the landscape will either be occupied by the species, or will be empty. This exercise closely follows that published by Molofsky (1994). Before considering this spatial model, and to provide some background to the exercise, we will first have a look at population growth as predicted from a simple non-spatial model Background information - Non-spatial population growth Non-spatial models of population growth, such as the logistic equation (which you heard about earlier in the course) can give rise to a surprisingly complicated range of dynamic behaviours. For example, Equation 1 is a simple model of population growth, where Nt is the abundance of the species at time t, and R is the population growth rate. N t 1 RN t 1 N t Equation 1 Starting with a small population size, and with a population growth rate of R = 1.5, the model predicts the following pattern of population growth. 2 N Stable equilibrium Time This is the classic S-shaped or 'Sigmoid' growth curve, where the population approaches a ‘stable’ equilibrium. If the population growth rate is increased from R=1.5 to R = 3.1, the behaviour changes from the smooth approach to a constant population size, to one which fluctuates between two values. This type of behaviour is called ‘limit cycling’. N Limit cycle Time If R is increased even further, to e.g. R = 3.75, then the dynamics change from a fluctuation between two values, to population dynamics which appear random (although remember there is no randomness in the model). N Chaos Time These dynamics, where the output appears random, even though the model is based on deterministic rules, are called 'chaotic'. One characteristic of chaotic systems is that small changes in the starting conditions or input parameters can drastically alter the subsequent dynamics. This sensitivity to initial conditions is the so-called 'butterfly effect', where it was suggested the a butterfly beating its wings in one part of the world can alter weather patterns in another! 3 Population growth by Cellular Automata Molofsky (1994) has shown that the same range population growth patterns can be generated using a very simple cellular automaton. We will be repeating (and extending) Molofsky's analysis. The spatial 'landscape' or array comprises a one-dimensional strip of cells. Each cell is in one of two states. Either a cell is occupied by a species and it is given the value 1, or it is vacant and given the value 0. At time = 0 the landscape might look like the following, with 3 of the 10 cells in this landscape occupied by the species. Note that the zeros have not been shown. Time 0 1 1 1 To predict what the landscape might look like at time =1 we need to define the 'neighbourhood' around each cell, and also the rules or 'program' which defines how a cell’s state will change. The neighbourhood is here defined as a cell in the landscape (the 'target' cell), and also the two cells either side of it. For a cell at position i in the array, the neighbourhood is therefore the three cells ai-1, ai, and ai+1. When defining the neighbourhood there is the problem of what to do with the cells at either end, as they have only one neighbouring cell, whereas all of the others have two. Think about possible solutions to this problem, and we will discuss them during the class. The first example you will explore below (Case 1) is a cellular automaton in which the state of a given cell at time t+1 is given by the following rules: If any of the cells in the neighbourhood are occupied at time t, then that cell at time t+1 will also be occupied. Otherwise If the target cell at time t is empty, and the cell either side of the target cell is also empty, then the target cell at time t+1 will remain empty. The biological interpretation of these rules is explained below. These rules can be written more formally as: 4 x i 1 t 1 1 if a x 0 x i 1 t a x i otherwise 0 Equation 2 t where a x is the state of the cell at position x in the landscape at time t. Applying this rule to the above example gives the following transition. Time 0 Time 1 1 1 1 1 1 1 1 1 1 Translating this model into Microsoft Excel You will create an Excel worksheet to investigate the dynamics of this one-dimensional cellular automata, under three different sets of rules. The worksheet will show the pattern of spatial changes over time, and will also summarise the information in an abundance vs. time chart, similar to those on pages 2 and 3 for the non-spatial model. The three sets of rules that you will explore are: Model 1a. Low neighbourhood competition and local dispersal This is the set of rules defined by equation 2 above. Biologically, they can be interpreted as defining a situation where the local density of neighbours does not affect survival, and empty cells can only be colonised by adjacent cells which are occupied. The invasive aquatic water weed Salvinia molesta is an example of a plant which might fit these simple dynamics. This plant has low levels of within-species competition, and grows by clonal spread (although, in practice, it is also subject to some long-distance dispersal e.g. transfer by boat trailers) 5 Model 1b. High neighbourhood competition and long-distance dispersal x i 1 t 1 0 if a x 3 x i 1 t a x i otherwise 1 This set of rules states that an occupied cell, also surrounded by two occupied cells, becomes vacant the following year due to competition with its neighbours. For any other case the cell at the next time becomes occupied, either because it was occupied at the previous time step, or if originally empty, it was is successfully colonised (colonisation of empty cells, which also have empty cells as neighbours, is presumed to occur due to propagules arising from outside of the neighbourhood, hence ‘long-distance dispersal’). Many well dispersed species might fit such a pattern, such as plants from the daisy family Asteraceae (which includes dandelions and thistles). Model 1c. High neighbourhood competition and local dispersal x i 1 t 1 if a x 3 x i 1 0or x i 1 if a xt 1 0 x i 1 t a x i otherwise 1 Under this scenario there is a high degree of local competition, as in the previous example, but in addition, empty cells can only be colonised if they have at least one neighbouring cell that is occupied. Many tree species, with large, heavy seeds, would come under this category. How can all this be translated into Excel? Here are some instructions to get you started with model 1a: 6 To set up the spreadsheet so that it is suitable for displaying a spatial automata model… Start with a blank Excel worksheet. Press ctrl + a to select the entire sheet, then go to the Format > Column > Width menu. Enter a '1' in the place where it says 'column width' and press OK. Now go to the Format > Row > Height menu, and enter '10' for the row height. This sets up the spreadsheet so each cell is a small square, so that lots of cells can be seen on the screen at the same time. Go to the Tools > Options menu and select the 'View' tab. Uncheck the option which says 'zero values' . This hides any 0's that you might have in the spreadsheet, and makes it easier to see the cells that are occupied by a species. It makes the spreadsheet less cluttered. Also within the Tools > Options menu click on the 'Calculation' tab and check to make sure that the ‘automatic’ radio button is checked. This ensures that the spreadsheet cells are updated automatically. You can now use one of the columns at the left of the spreadsheet (say, column B or C) to define the starting conditions of the model (Time 0), with the columns to the right of that representing the state of the landscape at subsequent times. I suggest you make your landscape length 26 cells long, but starting at row 2, leaving row 1 blank. To write the model… To implement the rules you will need to use the Excel 'If' statement. In the screen image above, the cursor is in spreadsheet cell C3, which represents the state of cell 7 B3 at time = 1. According to the rule for model 1a ‘Low neighbourhood competition and local dispersal’, if any of cells B2, B3 or B4 are occupied, then cell C3 will also be occupied. Otherwise, if cells B2, B3 and B4 are all empty, then cell C3 will also be empty. One possible ‘If’ statement that would give this result is: =IF(B2+B3+B4 > 0,1,0) equation 3 If you look at the formula bar in the screen image above you will see that this is the contents of cell C3. The ‘If’ statement has three parts. The first part, B2+B3+B4 > 0, is an expression that gives a result that is either true or false. In this case it tests whether B2 + B3 + B4 is greater than 0. If it is, then cell C3 gets the value '1' otherwise it gets the value of '0'. Convince yourself that this statement is the same as the rules in equation 2. Note that you do not have to type the formula into each cell. Just type it in once, check to make sure it is correct, then copy it into the other cells in the column. This works because Excel automatically updates the cell referencing, so no matter where the formula is, it always makes reference to the three cells immediately to its left. Having calculated the state of the landscape at time =1, you can now copy the formula across the spreadsheet into the other columns to calculate the change in the population size from time 1 onwards. It should look something like that shown below. You only need to copy the columns as far as the edge of the screen. 8 In this example you can see that at time 0 there are 3 cells occupied. At time 1 this has increased to 6. By time 3 there were 8, and by time 25 the landscape is completely filled. To look at the patterns of the dynamics you will need to graph these abundances against time. To do this, place the cursor beneath the first column, but leaving at least one empty row beneath the landscape, (e.g. in cell B34 above) and type =SUM(B2:B32) This will add up all of the cells in the landscape that are occupied at time = 0. Copy this cell across the spreadsheet. It should look like this. If the column totals in the cells are displaying a '#' rather than a number, this means the font size is too big. Select the row containing the column totals, and change the size of the font. Do this by selecting the font box (arrowed above) and type in a smaller font size, such as 4 or 5. You will find the first exercise easier if you can read these values directly from the spreadsheet. To make a chart of these totals vs. time: Select all of the cells containing the column totals. Press the 'chart wizard' button on the toolbar Under 'chart type' select 'line', then press 'finish' 9 Resize the chart so it fits under the landscape. The final spreadsheet should look like this The spreadsheets for models 1b and 1c can be constructed in the same way. I suggest that once you have your first model up and running, copy its entire contents into a blank worksheet, and then fiddle about with the formulae to get the correct translation of the other rules. To duplicate a worksheet Select the entire contents of the current worksheet by pressing ctrl + a, and then copy them by pressing ctrl + c. Insert a new worksheet via. The Insert > Worksheet menu option. The new worksheet will open automatically. Paste the duplicate copy using ctrl + v. If you have copied a chart into the new worksheet, you will need to delete it and create a new one. This is because the copied chart will refer back to the cells in the worksheet from where it originated, and not the cells within the new sheet. If you have difficulty translating the rules for models 1b and 1c into an excel ‘If’ statement, have a look at the ' Some hints on translating the remaining rules' section at the end of this document. 10 Exploring the model Once you have completed the three versions of the model, and you are happy that they are correct, you can begin to explore their properties. There are three exercises. Exercise 1: Dynamic behaviour To start with, initiate the landscape of each model by typing a few 1’s in the first column for each, and look at the different growth patterns that emerge. The range of dynamic behaviours from the three cellular automata are similar to those generated by the nonspatial model. In the table below note down what automata rule-set corresponds with the similar outcome from the non-spatial model. Nonspatial model R = 1.5; Stable equilibrium R = 3.1; Limit cycles R = 3.75; Chaos Equivalent outcome using cellular automata Model _____ Model _____ Model _____ Why do you think the 'Stable equilibrium' non-spatial model shows the S'-shaped sigmoid curve in its approach to stable equilibrium, whereas the spatial model does not? Exercise 2: Invasion By altering the number of cells which are set to 1 at time=0, and also the spatial locations of those cells, we can explore some simple scenarios to investigate the effect that the different starting positions, and different starting patterns, have on the ability of the species to invade the landscape. (a) Start with just one cell occupied in the first cell of the first column, and note how many time steps it takes for the species to fill 80% of the landscape. If your landscape is 26 cells long, then note how long it takes for at least 21 of the cells to become occupied. Sequentially move the starting cell down the column towards the middle of the landscape, each time noting how long it takes for 21 cells in the landscape to be filled. Do this for each of the three models, filling the following table as you go: Starting cell position Edge of the landscape 1 2 3 4 middle of the landscape 5 6 7 8 9 10 11 12 13 Model 1a Model 1b Model 1c Q 1.1 From the above table you should have found that each model showed a different pattern in the rate at which the landscape filled, and that in some cases the rate depended upon the location of the initial cell. Explain the difference between models 1a and 1b with respect to the rules governing competition and local dispersal. For model 1c, why are the trends less predictable? 11 (b) Now initialise each model with 5 cells in the first column, and again count how long it takes for the species to fill 80% of the landscape. Try starting off with all 5 cells clumped together, and also with them spread apart. Is the rate of spread of the species within the landscape quicker or slower than starting with just one cell? Q 1.2 What do the different spatial arrangements of the 5 cells have on the rate at which the species can fill of the landscape? As an example of the application of these results, consider the release of organisms into an environment, e.g. for the biological control of a pest. Based on this simple model, would it be more effective to start off with all of the control agents spatially close together, or separated? Exercise 3: Incorporating randomness - Population Viability Analysis So far we have only been considering deterministic rules, however there is usually some degree of randomness (i.e. uncertainty) present in the real world. The question to be explored in this exercise is the effect that randomness has on the growth of the population. In this exercise you will exploring the effect that adding randomness has on the dynamics of model 1a 'Low neighbourhood competition and local dispersal’ How can randomness be entered into the model? The easiest way is, every now and then, make the model do the opposite to what the deterministic rule says. For example, you could set up the rule so that a cell is filled, according to the deterministic rule, only 95% of the time. I.e. due to chance, establishment in an empty cell fails 5% of the time, and the cell gets a 0 instead of a 1. The way to do this is to use Excel to generate random numbers between 0 and 1. Recall for case 1 that the deterministic rule looks something like this =IF(B2+B3+B4 > 0, 1,0) To convert it to the random rule you could replace it with =IF(B2+B3+B4 > 0, IF(RAND() > 0.05,1,0),0) Where RAND() is the Excel syntax for returning a random number between 0 and 1. In English the rule states “If B2+B3+B4 is greater than zero, and if a random number is greater than 0.05, the cell gets a 1. If the random number is less than 0.05 then a zero is returned instead. If B2+B3+B4 equals 0, then a zero is always returned” . In other words, in cases where it is predicted that a cell will get a 1, in 5% of times a ‘mistake’ will be made and it gets a 0 instead. We call the value of 0.05 the error rate. To save you having to alter and copy lots of cells each time you want to change the error rate, it is better to place the error rate in a vacant cell, and refer to that cell within your formula. For example, if you typed 0.05 in spreadsheet cell A50, you could change the formulae in the landscape to. 12 =IF(B2+B3+B4 > 0, IF(RAND() > $A$50,1,0),0) In this way, you only need to alter cell A1 to effect a change in the whole model. The ‘If’ statement can get a bit complicated, so in order to check that you have the formula correct, make your error rate = 0, and confirm that the pattern of growth is the same as in the deterministic version. Using model 1a start off with a low error rate (say 0.01), and gradually increase it, noting what it does to the dynamics. Because there is now randomness in the model, you can press F9 lots of times and get different growth patterns, even with the same starting configuration. This adds another dimension to any analysis you might do, and offers the potential to conduct a simple Population Viability Analysis, which you have already come across during the Banksia practical earlier in the year. Population Viability Analysis Start with only one cell occupied, placed in the middle of the first column, and set the error rate to 0.4. Simulate the dynamics 30 times (by pressing F9), and count the number of times the population persists for greater than 50 time steps (if your spreadsheet is not wide enough, you might have to add some extra columns). Now initiate the cell nearer to one of the edges of the landscape, and repeat the exercise. Q 1.3 What differences are there for the viability of the population depending on where it starts in the landscape? Given your knowledge of species dispersal and the structure of this simple model, can you offer an explanation for the difference? Model 2. Two-dimensional cellular automata This model is based on that of Green (1989), although with some simplifying modifications, and some additions. The name of the file is 2Dimensions.xls, and instructions for downloading it from the file server will be provided in the lab. The grid of cells represents an area of land, and each grid cell can be occupied by one of two species, or be empty. The model follows the fate of two populations as they develop through time. The two species compete with one-another, and they are also affected by external disturbance (e.g. fire). Although the term 'species' is used here, the states could also be interpreted as representing different ‘community types’. When you first load the spreadsheet it will look like this: 13 The landscape is the square block of cells above the control buttons, and it will initially contain 10 cells occupied by species 1 (coloured green). The figure in the bottom right corner displays the % cover of landscape occupied by each species at each time. Above this are the parameters which define the species characteristics, the fire regime, and the way the results are displayed. In this model the programming is done for you, using the VBA programming language that is part of Microsoft Excel. You are encouraged to browse through the code to see how the model is constructed (there are comments within the code to guide you through it). You are also welcome to modify the model directly through making changes to the code, e.g. altering the rules which define the species interactions, the shapes of the disturbances, the patterns of seed dispersal, species susceptibility to fire, etc. Description of the model Each iteration of the model is assumed to be equal to one year. The landscape has the following attributes: Its dimensions are 20x20 cells. The edges of the landscape are absorbing, i.e. seeds dispersed outside of the area are lost from the system. 14 Each species has the following characteristics Age to maturity: Once a species germinates and establishes in a cell, it must survive there for a set number of years before it can reproduce. Survivorship: There is a constant background rate of mortality for each species, independent from the disturbances. A survivorship of 0.9 means there is a 90% chance of that species persisting to the following year. Fecundity: Once maturity is reached, each individual produces a constant number of seeds each year. Dispersal distance: These seeds are dispersed within a certain distance (number of cells) of the adult. The disturbance (fire) has the following characteristics Disturbances are (approximately) circular. They have an average size (which varies by 10%). There is an average duration between disturbance events (which varies by 10%) (Fires occur at random positions within the landscape) In addition to these attributes, competition occurs between the two plant species. At the start of each year the plants reproduce, and the seeds are dispersed into the surrounding neighbourhood, defined by the dispersal distance. Seeds which fall into cells already occupied by established plants are lost due to competition, i.e. seedlings cannot survive under an established canopy. If seeds are dispersed into empty cells, they then germinate. If the only seeds to have dispersed into this empty cell belong to species 1, then species 1 successfully establishes in this cell. If the only seeds have dispersed into this empty cell belong to species 2, then species 2 successfully establishes in this cell. If there are a mixture of seeds from the two species, the model is set up so that species 2 always wins, i.e. species 2 competitively excludes species 1 during seedling competition. In addition to the parameters controlling the species life history parameters and the fire regime, there are three additional parameters, listed under 'Simulation control', which control how the simulation runs. Starting density This is the number of cells of each species that the landscape is initiated with at year 0. For the first exercise you will only be looking at single-species population growth of species 1, hence there are no cells initiated with species 2, and no parameters for this species. Landscape update rate This controls how often the graphical output of the model is updated. At the start you will want to see what the species are doing at every year. The problem with this is that it takes a lot of time to draw the pretty pictures. Increasing the number of years between screen updates makes the model run much faster, at the expense that you will not see what is 15 going on at every step. Retain updating every year until you get a feel for how the model works. Visually watching the model run can tell you quite a lot about it is constructed. Model run duration This controls how many years the model runs for every time you press the 'Run model' button. It is set at 50 at the start for exercise 1, so you have to keep pressing 'Run model' to get the simulation to progress further than that. There are four additional buttons which control the model Reset exercise 1 This resets all of the parameters and initialises the landscape for the first exercise. Reset exercise 2 This resets all of the parameters and initialises the landscape for the second exercise. Initialise landscape This initialises the landscape, but does not alter any of the parameters. Press this when you have changed some of the parameters in the sheet, and want those changes retained in the next run of the model. You should be pressing this button more often than either of the reset buttons. Quit This quits the simulation whilst it is running. You might have to press this a few times to get it to work! With respect to the definition of the cellular automata, the essential components of this model are: The array is 20x20 cells Each cell can be in one of three states: Species 1 present, Species 2 present, or empty. The neighbourhood is rather complicated in this model, because the seeds that fall into a cell arise from the combination of the total mature plants of each species that surround the cell, and also because the neighbourhood (dispersal distance) for each species can be different. The rules determining the state of the cells in the next time step are as follows: Cells already occupied by either species remain occupied until either (a) they become empty due to natural mortality, or (b) they become empty due to disturbance. Empty cells become colonised by species 1 only when seeds of this species disperse into the cell, and there are no seeds of species 2 present. Empty cells become colonised by species two whenever any seeds of this species disperse into the cell, regardless of the presence or absence of seeds of species 1. 16 Exercise 1: Getting acquainted with the model In the first exercise you will manipulate the life-history parameters for species 1, and also the fire parameters, in order to see what effects these parameters have on the growth of the population, and also to see how the model runs. The landscape is initiated with 10 cells of species 1, randomly located. Start off with the default settings (press the 'reset exercise 1' button) and run the model by pressing the ‘run model’ button. Watch carefully and note when the population grows to cover at least 80% of the landscape (i.e. 21 cells in a 26-cell landscape). The total cover is continuously updated in a spreadsheet cell above the landscape. If the model runs too fast and you keep missing when this happens, change the 'model run duration' parameter to 1, and step through it year-by-year. Run the model at least three times, noting when the species first covers 80% of the area. Write your results here. ____ ____ ____ Now increase the fecundity from 5 to 10, and press the ‘Initialise landscape’ button. Do you think this should increase or decrease the growth rate? Run the model again and write you results here ____ ____ ____ Reset the fecundity back to 5, and then decrease the age to maturity from 6 to 3. Should this increase or decrease the growth rate? Run the model again and write your results here ____ ____ ____ Reset the age to maturity back to 6, and this time increase the dispersal distance from 2 to 4. What effect should this have on spatial spread of the species? Should this increase or decrease the growth rate? Run the model again and write you results here ____ ____ ____ What you have started to do is to test the sensitivity of one of the outputs of the model (the growth rate of the species) to changes in the input parameters. Such sensitivity analyses are useful because they let you know what the most important (or ‘driving’) parameters are in the model. This type of analysis is frequently done in models of invasive species, because it is important to know which aspects of the life history its growth rate is most sensitive to, hence which aspects are the best targets for focusing any research on controlling the species. Based on your preliminary findings so far, what lifehistory parameter affects the ability of the species to spread within the landscape the most? _________________. Do you think you could have guessed this without running the simulation? To perform a complete sensitivity analysis requires varying the parameters by different amounts, and also varying them simultaneously with one another to see how various combinations of the parameters might interact with one-another. Although such an analysis can be done manually with this spreadsheet, it is more efficient to ‘automate’ the process by including the sensitivity analysis as part of the program code. Some commercial packages, like 'Stella', include sensitivity analyses as a built in feature. 17 Before launching into the next exercise, have a look to see what fires look like in this model. Type a ‘7’ for fire size box and a ‘10’ in the fire frequency box. Also change the starting density from ‘1’ to ‘50’. This will initiate the landscape with 50 randomly located cells. Run the model to observe how fires create patches in the landscape. Fiddle about with the fire parameters. For an average fire size of 7, how frequent do the fires have to be before species 1 is lost from the landscape? Exercise 2: Fire as a mechanism promoting biological diversity in ecosystems Fire is often seen as a destructive force in natural communities, however there are many species which require regular fires to maintain their populations. For example, some species require the particular conditions during and following a fire to reproduce. Other species require the spatial patchiness caused by fires as habitat in which to live. In this exercise you will investigate the dynamics of two plant species, which are both killed by fire, but where one of them can only persist in the landscape in the patches created by repeated fire. In this exercise you will use your knowledge of the differences in the biologies of the species, combined with computer simulation, to devise a fire management regime capable of maintaining viable populations of both species in the landscape. Press the 'Reset exercise 2' button. The screen should look that that below. Note that each species has different attributes, i.e. different life history strategies. In particular, species 1 produces more seeds, and disperses them more widely than species 2. However, it is shorter lived, and is competitively inferior to species 2. 18 Note also that the landscape starts off filled with both species. For the purposes of this exercise this landscape represents a patch of forest (say 10km x 10km) that you have been assigned to manage. Every time you press 'Reset exercise 2', this same configuration will return, which allows you to perform many computer experiments on the same starting community. You job is to devise an appropriate fire regime that (1) (2) Maintains both species within the landscape for at least 200 years. Maintains both species above the dotted line in the figure at least 90% of the time (this information is given below the chart). You could think of this line as defining a minimum viable population size for both species. Start off with the default settings, i.e. without any fire, and run the model. What species eventually dominates the landscape? Think about why this should be so, given the lifehistories and relative competitiveness of the species. Next make the fire size=5, with a frequency = 2 , and re-run the model. Watch the dynamics on the screen carefully. You will note that the species which became extinct in the first run now dominates, and the previous 'winner' is lost from the landscape. Q 2.1 Given your knowledge of the relative dispersal abilities of the two species, and the patchy nature of the fires, can you suggest a reason why this switch in dominance might have taken place under the different fire regimes? The challenge for you as custodian of this forest is to devise a fire regime capable of maintaining viable populations of both species. In real ecosystems it is often not possible to perform experiments at the spatial or temporal scales needed to answer such questions. This is where models such as this can be used to complement any other available information to come to the best decision. Of course, as it stands this model is very simplistic, but there are many ways in which it could be extended to provide a more 'realistic' model of a real ecological system. We will consider some of these during the lab. One way of approaching this problem is to perform a systematic search over an appropriate parameter space defining the fire regime, to see what combinations of fire size and frequency allow both species to persist in the landscape. This can be timeconsuming, so you are given, in the table below, a suggested combination of size and frequency to try. Run the model for each combination at least twice (to account for random variation), and note which species (if any) falls below the line more than 10% of the time. Two runs of the model are clearly not enough to base a decision on (1000 would be more like it!). In the lab we will combine the class results to produce a table, similar to that below, but which contains the probability of a species falling to unacceptably low abundances during the next 200 years under each fire regime. This is similar to a population viability analysis, although it is perhaps better described as an ‘ecosystem’ viability analysis. 19 Fire size 3 5 7 2 Fire Frequency 8 21 From even the simple set of simulations above, you will note that there is more than one management option that will satisfy the requirements of maintaining viable populations of both species in the landscape. This type of analysis helps to identify what the range of management options might be, and hence can be used as a guide in defining a list of possible management options. 20 Some hints on translating the rules for models 1b and 1c. The rules for 1b and 1c are not quite so straightforward as case 1. Here are some hints… Note that If statements can be nested, e.g. =IF(B2 > 20,IF(B2 < 50,"medium number","big number"),"small number") This is an example of a statement that tests the contents of cell B2. If B2 contains a number greater than 20, but less than 50, then it returns the text "medium number". If it contains a number greater than 50, it returns the text "big number". If B2 contains a number less than 20 then it returns the text "small number". You might also find the ‘OR’ and ‘AND’ statements useful. Both of these return a true or false result, and hence can be used in the first part of the ‘IF’ statement. Have a look at the Excel help for the syntax for these two options. References Green, D.G. 1989. Simulated effects of fire, dispersal and spatial pattern on competition within forest mosaics. Vegetatio 82: 139-153. Molofsky, J. 1994. Population dynamics and pattern formation in theoretical populations. Ecology. 75: 30-39. General cellular automata references Levy, S. 1992. Artificial Life. The Quest for a New Creation. Panthenon Books. New York. Green, D.G. 1990. Cellular automata model in biology. Mathl. Cumput. Modelling 13: 69-74. Wilson, G. 1988. The life and times of cellular automata. New Scientist. ??. 45-47 Wolfram, S. 1984. Cellular automata as models of complexity. Nature. 311: 419-424. Ecological applications of cellular automata Darwen, P.J. & Green, D.G. 1996. Viability of populations in a landscape. Ecological Modelling 85: 165-171 Green, D.G. 1985. Simulating spatial patterns in forest ecosystems. Mathematics and Computers in Simulation. 27, 191-198. Jeltsch, F. & Wissel, C. 1994. Modelling dieback phenomena in natural forests. Ecological Modelling 75: 111-121. Karafyllidis, I. & Thanailakis, A. 1997. A model for predicting forest fire spreading using cellular automata. Ecological Modelling. 99: 87-97. Reichelt, R.E,et al. 1988. A simulation study of Crown of thorns starfish outbreaks on the Great Barrier reef.. Mathematics and Computers in Simulation 30: 145-150. WWW sites of interest (just search for "cellular automata" or "artificail life", you will get heaps) http://lcs.www.media.mit.edu/groups/el/projects/emergence/contents.html An excellent tutorial on complex systems & emergent behaviour http://complex.csu.edu.au/complex/ 'Complexity on line' - Charles Sturt Uni's complexity site, with pages on CA. http://www.cs.jhu.edu/~callahan/lifepage.html Lots of links to artificial life pages http://psoup.math.wisc.edu/Life32.html The download site for the 'Game of Life' program used in the lecture 21