Table of Contents
Preface vii
1 Complexity Science 1
The Changing Criteria of Science 3
The Axes of Scientific Models 4
Different Models for Different Purposes 5
Complexity Engineering 6
Complexity Thinking 7
2 Graphs 9
What Is a Graph? 9
NetworkX 11
Random Graphs 13
Generating Graphs 14
Connected Graphs 15
Generating ER Graphs 17
Probability of Connectivity 18
Analysis of Graph Algorithms 20
Exercises 21
3 Small World Graphs 23
Stanley Milgram 23
Watts and Strogatz 24
Ring Lattice 25
WS Graphs 27
Clustering 28
Shortest Path Lengths 29
The WS Experiment 30
What Kind of Explanation Is That? 32
Breadth-First Search 33
Dijkstra's Algorithm 34
Exercises 36
4 Scale-Free Networks 39
Social Network Data 39
WS Model 42
Degree 42
Heavy-Tailed Distributions 44
Barabási-Albert Model 45
Generating BA Graphs 48
Cumulative Distributions 49
Explanatory Models 51
Exercises 53
5 Cellular Automatons 55
A Simple CA 55
Wolfram's Experiment 56
Classifying CAs 57
Randomness 58
Determinism 60
Spaceships 61
Universality 62
Falsifiability 64
What Is This a Model Of? 64
Implementing CAs 66
Cross-Correlation 67
CA Tables 69
Exercises 70
6 Game of Life 73
Conway's GoL 73
Life Patterns 74
Conway's Conjecture 76
Realism 77
Instrumentalism 78
Implementing Life 79
Exercises 81
7 Physical Modeling 85
Diffusion 85
Reaction-Diffusion 87
Percolation 90
Phase Change 92
Fractals 93
Fractals and Percolation Models 95
Exercises 97
8 Self-Organized Criticality 99
Critical Systems 99
Sand Piles 100
Implementing the Sand Pile 101
Heavy-Tailed Distributions 103
Fractals 105
Pink Noise 109
The Sound of Sand 110
Reductionism and Holism 112
SOC, Causation, and Prediction 114
Exercises 115
9 Agent-Based Models 117
Schelling's Model 117
Implementation of Schelling's Model 118
Segregation 120
Sugarscape 122
Wealth Inequality 124
Implementing Sugarscape 125
Migration and Wave Behavior 127
Emergence 128
Exercises 130
10 Herds, Flocks, and Traffic Jams 133
Traffic Jams 133
Random Perturbation 136
Boids 137
The Boid Algorithm 138
Arbitration 140
Emergence and Free Will 141
Exercises 142
11 Evolution 145
Simulating Evolution 146
Fitness Landscape 147
Agents 148
Simulation 148
No Differentiation 149
Evidence of Evolution 150
Differential Survival 153
Mutation 154
Speciation 157
Summary 159
Exercises 160
12 Evolution of Cooperation 161
Prisoner's Dilemma 161
The Problem of Nice 163
Prisoner's Dilemma Tournaments 164
Simulating Evolution of Cooperation 165
The Tournament 167
The Simulation 168
Results 169
Conclusions 173
Exercises 174
A Reading List 177
Index 179