Claude-written evolutionary algorithm breaks: RNG double overflow creates short cycle, workers idle forever

ssh4net · x · 2026-10-19

A RT of a debugging post: Claude-generated swarm/evolutionary code had a random number generator using double arithmetic that overflowed past 53 bits; with seed 9 it fell into a short cycle, so every bred child was a repeat, the main thread spun forever while eight workers sat idle, and the eight-survivor run never got past its first generation. Author laments "Claudeee... What are you doing!!" — a classic AI-generated-code bug case with juicy technical detail.

Original post →

More from Fun

Fun channel →