
496
■
Bio-Inspired Computing and Networking
main
while not the last cycle of a simulation run
do
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎩
for each parent
a
∈ Agents
do
⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
if parent
a
invokes the reproduction behavior
then
⎧
⎪
⎨
⎪
⎩
mate
a
← FINDMATE(parent
a
)
if mate
a
=
then child
a
← REPRODUCE(parent
a
, mate
a
)
else child
a
← REPLICATE(parent
a
)
for each parent
p
∈ Platforms
do
⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
if parent
p
invokes the reproduction behavior
then
⎧
⎪
⎨
⎪
⎩
mate
p
← FINDMATE(parent
p
)
if mate
p
=
then child
p
← REPRODUCE(parent
p
, mate
p
)
else child
p
← REPLICATE(parent
p
)
procedure R
EPRODUCTION(parent, mate)
child ← C
ROSSOVER(parent, mate)
child ← M
UTATE(child)
return (child)
procedure R
EPLICATION(parent)
child