The Genetic Algorithm –Explained With “Intelligent” Dots

Gradient descent just tries to optimize a math function
How can we make a dot move between the two red dots?
We may be able to “see” that this is the route the dot should take, but the computer can’t
If this doesn’t make sense right now, it’s ok it should make more sense after the example
  1. Instantiate a population of 1000 dots
  2. Generate random steps for each individual dot
  3. Have each dot take random steps until they hit a wall and die
  4. Calculate the fitness
  5. Use the parents to generate the next generation of 1000 dots
  6. Repeat until you’re satisfied.

Instantiate a population of 1000 dots

Generate random steps for each individual dot

Have each dot take random steps until they hit a wall and die

Calculate the fitness

Use the parents to generate the next generation of 1000 dots

Repeat until you’re satisfied

An early training iteration
A later training iteration

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store