Agent-based Modeling in Ethnobiology: A Brief Introduction from Outside http://www.tiem.utk.edu/~gross/missouri.402.talk.fmt Louis J. Gross Departments of Ecology and Evolutionary Biology and Mathematics The Institute for Environmental Modeling University of Tennessee Knoxville, TN 37996-1610 gross@tiem.utk.edu http://www.tiem.utk.edu/~gross/ General Goal of this Modeling Approach: Provide a means to connect interactions between individuals and environmental and economic influences, taking account of differences between individuals. What is agent-based modeling? This is a methodology to track the actions of multiple "agents" which are defined to be objects with some type of autonomous behavior. Examples are individual animals or plants, single cars or airplanes, letters or packages, football players, etc. In each case the key component is a set of rules which governs the actions of the agents. These agents need not be rational (letters, many car drivers), but do need to have some explicit set of actions which will follow (perhaps according to some probability distribution) from their current state and the state of other agents. In ecology, agent-based models are typically called individual-based models. Note that there is a distinct difference between agent or individual-based models and models of agents. One is possibly a subset of the other - there are many papers published on models that describe individual-level processes and actions, for examples models for individual plant or animal growth that include bioenergetics. However, these do not focus on the interactions between individuals and it is these interactions which can greatly affect phenomena that occur due to aggregation of individuals. Thus, if you took the purely engineering approach of designing the most efficient forager, ignoring everything except energy capture, you get models similar to those in the foraging theory literature. However, these do not account for the many actions which occur between individuals which affect how they forage (hierarchy in social structure for example). In reality aggregations of foragers are far from being collections of individuals which all are "perfect individually" at energy gain. The methodology which underlies agent-based approaches is called "object-oriented programming" in computer science. You are likely all familiar with the names of coding languages which are object-oriented (C++ and Java are two popular ones). These languages provide data structures which naturally allow for efficient agent-based modeling. Notably they provide for "inheritance" whereby one data-structure (e.g. individual) is provided with the same underlying data-structure as all others of a particular type (e.g. species), allowing the coder to set up a class of objects (individuals all of the same species) with similar basic properties, but allowing for differences between them (perhaps due to sub-classes such as gender). This is thus a very modular and hierarchical approach to coding, unlike traditional procedural languages. How does agent-based modeling relate to other standard modeling approaches? The vast majority of theory in ecology has started from very simple differential equations in which a single variable represents population densities; solutions of these are analyzed mathematically, and may be compared to abundance estimates from field or lab observations. Although these models have had a great influence on theory in ecology, their aggregated form is particularly difficult to relate to observational biology. Their application to complex natural systems with spatially and temporally varying environmental factors which force the system leads to models which are not analytically tractable, and must be investigated numerically. The vast majority of research has focused on equilibrium and stability behavior in these models, though the models have been elaborated extensively to account for population structure, discrete generations, spatial interactions, etc. The application of mathematical models in most fields involves determining whether the key features of the problem under consideration require a discrete or continuous formulation. Examples in population biology would be comparing populations with discrete life stages, modeled using matrices or systems of non-linear difference equations, to those with overlapping generations, modeled using systems of differential equations. A second dichotomy concerns whether stochastic factors should be included or ignored, that is if unpredictable abiotic environmental factors must be explicitly modeled or whether the averages of such variations are sufficient to describe and analyze the situation. An additional major issue in ecological modeling is how to deal with spatial aspects - ignore them by assuming homogeneous mixing, or include them through discrete patches (metapopulation approaches), discrete lattices (cellular automata and extensions), or continuously (partial differential equations or integro-difference equations). Once basic modeling issues such as these are decided, this specifies a single modeling approach, such as a matrix approach for structured populations in discrete time, an ordinary differential equation system for discretely-structured populations in continuous time, a partial differential equation for a continuously structured population in continuous time, or an integro-difference equation for discrete-time and continuous space. All of the above approaches involve state variables (the variables which are used to describe the model), which are aggregations. Individual-based models take the reductionist view that these aggregated variables should be able to be observed as a function of the actions and interactions of the individuals which make up the aggregation. The objective is therefore to describe the basic processes which control the actions of individuals, and aggregate these up to determine the resultant macrodescriptors which arise at higher levels of organization. Are there other methods which account for individual-actions? So how does one account for the interactions between individuals? One approach is the agent-based approach discussed here. An alternative is the dynamic state-space approach (see Clark and Mangel, Dynamic State Variable Models in Ecology, Oxford Univ. Press, 2000). In this approach, the state structure is that of a few characteristics of individuals which may be presumed to follow an optimization rule through time. Then a dynamic programming algorithm is applied which determines what the optimal dynamic behavior of individuals would be. These models can account for uncertainty in the environment, can be extended to allow for analysis of frequency-dependence (so the optimal behavior depends upon the fraction of the population behaving in different ways), and have been applied to a variety of areas related to ethnobiology (cultural aspects of fisheries, human reproduction related to foraging strategies). A major limitation of these approaches is that they require some underlying optimization criteria to apply, and the computational complexity increases very rapidly with the state space, limiting the applicability to very small numbers of individual characterizations. Another approach typically mentioned in this context is that of cellular-automata. These models utilize a spatial grid in which each "cell" on the grid is in one of a few states. There are rules which specify how these cells change state through time as a function of their current state and the states of cells around them. These models can produce distinctive spatial patterns, and there are a variety of theoretical results that can be proven for simple cases in the limit of large times. However, the allowable state spaces for the "cells" in these models are typically quite small, and it is therefore difficult to develop reasonable rules based upon observations except for organisms with no or limited movement (e.g. plants). The major objectives of individual-based models are to: 1. Consider individual variations in factors such as sex, size, age, health, social status, etc. 2. Include spatially-explicit information on habitat, roads, topography, local resources, etc. and the effects these have on individual behavior. 3. Provide a mechanism for interactions to occur between individuals. 4. Allow for dynamic coupling of habitat components to organisms through direct feedback of organism behavior on appropriate habitat conditions, such as reducing available forage due to effects of individuals. 5. Provide mechanisms to take into account detailed behavioral and physiological information when available. 6. Estimate phenomena at different organizational levels (e.g. population/community) from the actions of individuals A good general collection of links on individual-based modeling is at: http://www.red3d.com/cwr/ibm.html A journal that has a major emphasis on this approach to modeling is JASSS - Journal of Artificial Societies and Social Simulation. http://jasss.soc.surrey.ac.uk/JASSS.html Perhaps the single most used general tool for doing agent-based modeling is Swarm http://www.swarm.org. Why might this approach be of interest in Ethnobiology? 1. Since an objective of the field is to study plant/animal/human interactions, and since many of these interactions occur due to actions of individuals (humans), it is appropriate to consider a methodology that would allow for such actions to be taken into account. 2. The processes which underlie cultivation and domestication of plant and animal products involve a mixture of individual actions and cultural limitations on these. Agent-based approaches provide a mechanism to incorporate social systems within an individual framework. 3. Economic factors as they affect individual actions can only be dealt with in a highly aggregated manner in traditional bioeconomic approaches. Agent-based approaches allow for agents to be quite broadly defined (e.g. it is perfectly fine to have agents which represent some aspects of economic capital in a system), and interact with agents (be used up by) which represent individuals. 4. Although definitely in it's more formative stages, there are numerous attempts to develop agent-based approaches that account for cultural transitions which could directly relate to processes such as the acquisition and organization of traditional knowledge. Some Disadvantages of Individual-Based approaches: 1. Requires detailed knowledge of behavior and physiology, thus is generally appropriate for large, charismatic species, but of limited use in other cases. 2. May require considerable coding expertise to develop as well as considerable computer time to run. 3. Typically requires many simulations to evaluate any particular situation as it is based upon an underlying stochastic model. 4. As with any model, typically requires assumptions about what aspects of behavior are important and what can be ignored. Constructing individual-based models: There are several ways to construct individual-based models. For models with explicit spatial structure, some type of spatial grid is set up. Each location (or pixel in a computer map) corresponds to a spatial location with a certain spatial extent for each grid cell. Each grid cell then is characterized by a state, with each state corresponding to (a) presence or absence of a given species, (b) number of a given species present in the cell, (c) numbers of each of several species present in the cell, etc. There are then two basic approaches: (i) model how each grid cell changes based upon some set of rules and the states of surrounding grid cells, or (ii) model how each individual organism being considers moves among the grid cells and how the organisms state changes through time. Type (i) is the cellular automata approach, in which each cell is in one of a relatively small number of states and the rules for changes in state depend on the current state and that of nearest neighbors. Type (ii) is a truly individual-based approach, in which individual organisms can move anywhere across the spatial set of grid cells, change their respective states (e.g. size, fat content, number of offspring, etc.) and have their location attached to them as just another state variable. In this approach, each grid cell just combines the individuals located in it at any particular time. Key questions in developing an individual-based model involve setting an appropriate spatial and temporal scale, deciding what individual-level state variables should be included and how to model them, and how to model movement, growth, mortality and reproduction of individuals. These are not independent issues of course, since setting the scale affects all aspects of the model. The appropriate spatial scale would depend upon (a) the activity pattern of an individual over the shortest time period of interest; (b) the availability of spatially-explicit information on habitat preferences, food resources, shelter and other spatial components affecting individual behavior; and (c) the availability of information to accurately model individual behavior. If activities at the shortest time scale of interest all occur within the smallest spatial scale at which you have habitat information, then there is little advantage to modeling behaviors which occur within that time step. If behaviors over the smallest time period of interest range over several spatial locations for which you have habitat information, then including state variables which measure such behaviors are appropriate. Driving all this is the set of questions you wish the model to address, which will no doubt lead to an appropriate temporal scale. Activities which occur on a time scale which significantly affect the aspects of individual behavior directly related to the questions of interest should be included, while those with small effect may be ignored or averaged. There are two basic methods to track time sequences of behavior in these models. In one case there is a fixed underlying time step at which one censuses all individuals, considering changes in behavior or state variables for all individuals. If this is done sequentially, then care must be taken to randomize the ordering of the individuals chosen in different time periods in order to avoid bias. Alternatively, event-based models take each individual, determine a time at which the next behavior or state variable change occurs, and ignores that individual until such a time is reached. Such event-driven approaches may be more computationally efficient, as not every individual needs to be investigated each time period. EcoBeaker: a program to teach individual-based approaches: The program EcoBeaker (see http://www.ecobeaker.com) allows one to combine grid-based and individual-based approaches. It allows one to set up changes in states of a grid cell as a simple transition matrix (possibly dependent on neighboring cells) as for example used in the Situation File to illustrate the Intermediate Disturbance Hypothesis. In this File, each grid cell is assigned to a state based upon the species present (e.g. Grasses, Blackberry Bushes, Oak Trees, Fire, etc.), with a certain probability of transition to a new state the following year. Alternatively, the program allows species to be set up as Individualistic, in which they have certain movement rules, and in which there can be several individuals of different species extant in a given grid cell at any particular time. The Situation File to Illustrate Competitive Exclusion is one example of this, in which the various Rabbit species have differing daily energy requirements, and movement rules. In addition to allowing users to change the parameters associated with any particular species, to add new species, and to code entirely new scenarios, EcoBeaker also allows one to investigate the effects of different sampling methods. While EcoBeaker is structured to be a very easily applied tool, the complexity of model output is also instructive. A user has to decide what are the appropriate output variables to plot, and to come up with their own methods to summarize results, Though reminiscent of real field experiments, the program output is obviously more constrained. It does serve to illustrate however that, though such models are not that difficult to construct, the interpretation of results is non-trivial, particularly when trying to pick apart the effects of different model parameters. This is of course just as true for more realistic individual-based models, designed not for education but for application to ecosystem management. Comparing models to data: Simulations offer the potential to compare in great detail the simulated movement and states of individuals to data on the individuals. The simulations can include surveys carried out in the same way as field surveys would be done in order to provide appropriate comparison samples from the model simulations. These may then be resampled in order to provide model distributions of a wide variety of statistics (home range size, patterns of home range use, correlations between locations and habitat/environmental conditions, nearest neighbor distances, etc.) which may then be compared to observations. While such comparisons are potentially greatly useful, the tremendous amount of data produced by individual-based models can be overwhelming. As with all modeling endeavors, it is important to specify, before model construction begins, not only the main objectives of the project, but also what criteria will be applied to evaluate the model results.