General Schema Theory for Genetic Programming with Subtree-Swapping Crossover: Part II Riccardo Poli rpoli@essex.ac.uk Department Computer Science, University of Essex, Colchester, CO4 3SQ, UK Nicholas Freitag McPhee mcphee@mrs.umn.edu Division of Science and Mathematics, University of Minnesota, Morris, Morris, MN, USA Abstract This paper is the second part of a two-part paper which introduces a general schema theory for genetic programming (GP) with subtree-swapping crossover (Part I (Poli and McPhee, 2003)). Like other recent GP schema theory results, the theory gives an exact formulation (rather than a lower bound) for the expected number of instances of a schema at the next generation. The theory is based on a Cartesian node reference system, introduced in Part I, and on the notion of a variable-arity hyperschema, intro- duced here, which generalises previous definitions of a schema. The theory includes two main theorems describing the propagation of GP schemata: a microscopic schema theorem and a macroscopic one. The microscopic version is applicable to crossover operators which replace a subtree in one parent with a subtree from the other par- ent to produce the offspring. Therefore, this theorem is applicable to Koza’s GP crossover with and without uniform selection of the crossover points, as well as one- point crossover, size-fair crossover, strongly-typed GP crossover, context-preserving crossover and many others. The macroscopic version is applicable to crossover op- erators in which the probability of selecting any two crossover points in the parents depends only on the parents’ size and shape. In the paper we provide examples, we show how the theory can be specialised to specific crossover operators and we illus- trate how it can be used to derive other general results. These include an exact defi- nition of effective fitness and a size-evolution equation for GP with subtree-swapping crossover. Keywords Genetic Programming, Schema Theory, Standard Crossover 1 Introduction Genetic algorithms (GAs), genetic programming (GP) and many other evolutionary algorithms explore a search space by storing and using at each time step (a generation) a set of points from that search space (the current population) which are evaluated and then used to produce new points (the next generation). Typically this process is iterated for a number of generations. If we could visualise the search space, we would often find that initially the pop- ulation looks a bit like a cloud of randomly scattered points, but that, generation after generation, this cloud changes shape and moves in the search space following a tra- jectory of some sort. In different runs the population cloud would probably follow c 2003 by the Massachusetts Institute of Technology Evolutionary Computation ?(?): ???-???