Series
NEAT in Go: neuroevolution from scratch
Building neatgo a piece at a time: the network, the genome, historical markings, mutation, crossover, speciation, selection and reproduction, and the run that ties them together.
- 1 NEAT in Go: neuroevolution, built a piece at a time An implementation of NeuroEvolution of Augmenting Topologies, a piece at a time 4 min
- 2 NEAT in Go: seeded randomness and generic helpers Eight small functions, two of which decide whether a run can ever be repeated 6 min
- 3 NEAT in Go: compiling a network into a flat loop Turning a bag of nodes and connections into a flat loop over slices 7 min
- 4 NEAT in Go: the genome, starting minimal The thing evolution edits, why it starts as small as it possibly can, and why every genome in the first generation is the same one 6 min
- 5 NEAT in Go: innovation IDs and historical markings The idea the whole algorithm rests on: the same innovation gets the same ID, whoever finds it 6 min
- 6 NEAT in Go: mutating weights and other parameters The four mutations that only change numbers, and the one that would have frozen every weight's sign for the whole run 6 min
- 7 NEAT in Go: add-node and add-connection mutations Adding and removing nodes and connections, and why a new node has to start out doing almost nothing 7 min
- 8 NEAT in Go: crossover aligned by innovation ID Two parents, one child, and the reason the child takes exactly the fitter parent's shape 5 min
- 9 NEAT in Go: speciation with compatibility distance Measuring how different two genomes are, and why the threshold cannot be a constant 7 min
- 10 NEAT in Go: fitness sharing and culling Fitness sharing, culling, and four places where an obvious-looking division is wrong 8 min
- 11 NEAT in Go: deterministic parallel reproduction with goroutines Building the next generation in parallel without making the run depend on which goroutine won 6 min
- 12 NEAT in Go: the evolution loop and reproducible runs Evaluation, the loop, and making a stochastic algorithm reproducible enough to debug 7 min