Every synapse (edge) carries a live weight w ∈ [0,1], starting at 0.5 right after synaptogenesis. Each simulated developmental tick, the two neurons it connects each produce a stochastic activity sample; the synapse's weight is updated by a genuine Hebbian rule with homeostatic decay:
a_pre, a_post = simulated activity of the two endpoints this tick
correlation = a_pre * a_post (co-activation, 0..1)
Δw = η * correlation - decay
w = clamp(w + Δw, 0, 1)
if w < eliminationThreshold: synapse is permanently removed
A used pathway (toggled on) drives its member neurons with a shared, correlated rhythmic signal — its synapses see a_pre and a_post rise and fall together, so correlation is usually high and Δw is usually positive: those synapses strengthen and are protected from elimination. A pathway you toggle off, and all the generic background wiring, drives its neurons with independent random noise — a_pre and a_post are uncorrelated, so their product averages low, Δw is usually negative, and the synapse decays toward the elimination threshold and is pruned. Nothing here is scripted by age — every weight trajectory and every elimination is the live output of this per-tick update running on whatever pathways you currently have toggled on.
- Toggle a pathway mid-run to watch its synapses reverse direction — used → unused makes a previously strengthening pathway start decaying, and vice versa.
- Raise η to make correlated activity strengthen synapses faster; raise decay to make disuse cost more per tick; raise the elimination threshold to prune more eagerly.
- Reflects Huttenlocher (1979) and Rakic (1986): synapse density overshoots in early childhood, then activity-dependent competition — not chronological age alone — decides which connections are kept.