vi Contents
3.2.1 simpleCBug . . . . . . . . . . . . . . . . . . . . . . . . 50
3.2.2 simpleObjCBug and simpleObjCBug2 . . . . . . . . . 51
3.2.3 simpleSwarmBug . . . . . . . . . . . . . . . . . . . . . 54
3.2.4 simpleSwarmBug2 . . . . . . . . . . . . . . . . . . . . 57
3.2.5 simpleSwarmBug3 . . . . . . . . . . . . . . . . . . . . 59
3.2.6 simpleObser verBug . . . . . . . . . . . . . . . . . . . . 60
3.2.7 simpleObser verBug2 . . . . . . . . . . . . . . . . . . . 64
3.2.8 simpleExperBug . . . . . . . . . . . . . . . . . . . . . 68
4 Evolutionary Simulation 73
4.1 Simulation of sexual selection . . . . . . . . . . . . . . . . . . 73
4.1.1 Sexual selection in relation to markers, handicaps, and
parasites . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.1.2 The Kirkpatrick model . . . . . . . . . . . . . . . . . . 77
4.1.3 Simulation using GAs . . . . . . . . . . . . . . . . . . 79
4.2 Swarm-based simulation of sexual selection . . . . . . . . . . 82
4.3 Simulation of the prisoner’s dilemma . . . . . . . . . . . . . 84
4.3.1 The prisoner’s dilemma . . . . . . . . . . . . . . . . . 84
4.3.2 Iterated prisoner’s dilemma . . . . . . . . . . . . . . . 87
4.3.3 IPD using GAs . . . . . . . . . . . . . . . . . . . . . . 94
4.3.4 IPD simulation by Swarm . . . . . . . . . . . . . . . . 97
4.3.5 IPD as spatial games . . . . . . . . . . . . . . . . . . . 102
4.4 Evolving artificial creatures and artificial life . . . . . . . . . 103
4.4.1 What is artificial life? . . . . . . . . . . . . . . . . . . 103
4.4.2 Artificial life of Kar l Sims . . . . . . . . . . . . . . . . 104
4.4.3 Evolutionary morphology fo r real modular robots . . . 105
5 Ant Colony–Based Simulation 111
5.1 Collective b e haviors of ants . . . . . . . . . . . . . . . . . . . 111
5.2 Swarm simulation of the pheromone trails of ants . . . . . . 114
5.3 Ant colony optimization (ACO) . . . . . . . . . . . . . . . . 116
5.4 Ant-clustering algorithms . . . . . . . . . . . . . . . . . . . . 118
5.5 Swarm-based simulation of ant-clustering . . . . . . . . . . . 120
5.6 Ant colony–based approach to the network routing problem . 121
5.7 Ant-based job separation . . . . . . . . . . . . . . . . . . . . 124
5.8 Emergent cooperation of army ants . . . . . . . . . . . . . . 126
5.8.1 Altruism of army ants . . . . . . . . . . . . . . . . . . 126
5.8.2 Defining the problem . . . . . . . . . . . . . . . . . . . 127
5.8.3 Judgment criteria for entering the altruism state . . . 127
5.8.4 Judgment criteria with refere nce to chain formation . 132
5.8.5 Changes in strategy based on number of agents . . . . 135
5.8.6 Comparative experiment . . . . . . . . . . . . . . . . . 135
5.8.7 Simulation with fixed role ass igned . . . . . . . . . . . 137