To be able to handle a large variety of questions and to discover correlations between different concepts, multiple components have been integrated within EcoSim, ranging from the lower level representing individual organisms or food resources in a world, to higher levels such as a food chain mechanism, species and speciation events. To observe phenomena at the evolutionary scale that affect the individual behaviors, several conditions need to be fulfilled: 1) every individual should possess genomic information that will be the subject of the evolutionary process; 2) this genetic material should affect the individual behavior and consequently its fitness; 3) this genetic material has to be transmitted and modified from generation to generation; 4) a sufficiently high number of individuals should coexist at any time step and their behavioral model should be multifaceted in order that complex interactions and organizations could emerge; 5) a model for species representation and an associated speciation mechanism, leaning on the genomic and behavioral model, has to be defined; 6) for speciation events to occur and new co-adapted behavioral models to emerge and in turn affect the whole system, a large number of time steps need to be performed, each of them integrating a large number of individual behavioral model evaluations and applications. These complex conditions pose a computational challenge for both memory management and computational power and require the use of a model which allies the compactness and easiness of computation with a high potential of complex representation. A modified version of the Fuzzy Cognitive Map (FCM) model has been applied and adapted for ecosystem modeling our problem. This model is used at the same time as the behavioral model of the agents (individuals) and as the vector of transmission of evolutionary information. It allows a combination of compactness with a very low computational requirement while having the capacity to represent complex high level notions. Therefore, each agent can possess its unique map, which is an inherited modified combination of those of its two parents, and the system can still manage several hundreds of thousands of agents simultaneously in the world with reasonable computational requirements. In our predator-prey ecosystem simulation EcoSim, each agent possesses its own genome. Agents can mate with genetically similar individuals, and produce offspring that inherit a modified combination of the genomes of their parents. We have also implemented a speciation mechanism based on the idea of genotypic pool. Species can emerge from the evolution of individuals, or get extinct if all their members die. A typical run lasts several tens of thousands of time steps. Each time step involves the time needed for each agent to perceive its environment, use its behavioral model to make a decision, perform its action as well as the time to update the species membership, including speciation events and all the world parameters (e.g. the quantity of available food). In a typical run, more than one billion of agents can be born and several thousands of species can be generated, which allows new behaviors to emerge and agents to adapt to a constantly changing environment. In addition, a food chain consisting of three levels, primary producers, predators and preys, has been implemented allowing complex interactions between agents and co-evolution to occur. All events, the mental state and action of every agent, are saved for every time step of every run. This allows a deep statistical analysis of the whole system using several dedicated tools that we have conceived to extract, measure and correlate any possible facts that could be useful to understand the underlying and emerging properties of such a complex system. Agents Each agent possesses its own FCM that models its behaviour. This FCM contains sensitive concepts such as: predator_close (prey only), prey_close (predator only), food_close, mate_close, energy_low,; internal concepts such as: hunting (predator only), fear, hunger, sexual_need, curiosity, satisfaction,; and motor concepts such as: escape (prey only), search_for_prey (predator only), search_for_food, socialize, eat, breed. It includes also links and weights representing the mutual influences of these concepts. It is important to notice that the activation level of each motor concept depends on a complex and non-linear combination of excitatory and inhibitory influences from both sensitive and internal concepts. Therefore, this behavior model enables the representation of very complex phenomena. It is also worth noting that the activation levels of an agent‟s concepts are never reset during its life. As the computation of the activation level of a concept involves its previous value, the evaluation of the current state of an agent incorporates all its past states. It means that an agent has a memory of its own past that will influence its future states. Eventually, it appears that an agent‟s behavior dynamically depends on a complex combination of the information it currently receives from its environment, its current internal state, and all the past states it went through during its life. The FCM of an agent (or more precisely the set of edges of its FCM, as well as their weights) represents also its genome. It is transmitted to the agent‟s offspring after combination with one of the other parent, and after possible mutations. Links between concepts can appear or disappear during this process, so that the structure and complexity of the maps can change during the evolutionary process. Each agent also possesses several physical characteristics such as: its maximum ages, its minimum age for mating, its maximum speeds, its vision distance, its levels of energy. Energy is provided to individuals by the resources (grass or meat) they find in their environment. An agent consumes some energy each time it performs an action, proportionally to the complexity (number of edges) of its FCM. If it uses all its energy, an individual dies. In EcoSim, each individual possesses its proper map which contains around 30 concepts and hundreds of edges. The image shows the initial map of a prey. Blue links represente positive influence and red links negative influence. The width of the link represents the strength of the influence. Species EcoSim implements a speciation mechanism directly related to the genotypic cluster definition. Our mechanism accounts for the gradualism and the fuzziness of the speciation process. In this simulation, a species is a set of individuals associated with the average of the genetic characteristics of its members. The average map is computed based on the FCM matrices of all individuals that are members of a species. It is considered that an individual belongs to a species if the difference between its matrix and the average matrix of the species is below a speciation threshold; the threshold is the same for all species. Our speciation method begins by finding the individual in a species S with the greatest distance from the species. If this distance is greater than a predefined threshold for speciation, a 2-means clustering is performed to split the initial species into two species. Otherwise, species S remains unchanged. World EcoSim takes place in a virtual toric world composed of 1000 cells in both dimensions. Each cell can contain an unlimited number of agents. The initial numbers of prey and predators in the world are parameters of the simulation. Each cell can also contain resources, providing agents with energy: some grass, eatable only by prey, and some meat (dead prey actually) edible only by predators. In order to create a competition for resources, the amount of resources available in a cell has been limited (by a parameter of the simulation). We have modeled some growth and diffusion mechanisms, in order to create a realistic evolution of the dispersion and of the amount of grass. Predators have two modes of nutrition: hunting and scavenging. When a predator kills a prey, new meat units are added in the corresponding cell, that can be eaten by the same or other predators. At each time step, the values of the states of all the parameters in the model are updated. The successive phases of the update process are as follows for each agent: Perception of the environment, computation of all concepts, application of their action and update the energy level. Then there is an update of the lists of agents, species and cells of the world. An agent has a quite short lifespan (in terms of the number of time steps), and performs only a few dozens of actions during its life. This enables us to obtain a high level of population renewal, which is an important criterion for studying an evolutionary process. Evolution In EcoSim, evolution stems from several mechanisms: mating, mutation and speciation. Since species membership of the agents is evaluated at each time step, births and deaths of individuals influence the general species composition. Thus, a species can emerge or disappear at any time step. This enables us to model the evolution of populations of individuals sharing important genetic properties. Due to our species model, species evolution is derived directly from individual evolution. This one can occur when a breeding event happens. If the mating is successful, the two parents give birth to a unique offspring. This one inherits a combination of the genomic information of its parents, with possible mutations. Moreover, some new edges can be created (based on a probability of apparition which is a parameter of the simulation); and some old edges can be removed. The apparition of new edges is a very important mechanism, in the sense that new influences between concepts can emerge during the evolutionary process. This allows the apparition of more complex and potentially more adaptive behaviors. If they show a selective advantage such behaviors will be preserved (and thus transmitted through generations) by the process of natural selection, inherent to the interaction of the individuals with their environments. As a counterpart, the possibility for edges to disappear is also fundamental. When the complexity (i.e. the number of edges) of the FCM grows, this increases the energy needs of the agent which then needs a more efficient behavioral model for being able to obtain this energy. Thus, the influence links between concepts are somehow "tested" by the evolutionary process, and removed if they appear to be not beneficial enough. This allows agents (at the phylogenetic scale) to react to changes in the environment, and to balance the interest of a complex behavioral model with its energy cost. A unique breeding event generating a mutated offspring cannot produce a very different behavior model. It is the accumulation of neutral mutations during several generations that allows the apparition of new individual behaviors, and then of new species. Even if it is a very large interacting system the overall complexity of our algorithm is linear with the total number of individuals. A recent execution of the simulation produced approximately 40,000 generations (time steps) in 36 days. In the final generation, there are 190,000 preys, 22500 predators, 49 prey species and 19 predator species, which are values quite stable during the whole execution of the simulation. |



