
Differential Evolution
Differential Evolution
From Hand Calculations to AI-Assisted Code
You can already ask an AI to write you a Differential Evolution optimizer. The problem is knowing whether it's actually searching — or whether your population has quietly collapsed and the "best solution" stopped improving fifty generations ago. This is the course that gives you that judgment.
Five parts, one algorithm, no gaps:
Part 1 — Intro. Why a population of candidate solutions, evolved by adding the difference between other candidates, searches messy nonlinear problems that gradient methods can't touch — no derivatives required. The intuition before the notation.
Part 2 — By Hand. A complete worked example, generation by generation: mutation, crossover, selection, every vector and every number shown. Nothing waved away, nothing left "as an exercise." You prove the algorithm to yourself.
Part 3 — In Excel. The same example built out in a spreadsheet you can open and poke at, so you watch the population converge — and see for yourself exactly what F and CR do when you turn them.
Part 4 — In Python. A clean, executable, verified reference implementation — the known-good version you can check any other code against.
Part 5 — With AI. A tested prompt that directs an AI assistant to carry this same algorithm to your problem, plus the understanding to catch it when it's wrong.
By the end you won't just have working code. You'll have followed the algorithm from first principles through a hand calculation, a spreadsheet, and production Python — so when you point an AI at your own optimization problem, you'll know how to set F, CR, and population size on purpose, steer the search, and tell when the answer is right.
Written for practicing engineers and STEM professionals who'd rather understand a method than trust a black box.