Devlog #92 – Wave 71: PageRank, Axelrod Tournament, Lichtenberg Figure, PID Controller, Archimedes & Microcracks

Wave 71 connects the mathematics of the internet, game theory, electrical fracture, control engineering, classical physics, and materials science — six simulations where precise mathematics illuminates phenomena from web crawling to catastrophic structural failure.

Wave 71 — 6 simulations added
627
Total simulations
6
New this wave
71
Wave number
92
Devlog #

New Simulations

🔗

PageRank

Power iteration with dangling-node fix: p = (1-d)/N + d·(dangling/N + A^T·p/out). Random surfer model. 4 preset graphs. Node radius proportional to rank. Log-L1 convergence inset.

🤝

Axelrod IPD Tournament

10 canonical strategies in round-robin IPD: AllC, AllD, TFT, TF2T, Generous TFT, Grim, Pavlov, Random, Joss, Friedman. Pairwise matrix + sorted bar chart. Noise ε shows Generous TFT beats TFT.

Lichtenberg Figure (DBM)

Dielectric Breakdown Model: SOR Laplace solver (ω=1.8), perimeter candidates ∝ φ^η. η=0 gives DLA, η=3 gives spicules. Box-counting fractal dimension. Additive glow rendering.

🎛️

PID Controller

Three plant ODEs: thermal, cart spring-damper, tank. PID with anti-windup. 20s oscilloscope. Rise time, overshoot, settling, SS error metrics. Ziegler-Nichols autotuning from ultimate gain.

⚖️

Archimedes' Principle

F_b = ρgV_sub exactly: clipped box, spherical-cap formula, Simpson's-rule hull. 5 fluids + 9 materials + 4 gravities. Spring scale. Ship stability: restoring moment GM·sinθ, capsize when metacenter below CoG.

🩹

Fatigue Crack Growth (Paris Law)

da/dN = C(ΔK)^m, ΔK = YΔσ√(πa). Four materials: Steel A36, Al 7075, Ti-6Al-4V, Cast Iron. a-vs-N log-plot with Paris regime. Catastrophic fracture animation at K_IC.

PageRank: The Mathematics Behind Web Search

PageRank models a random web surfer: with probability d (damping factor, typically 0.85), they follow a random hyperlink from the current page; with probability 1−d, they teleport to any page uniformly at random. The rank of each page is its stationary probability under this Markov chain.

The Power Iteration Formula

The update equation per iteration is: p = (1−d)/N + d · (dangling/N + A^T · p / out_degree). The dangling term (Σp_i for pages with no outgoing links, redistributed uniformly) is crucial — without it, rank leaks out of sink nodes and the vector no longer sums to 1. The simulation shows log-L1 convergence ||p_new − p_old||₁ in an inset graph, typically reaching machine precision within 50–100 iterations.

Graph Presets

Axelrod Tournament: Cooperation Under Competition

Robert Axelrod's 1984 computer tournament asked: what strategy wins in a repeated prisoner's dilemma? The surprising answer: Tit-for-Tat — nice, retaliatory, forgiving, and clear. But with realistic noise (accidental defections), the picture becomes richer.

The Ten Strategies

The tournament includes 10 canonical strategies: AllCooperate (always C), AllDefect (always D), Tit-for-Tat (copy last move), Tit-for-Two-Tats (defect only after two consecutive defections), Generous TFT (occasionally forgive a defection with probability p), Grim Trigger (cooperate until betrayed, then defect forever), Pavlov (win-stay, lose-shift), Random (50/50), Joss (TFT with 10% covert defection), and Friedman (TFT variant). Round-robin play with self-play gives a full pairwise score matrix.

Noise and the Advantage of Generosity

With noise parameter ε > 0 (each intended move flips with probability ε), TFT enters "echo wars" — a single accidental defection causes mutual retaliation that never resolves. Generous TFT adds forgiveness: with probability g ≈ 1 − 3P/(T+R+P) it cooperates even after a defection. Under noise, Generous TFT accumulates significantly more payoff than strict TFT — a quantitative demonstration that forgiveness is strategically optimal.

Lichtenberg Figure: Dielectric Breakdown Model

