Introduction
Why Complex Systems?
Complex systems science studies how simple rules give rise to rich, emergent behavior — how a handful of interacting agents produce patterns that no single agent intended. It is the science of chaos, networks, self-organization, and emergence.
This course implements the canonical models of complex systems in pure Python. No scipy, no numpy, no networkx — just the mathematics expressed as functions. Each lesson introduces one model, explains the underlying science, and asks you to write the simulation as code.
You will implement:
- Logistic map — The canonical chaotic system; period-doubling and the Lyapunov exponent
- Lorenz attractor — The butterfly effect; RK4 integration of a three-dimensional chaotic flow
- Fixed points — Stability analysis via the Jacobian; stable, unstable, and saddle points
- Network degree — Degree distributions, clustering coefficients, and average path length
- Small-world networks — Watts-Strogatz ring lattice rewiring and BFS path length
- Scale-free networks — Power-law degree distributions and MLE exponent fitting
- Ising model — 1D Metropolis Monte Carlo; spontaneous magnetization and phase transitions
- Cellular automata — Wolfram elementary rules; Rule 110 and computational universality
- Random walk — Mean displacement, variance, and the diffusion limit
- Shannon entropy — Information content, KL divergence, and mutual information
- Fractals — Hausdorff dimension via box-counting; Cantor, Koch, and Sierpinski constructions
- Percolation — 1D site percolation; cluster statistics and the critical threshold
- Self-organized criticality — 1D BTW sandpile; avalanche size distributions and power laws
- Bifurcation theory — Saddle-node, pitchfork, and transcritical bifurcations
- Agent-based models — Schelling segregation; local rules and global segregation patterns