Lighting a Christmas tree with Stein Variational Gradient Descent
PTenigma · x · 2026-11-06
When Paul Thompson's daughter complained the Christmas tree lights weren't evenly spread, he turned it into a math puzzle: apply Stein Variational Gradient Descent to push particles toward a uniform density on the cone (the tree), constrained so each light moves at most L cm along an equispaced string.
Key points:
- The intuitive serpentine/boustrophedon path approximates a regular lattice, but minimizing covering radius on a cone isn't solved by regular lattices — the hexagonal lattice optimal on the infinite plane doesn't transfer.
- Instead he uses a Stein flow: a kernel Stein variational update vector per light, animated in the post.
- The same tool previously appeared in his coverage of generative AI models, making this a playful applied demo.
Related event: Mathematician uses SVGD to evenly distribute Christmas tree lights(2 posts)→
More from Fun
- Screenshot reveals 'gpt-6.2-astra xhigh' in Codex CLI, fueling GPT-6.2 rumors — kimmonismus · 2026-11-06
- AI Model Scores 19/20 on 20 Wine-Tasting Trials While the Human Team Got Drunk — simonguozirui · 2026-11-06
- Slow down AI or speed it up: either way we crash the economy, quip goes — round · 2026-11-06
- Link-only post with no context — flowersslop · 2026-11-06
- Quiz: can you identify these four classic attention patterns? — cneuralnetwork · 2026-11-06
- Professor receives AI-drafted PhD cold email with placeholder brackets left in — alfcnz · 2026-11-06