Professional Documents
Culture Documents
net/publication/3642917
CITATIONS READS
16 93
1 author:
Björn Olsson
University of Skövde
102 PUBLICATIONS 1,537 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Infofusion: Information Fusion from Databases, Sensors and Simulations View project
All content following this page was uploaded by Björn Olsson on 10 September 2014.
Abstract |This paper presents a model of coevolution be- for optimization purposes.
tween two variable-size, spatially distributed populations,
evolving in an environment with a
ow of resources. The II. Distributed Host-Parasite Coevolution
two populations have a host-parasite relationship where the
host species is dependent on the uptake of resources from A. Overview
the environment for their reproduction. The parasites seek
to \infect" host organisms and parasitize on their resources The environment consists of a two-dimensional grid
to produce parasite ospring. We show how the approach with wrap-around. On this grid we evolve two popula-
can be used for optimization tasks by using instances of the tions of \organisms" - a host population and a parasite
problem task to determine the outcome of each interaction population. Host organisms are movable, whereas para-
between a host and a parasite organism. As an initial test of
the model, we apply it to the problem of designing sorting sites have no ability to move independently. Each host or-
networks for several problem sizes: 6, 7, 8, and 9-input. ganism tries to make a one-step movement in a randomly
chosen direction for each time step of the simulation. The
I. Introduction movement succeeds if the adjacent grid cell in the cho-
We attempt to model the coevolution of host and par- sen direction is empty, otherwise the host just stays in its
asite species, where both species have variable size pop- present grid cell until the next time step.
ulations which evolve in a two-dimensional \world". The In addition to the environment there is a store of \re-
\world" contains resources which are absorbed by host or- sources", in the form of a number of \resource particles".
ganisms and used in their reproduction. Parasite organ- Resources are poured into the environment at a particular
isms attempt to \infect" hosts and make use of the hosts' rate and can be absorbed from the environment by host
resources to produce parasite ospring. Parasites are de- organisms. A host needs to have absorbed a certain num-
pendent on hosts, since they have no means of their own to ber of resource particles before it can reproduce. When
absorb resources directly from the environment. We show reproducing, the host makes a mutated copy of itself and,
that this model can be used for optimization by assigning in so doing, spends a number of resource particles which
to one species the task of evolving optimized solutions and are returned to the store. Parasites have no ability to
to the other the task of evolving test cases. This idea was take up resources independently. Instead, parasites are
explored successfully by Hillis in [2], which also concerned able to \infect" hosts and use up the hosts' resources to
optimization using a model of host-parasite coevolution. produce parasite ospring. Whenever an organism dies,
Our model is dierent in a number of ways: We let popula- all resource particles it contains are returned to the store.
tions evolve in an environment with explicit resources, we Distribution of particles from the store back to the envi-
let interaction between hosts and parasites occur in a less ronment are regulated so that a distribution event always
controlled manner, and we use variable size populations, results in the same amount (normally just a single parti-
allowing parasites to \kill" the hosts they successfully in- cle) being distributed to every cell on the grid.
fect. Our model is also dierent in that the use of explicit Since reproduction takes place whenever an organism
tness functions has been abandoned altogether. has access to the required resources, population sizes will
There are a number of models in the Articial Life com- vary during the simulation. A number of parameters deal-
munity of distributed agents evolving in an environment ing with resources are used to control the nature of the
with resources. Examples include the Echo [3], LEE [6] population dynamics. The total amount of available re-
and Avida [1] models. We are unaware, however, of any sources, together with the amounts required for reproduc-
work on adapting such models to perform formally dened tion, directly in
uence the environment's carrying capac-
optimization tasks. In this paper, we attempt to show em- ity. As another example, the amount of resources required
pirically that this type of Articial Life model can be used for reproduction of a host organism and a parasite organ-
ism, respectively, in
uence the population dynamics.
In: \Proceedings of the 1996 IEEE International Conference on It may be possible to use this model for optimization
Evolutionary Computation", Nagoya, 1996.
1
purposes by assigning to the host population the task of should return a value for PInf , based on how well the
evolving solutions to an optimization problem. In the ex- candidate solution performs on the test cases.
ample application described later in this paper, we have 8. For each parasite, p, which is currently infecting a
assigned to the host population the task of evolving sort- host h, let p reproduce if h contains a resource amount
ing networks. We let each host encode a candidate sorting Rp. Parasite reproduction results in the creation
network and each parasite encode one or more test cases, of Op mutated copies of p, the death of p itself, and
i.e. input sequences. Each time a parasite attempts to the death of h. For each ospring, a random grid
infect a host we determine the outcome by testing the cell within a distance of 10 cells from h and p is cho-
sorting network encoded by the host on the test case en- sen. The ospring is placed in the chosen cell unless
coded by the parasite. The probability that the attempt the cell already contains a parasite. If no free cell
to infect the host succeeds is determined by counting the has been found within a xed number of trials, the
number of misplaced integers in the sequence when it has ospring dies. We have used Rp = 50 and Op = 5.
been passed through the sorting network. 9. Let each host \die" with a probability of PdH . A
host that \dies" is removed from the population and
B. Algorithm all the resources it contains are returned to C . If the
The execution of a simulation consists of the following host is currently infected by a parasite, the parasite
steps: also \dies". We have used PdH = 0:05.
1. Create an initial population of hosts consisting of 10. Let each parasite \die" with a probability of PdP .
Hinit individuals and place these in grid cells cho- A parasite that \dies" is just removed from the pop-
sen at random with the restriction that no cell may ulation (it does not contain any resources). We have
contain more than one host. We have used Hinit = used PdP = 0:03.
1; 000. 11. If C >= worldsize, where worldsize denotes the
2. Create an initial population of parasites consisting of number of cells in the grid, add one unit of resource
Pinit individuals and place these in grid cells chosen at to each grid cell and then set C = C ? worldsize. We
random with the restriction that no cell may contain have used worldsize = 10; 000.
more than one parasite. We have used Pinit = 1; 000. 12. For each host h which is not infected with a parasite,
3. Fill up the central store of resources C by letting let h reproduce if it contains a resource amount Rh.
C = R, where R denotes the total available number Host reproduction results in a single mutated copy of
of resource units. We have used R = 2 106 for a grid h, and in splitting of the resources of h so that it keeps
of 10,000 cells. half of the amount for itself and donates the other half
4. Repeat steps 5 to 12 until at least one of the following to the ospring. A random grid cell adjacent to h's
is true: cell is chosen and the ospring is placed in the chosen
(a) the optimal sorting network for the given task has cell unless it already contains a host. If none of the
been found, cells adjacent to h's cell is unoccupied, the ospring
(b) the maximum number of iterations have been ex- dies. We have used Rh = 50.
ecuted, III. Example Application
(c) host population size = 0, In this section, we rst introduce the example prob-
(d) parasite population size = 0. lem we have used. We then describe the problem-specic
5. Let each host absorb all resources from the grid cell aspects added to the model in order to apply it to the
which it currently occupies. example problem, i.e. the representation used for genetic
6. Let each host make one attempt to move to the ad- encoding of candidate solutions and the interaction be-
jacent grid cell in a randomly chosen direction. The tween hosts and parasites.
move succeeds if the chosen cell is not occupied by
another host, and fails otherwise. A. Sorting Networks
7. For each parasite pi that is occupying the same grid
cell as an uninfected host h, let pi make one at- A sorting network is a sorting algorithm consisting of
tempt at \infecting" h. The probability that the a xed sequence of comparison-swap operations. Such al-
attempt succeeds, PInf (\probability of infection") gorithms are called homogeneous [5] or oblivious [10] since
is determined by executing interaction between host the sequence of comparisons is exactly the same for all in-
and parasite according to the problem-specic inter- puts of a given size. A sorting network for input-sequences
action function. This function should build a candi- of length n can be represented graphically (see gure 1)
date solution to the problem from the host genome as n horizontal lines. Along the horizontal lines, from left
and a set of test cases from the parasite genome. It to right, appears a number of vertical lines, each one con-
necting two horizontal ones. Each vertical line represents
2
a comparator, i.e. a comparison of the two numbers from
the two horizontal lines which it connects. If the upper
appears in gure 2. Since theP set?1 iof, wepossible
on the n-input problem is in=1
comparators
have used genetic
number is larger than the lower one, their positions are codes of arity 15, 21, 28, and 36 for, respectively, the
switched. Any sequence of n numbers which are input at 6, 7, 8, and 9-input problems. The length of the host
the left end of the network should be sorted in increas- chromosome is equal to the number of comparators used
ing order after having passed through to the right end. in the networks which we are trying to evolve, i.e. for the
The number of steps in the sorting procedure can be re- 8-input task, for example, we use host chromosomes with
duced if we allow adjacent non-overlapping comparisons 19 loci. We have left as future work evaluation of possible
to be executed in parallel. A typical optimization prob- advantages of the use of, for example, binary coding to
lem in connection with sorting networks is the design of a exploit lower order schemas or building blocks [3].
minimum-length n-input network, for a given value of n.
By length we mean the number of comparators, whereas
depth refers to the number of steps after parallelization. k b n g c i g m p k d g
Fig. 1. Evolved 8-input sorting network using 19 comparators. Mutation of a host ospring consists of replacing the
character in a single locus on the chromosome with an-
The problem of designing a minimum-length sorting other, randomly chosen character. We have chosen to let
network for a given n becomes a formidable task already each reproduced chromosome be subjected to m point mu-
for relatively small values of n, due to the large search tations, where m = 0 and m = 1 each have a 0.45 proba-
space. Consider, for example, the task of designing a 8- bility and m > 1 a 0.1 probability. For m > 1, we draw a
input networkPof length 19. For each of the 19 compara- random value with uniform distribution in the range 2; ::; l,
tors we have 7i=1 i = 28 ways of connecting two of the where l = chromosome length. Thereafter, m distinct loci
input-lines. This gives a search space of 2819 ' 3 1027 are point mutated. This allows mutation to occasionally
networks. The optimal length of sorting networks is only aect a large number of loci simultaneously - something
known for n 8, whereas for n > 8 new current upper that is very unlikely to occur in the standard approach
bounds are still being found. An example is the recent where the probability of more than a few simultaneous
work of [4], in which a new best network was found for mutations on the same chromosome is negligible.
n = 13. The problem of evolving minimum-length sorting The genetic coding for parasite chromosomes uses the
networks can be approached in dierent ways, as discussed integers 1 through n. In the initial parasite population,
in [2]. We have chosen to use the lenghts of the currently each parasite chromosome contains a single permutation
known upper bounds (as listed in [4]) and try to evolve of the integer sequence 1; ::; n. Parasite mutation consists
valid sorting networks of these lengths. We have chosen to of exchanging the positions of two integers in the encoded
let evolution work on xed length networks, searching for sequence. In the simulations discussed below, we used a
the network of given length with highest sorting accuracy. parasite mutation probability of 0.1 per locus. This means
If the accuracy of the network is perfect, then it is a valid that during reproduction each locus had a 0.1 probability
sorting network of the given length. This is contrary to of having its integer value moved to another (random)
the approach in [2] and [4], which allow variable-length locus and replaced by the integer value taken from the
networks during the optimization process. recieving locus.
In addition to mutations, we use a form of recombina-
B. Representations and Genetic Operators tion where genetic material is passed from one organism to
Host chromosomes are sequences of characters, where another. We hesitate to call the recombination operator
each character represents a given comparator. An example we use \crossover" for two reasons: Firstly, it is a one-
3
way process where genetic material from one organism is simulations, was able to evolve a 16-input sorting network
incorporated into the genome of another - rather than the of length 61, which is just one comparison more than the
mixing of genetic material from two organisms. Secondly, best known network for that problem size. Initial popu-
the recombination does not take place in conjunction with lations, in Hillis' work, were seeded with 32 comparators
reproduction. We implement recombination as follows: At which appear in many of the known 16-input sorting net-
certain intervals (here every 100th time step), each host works. Hillis used a Genetic Algorithm with the popu-
organism has a particular probability (here 0.01) of look- lation distributed over a grid. In the non-coevolutionary
ing in its vicinity for another host. If it nds another host, version, tness of each network was determined by testing
it proceeds to copy a portion of its own chromosome. A its sorting accuracy on a number of test cases, of which
random locus is chosen and either the portion preceding some were xed and some randomly generated. Only the
or following after the chosen locus is copied. The copied best scoring half of the population was then allowed to
section is then introduced into the recipient host, replac- contribute genetic material to the next generation, with
ing its previous chromosome segment in the corresponding crossovers taking place between networks located near
loci sequence. This form of recombination is more similar each other on the grid. In the coevolutionary version,
to the conjugation [11] which takes place between bacte- a population of parasites were introduced - each parasite
ria, than to the crossover of higher organisms. coding for a set of 10 to 20 test cases. Fitness for a sorting
Given the chosen representation, we can design a func- network in a given cell on the grid was then determined
tion for the interaction between host and parasite individ- by testing it on the sequences encoded by the parasite lo-
uals, as required in step 7 of the algorithmic description of cated in the same grid cell. Fitness for the parasite was
the model. We design the function so that, given a para- determined by the number of test cases which the sorting
site attempting to infect a host, we let the sorting network network failed to sort. Selection and reproduction was,
encoded by the host sort all the input-sequences encoded for both populations, carried out in the same way as in
by the parasite. Each output sequence from the network is the non-coevolutionary version.
then examined and the total number of errors, NrWrong, One of the main dierences between our approach and
counted. An error is a pair of integers nN ; nN +1 in an in- that of Hillis is that we have altogether abandoned the fa-
teger sequence n1 ; ::; nnr inputs such that nN > nN +1 . We miliar Genetic Algorithm concept of explicitly determin-
calculate the probability that the infection attempt suc- ing the tness of each individual and then using a selection
ceeds as PInf = NrWrong n?1 , so that 0 PInf 1 if the mechanism to pick out high-tness individuals for repro-
parasite genome encodes a single input sequence. duction. In our approach, a host organism which encoun-
During a simulation it would be impractical to use ex- ters a parasite runs a risk of being \infected" and \killed"
haustive testing on all input sequences as a tness func- by the parasite, unless it sorts the parasite's input se-
tion due to the large number of possible sequences. In quence(s) correctly. Hosts representing better sorting net-
this work we altogether abandon the idea of using tness works will therefore on the average live longer and produce
functions and let the reproductive success of a host be more ospring, although their tness is never evaluated
implicitly determined by how well it survives interaction explicitly. We rely instead on endogenous tness evalua-
with the parasites it comes across. However, in order to tion [8] [7]. This form of selection also results in variations
gather data about the simulation we use a small random in population size during our simulations. In initial time
set of input sequences as a screening test applied to all steps of our simulations this leads to the pattern of oscil-
host ospring and then only exhaustive testing on those lations in population sizes typical of predator-prey coevo-
that pass the screening. We thus get an estimate of the lution [9]. Population sizes usually become stable towards
average sorting accuracy from the results of the screen- the end of a simulation, however, as is exemplied in g-
ing tests and an estimate of the best found solution sofar ure 3, although one may hypothesize that there are local
from the exhaustive tests. Also, the exhaustive testing on oscillations on the grid also when the global population
those that pass the screening guarantees that if there is a sizes appear stable. We have left as future work an eval-
valid sorting network in the population, then we will de- uation of the impact of population size variations on the
tect it. Note, however, that these tests are used for gath- evolutionary process.
ering statistics only. \Fitness" is determined implicitely
by random interaction between hosts and parasites, where D. Results
higher quality hosts have a lower probability of becoming Table 1 shows results from 10 simulation runs each for
infected. the 6, 7, and 8-input problems. The results on the 9-input
problem are from 5 simulation runs only. The length, in
C. Comparison with Other Approaches number of comparators, of the sorting networks we tried to
Hillis [2] focused on the problem of evolving 16-input evolve were those listed in [4] as the best currently known;
sorting networks and, in the host-parasite version of his opt. is the total number of permutations of the input se-
4
quence (optimumn = n!); avg. best is the number and Population size
4000
nr.
work (i.e. a valid sorting network of the given length) was
Parasites
2000
prop. correct
for each increment of n, except for n = 9, where a max-
0.6 Average
0.4
even out to relatively stable population sizes of 2,000 to Fig. 3. Example simulation using = 7. Note that 'best sofar'
4,000 later in the run. After 1,396 time steps and evalu-
n
refers to the best sorting network of those which have passed
ation of ' 3:3 105 candidate solutions, a valid 7-input a screening test and then been tested on all permutations of
sorting network of length 16 is found. As table 1 shows, the input sequence, whereas 'average' is based on the results
of the screening tests only. Thus, the average accuracy may
an optimum (a valid sorting network of the given length) occasionally exceed that of the 'best sofar'.
was found in each of the 10 runs on the 6-input problem.
The 8-input problem was the hardest to solve, with only
1 in 10 runs nding a valid sorting network. of evolutionary/adaptive change in the species. There are
few, if any, examples of evolutionary algorithms with vari-
n 6 7 8 9 able population sizes being used for optimization tasks.
length 12 16 19 25 How population dynamics can be exploited to improve
opt. 720 5,040 40,320 362,880 the capacity for optimization is yet to be investigated.
avg 720 5,026 36,703 358,675
best 100% 99.7% 91.0% 98.8% References
nr o.f. 10 9 1 2 [1] Chris Adami and C. Titus Brown. Evolutionary learning in the
2d articial life system "avida". In Articial Life 4, 1994.
nr runs 10 10 10 5 [2] D. Hillis. Co-evolving parasites improve simulated evolution as
time 441 2,706 6,278 29,577 an optimization procedure. In Articial Life II, 1992.
nr sol. 1.0 7.0 13.7 81.6 [3] John H. Holland. Adaptation in Natural and Articial Sys-
tems: An Introductory Analysis with Applications to Biology,
(105) Control, and Articial Intelligence. MIT Press, 2nd edition,
1992.
Table 1 [4] Hugues Juille. Incremental co-evolution of organisms: A new
Results for n =6; ::; 9. approach for optimization and discovery of strategies. In Ad-
vances in Articial Life: Third European Conference on Arti-
cial Life, 1995.
[5] Donald E. Knuth. The Art of Computer Programming: Volume
3 - Sorting and Searching. Addison Wesley, 1973.
[6] F. Menczer and R. K. Belew. Latent energy environments.
IV. Conclusions and Future Work In Adaptive Individuals in Evolving Populations: Models and
We have introduced a model of coevolving hosts and Algorithms, 1995.
[7] Filippo Menczer and Richard K. Belew. Latent energy envi-
parasites, evolving under spatial distribution in an envi- ronments. To appear in: Belew and Mitchell (eds) Adapting
ronment with a
ow of resources. We have shown em- Individuals in Evolving Populations, Addison Wesley, 1994.
[8] Melanie Mitchell and Stephanie Forrest. Genetic algorithms in
pirically that such models, although usually designed for articial life. Articial Life, 1(3), 1993.
ecological modeling purposes, can be applied to a formally [9] James D. Murray. Mathematical Biology. Springer-Verlag, 2nd
dened optimization task. Much remains to be done on edition, 1993.
[10] Ian Parberry. A computer-assisted optimal depth lower bound
how the characteristics of this model can be applied to for nine-input sorting networks. Mathematical Systems Theory,
other problems. A goal of future analysis is to understand 24:101{116, 1991.
the eects that the population dynamics caused by coevo- [11] James D. Watson, Nancy H. Hopkins, Jerey W. Roberts,
Joan Argetsinger Steitz, and Alan M. Weiner. Molecular Bi-
lutionary relationships have on the evolutionary dynamics. ology of the Gene, volume 1. Benjamin Cummings, 4 edition,
Population dynamics has been studied extensively using 1987.
dierential-equation based models such as Lotka-Volterra
and variants thereof [9]. Much less is understood of how
patterns of change in population sizes aect the pattern