Lichtenberg figures are the fractal discharge patterns created when high-voltage electricity travels through an insulating material. The Dielectric Breakdown Model (Niemeyer, Pietronero, Wiesmann 1984) captures their generation with a simple probabilistic growth rule on a Laplace-solved potential field.

SOR Laplace Solver and Growth Rule

The electric potential φ satisfies Laplace's equation ∇²φ = 0 with fixed boundary conditions (electrode at φ=1, ground at φ=0). The Successive Over-Relaxation solver with ω=1.8 converges roughly 10× faster than Gauss-Seidel. At each step, all empty cells adjacent to the growing cluster are candidate growth sites. Each candidate fires with probability proportional to φ^η — the local potential raised to power η.

The η Parameter: DLA to Lichtenberg

η controls the morphology continuously. At η=0, all perimeter sites are equally likely — this recovers Diffusion-Limited Aggregation, producing a bushy fractal with dimension ≈ 1.71. As η increases, sites with higher potential (closer to the electrode) are exponentially favoured, producing the narrow spicular branching characteristic of real Lichtenberg figures at η ≈ 3. Box-counting fractal dimension is measured live on the cluster.

PID Controller: Feedback Control Engineering

The PID (Proportional-Integral-Derivative) controller is the workhorse of industrial control — an estimated 95% of all feedback controllers in use today are PID or PI variants. Despite its simplicity, tuning it well requires understanding the dynamics of the controlled plant.

Three Plant Models

Anti-Windup and Ziegler-Nichols

When the output saturates, the integral term can accumulate unbounded (windup), causing large overshoots when saturation ends. The simulation implements conditional integration: the integral only accumulates when the output is unsaturated. Ziegler-Nichols autotuning finds the ultimate gain K_u by increasing K_p until sustained oscillation, then sets K_p = 0.6K_u, K_i = 1.2K_u/T_u, K_d = 0.075K_u·T_u — a robust starting point for manual refinement.

Archimedes' Principle: Exact Buoyancy Calculation

Archimedes' principle states F_b = ρ_fluid · g · V_submerged. The interesting challenge is computing V_submerged exactly for non-trivial shapes — and the simulation does this analytically rather than via voxel approximation.

Exact Submerged Volume Formulas

Ship Metacentric Stability

A floating body is stable if its metacentre M sits above its centre of gravity G. When the ship heels by angle θ, the restoring moment is M_restore = ρgV·GM·sinθ. If GM < 0 (metacentre below CoG), the restoring moment becomes destabilising and the ship capsizes. The simulation shows the metacentre height calculation from the waterplane second moment of area I_wl / V_sub and animates capsize when the stability criterion is violated.

Microcracks: Paris Law Fatigue Crack Growth

Most structural failures don't happen because the applied load exceeded the static strength — they happen because a tiny crack grew, cycle by cycle, until it reached critical size. Paris and Erdogan's 1963 law describes this process quantitatively.

The Paris Law and Stress Intensity Factor

The crack growth rate per load cycle is da/dN = C(ΔK)^m where a is crack length, N is cycle count, and ΔK is the stress intensity factor range ΔK = Y · Δσ · √(πa). Y is a geometry factor (≈1 for central crack in infinite plate), Δσ is the stress range. C and m are material constants that vary over orders of magnitude between materials.

Four Materials and Catastrophic Fracture

The simulation shows the a-vs-N logarithmic plot for four engineering materials: Steel A36 (tough, slow crack growth), Al 7075 (used in aircraft, faster growth), Ti-6Al-4V (aerospace alloy, excellent fracture toughness), and Cast Iron (brittle, rapid propagation). When K_max = Y · σ_max · √(πa) reaches the fracture toughness K_IC, the simulation triggers a catastrophic fracture animation with screen flash and crack branching — the end of fatigue life.

Up Next

Wave 72 brings a full 4D Kalman filter with covariance ellipse visualisation, manual backpropagation through an MLP with gradient flow animation, a 3D pendulum using Lagrange multiplier constraints, a coupled ODE eutrophication model with hysteresis loop, FDTD acoustic wave simulation with four lens types, and Keplerian planetary rings with Cassini-division resonance gap formation.

← Devlog #91 Devlog #93 →