Skip to content
anythingai.space
AI Foundationsbeginner11 min · 10 steps

Genetic Algorithms: Selection, Crossover, Mutation

Evolve good solutions instead of deriving them: keep a population, favour the fit, recombine and mutate, repeat.

A CANDIDATE = A STRING OF CHOICES1011001110010110score(candidate) = 812 ✓ easy to compute∂score / ∂candidate = ? ✗ not defined
dataheavy work
metrics are illustrative
1 / 10
ProblemStep 1 of 10

Some problems give you a score but no slope

Choosing which of 40 items fit in a truck, laying out a timetable, or shaping an antenna: you can score any candidate, but there is no gradient to follow. The space is discrete, full of local optima, and too big to try every option (40 yes/no choices is about 10¹² combinations).

Gradient descent needs a smooth, differentiable loss, so it doesn't apply. We need a method that only asks “how good is this candidate?”

Lesson 26 of 34 in AI Foundations