GEESE: Grammatical Evolution Algorithm for Evolution of Swarm Behaviors Aadesh Neupane Michael A
Total Page:16
File Type:pdf, Size:1020Kb
GEESE: Grammatical Evolution Algorithm for Evolution of Swarm Behaviors Aadesh Neupane Michael A. Goodrich Eric G. Mercer Brigham Young University Brigham Young University Brigham Young University Provo, Utah Provo, Utah Provo, Utah [email protected] [email protected] [email protected] ABSTRACT a large number of flagella [5]; Ant colonies have evolved collective Animals such as bees, ants, birds, fish, and others are able to per- behaviors for foraging, nest defense, path planning and construc- form complex coordinated tasks like foraging, nest-selection, flock- tion [11]; Bees are able to select best sites among many good sites ing and escaping predators efficiently without centralized control at their disposal [27], and Fish are able to avoid predators by orga- or coordination. Conventionally, mimicking these behaviors with nizing themselves in collective shapes that deter predation [16]. robots requires researchers to study actual behaviors, derive math- Researchers have created successful algorithms that implement ematical models, and implement these models as algorithms. We what we call spatial swarms, meaning bio-inspired collectives that propose a distributed algorithm, Grammatical Evolution algorithm move or travel together more or less as a collective unit [20, 21, for Evolution of Swarm bEhaviors (GEESE), which uses genetic 36]. Similarly, there has been significant research on designing methods to generate collective behaviors for robot swarms. GEESE bio-inspired or bio-mimetic distributed algorithms for hub-based uses grammatical evolution to evolve a primitive set of human- colonies like honeybees, termites, and ants, particularly in optimiza- provided rules into productive individual behaviors. The GEESE tion [6, 7, 14]. Many such algorithms are problem-specific, meaning algorithm is evaluated in two different ways. First, GEESE is com- that there is not a general solution for generating individual behav- pared to state-of-the-art genetic algorithms on the canonical Santa iors that produce desirable collective behaviors. Fe Trail problem. Results show that GEESE outperforms the state- There are various forms of representing or controlling swarms in- of-the-art by (a) providing better solution quality given sufficient cluding artificial neural networks, genetic programming structures, population size while (b) utilizing fewer evolutionary steps. Sec- logic-based symbolic controllers, behavior-based controllers, and ond, GEESE outperforms both a hand-coded and a Grammatical grammars. One approach to identifying individual behaviors that Evolution-generated solution on a collective swarm foraging task. induce desirable collective behavior is to use Genetic Programming (GP), a type of Evolutionary Algorithm. GPs have been successfully CCS CONCEPTS applied to search ill-defined complex search spaces; for some search spaces, the time to find an acceptable solution is prohibitive [17]. • Computing methodologies → Genetic algorithms; Multi- Grammatical Evolution (GE) has been applied to problems for agent systems; • Computer systems organization → Evolution- which GP can take too long. For example, in the Sante Fe Trail ary robotics; problem, the best solution produced by a GE is found more quickly KEYWORDS and produces a superior solution compared to solutions produced by GP [17]. GEs work by restricting the search space by “seeding” Swarms, Grammatical Evolution the solution space using domain-specific knowledge. GEs have ACM Reference Format: two main benefits over GPs. Firstly, GEs exploit prior knowledge, Aadesh Neupane, Michael A. Goodrich, and Eric G. Mercer. 2018. GEESE: represented in the form of a grammar, which restricts the search Grammatical Evolution Algorithm for Evolution of Swarm Behaviors. In space by only searching through valid grammars. Secondly, GEs GECCO ’18: Genetic and Evolutionary Computation Conference, July 15–19, exploit a greater distinction between a genotype and phenotype 2018, Kyoto, Japan. ACM, New York, NY, USA, 8 pages. https://doi.org/10. than more conventional GPs [23]. These benefits enable GEs to 1145/3205455.3205619 outperform conventional GPs in some problems. When multiple agents are distributed in different spatial regions, 1 INTRODUCTION the search for high-quality solutions can be accelerated if all the Simple organisms have evolved local interactions among individu- agents start in a different spatial location and interact with each als that produce useful collective behaviors: Bacteria interact with other, sharing their knowledge of the search space accumulated so each other to move across cell surfaces efficiently by synthesizing far. Distributed evaluation of fitness and searching different parts of the spatial domain suggest that a multi-agent GE may generate Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed effective collective behaviors in swarms. for profit or commercial advantage and that copies bear this notice and the full citation As agents interact with each other, each agent creates a tempo- on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, rary population from the genomes of its neighbors. Genetic opera- to post on servers or to redistribute to lists, requires prior specific permission and/or a tors like mutation and crossover are performed on the temporary fee. Request permissions from [email protected]. population. We know of no distributed online GEs for swarms and GECCO ’18, July 15–19, 2018, Kyoto, Japan colonies. © 2018 Association for Computing Machinery. ACM ISBN 978-1-4503-5618-3/18/07...$15.00 https://doi.org/10.1145/3205455.3205619 GECCO ’18, July 15–19, 2018, Kyoto, Japan A. Neupane et al. GEESE is evaluated on two problems: the Santa Fe Trail problem things that can be produced for a single non-terminal, and a “rule” and a foraging problem. For the standard Santa Fe Trail problem, is one of the possible things produced (the right-hand-side of the GEESE finds superior solutions in fewer generations compared to production). The difference between terminal and non-terminal other variants of GE. For the foraging task, GEESE evolves collec- symbols is that non-terminal symbols are further expanded by a tive behaviors that successfully accomplished foraging tasks and production rule whereas terminal symbols are not. A BNF grammar outperforms both a hand-coded and a GE-generated solution. is used to translate genotype to phenotype. The example BNF grammar that follows will be used in the Santa 2 BACKGROUND Fe Trail problem [18]. Details about Santa Fe Trail problem are There are many papers that “program” agents using genetic algo- explained in Section 4.1. rithms, but Yehonatan et al. [28] were the first to apply GP tech- hcodei ::= hcodei | hprogsi (1) niques to evolve Robocode players. They used genetic programming hprogsi ::= hconditioni | hprog2i | hprog3i | hopi (2) to produce a code in a tree-like structure. GEs also have been ap- hconditioni ::= if_food_ahead(hprogsi,hprogsi) (3) plied to robot and agent control. Burbidge et al. [1] used GE to hprog2i ::= prog2(hprogsi,hprogsi) (4) generate a program that performed autonomous robot control. hprog3i ::= prog3(hprogsi,hprogsi,hprogsi) (5) The above papers used different forms of GE for autonomous hopi ::= left | right | move (6) control for a single agent, but the purpose of this paper is to evolve collective behaviors for multi-agent systems. O’Neill et al. [24] Koza gives an in-depth explanation of the above grammar [18]. used particle swarm optimization and a social swarm algorithm Genome. In GE, the genome defines how the left-derivation ofa to generate social programs. Each particle in the population was BNF grammar will proceed. GEs use genotypes encoded as binary randomly initialized, fitness was calculated for each particle, and its or integer strings. A codon is a group of binary symbols, usually in a velocity and location were updated using a specific update rule. Li group of 4 or 8, chosen in such a way that there are enough bits per Chen et al. [3] combined a GE with a parallel GA to create an parallel codon to be able to express both (a) the total number of productions evolutionary algorithm called GEGA. GEGA uses the genotype-to- and (b) the maximum number of right-hand-sides over each pro- phenotype mapping process of GE on the initial solution and the duction. Consider a binary genome »001101000010001100100011¼ of used the resulting phenotype as part of a population that is refined length 24. Let the codon size be 4 for this example. The codon value using a parallel GA.Ferrante et al. [9] developed a framework that for the five codon blocks is just the equivalent decimal values. could automatically synthesize collective behaviors for swarms using GE without using communication behaviors. Mapping. The mapping from genotype to phenotype is as fol- Cantu-Paz [2] identified three architectures for parallel genetic lows: Let c denote the codon integer, let A denote the left-most algorithms: master-slave, fine-grained, and multiple-population par- non-terminal in the derivation, and let rA denote the number of allel GAs. Vacher et al. [35] described a multi-agent system guided right-hand side rules associated with the production for A. GE by a multi-objective GA to find a balance point on the Pareto front. maps from the production for the current non-terminal, A, to the Stonedahl [31] described a multi-agent learning algorithm with a right-hand side rule using the expression distributed GA to solve a bit-matching problem. Silva et. al. [29] de- veloped “odNEAT”, a distributed and decentralized neuroevolution RHSRule = c%rA (1) algorithm for online learning in groups of autonomous robots that where % denotes the modulo operator. After a non-terminal is evolve both weights and network topology. mapped to one of its right-hand side rules using Equation 1, the 2.1 Grammatical Evolution current codon is moved to the right in the binary string and the process resumes until no non-terminals remain.