Genetic algorithms… the name feels so familiar and is still intimidating. In truth, genetic algorithms (GA — singular, GAs — plural) are super powerful and not terribly complicated. That mysterious “genetic” qualifier is going to wind up being not so scary after all.

This is a technical topic but our goal will be to keep things accessible to folks who may not have a background in computer science. In this post we’re going to:

  1. Break down GAs — what they are, how they work, and when to use them.
  2. Showcase a non-trivial use of GAs.

Let’s get to it.

Breaking Down Genetic Algorithms


Before we dive into the deep end with context, a dark secret from the corners of Reactland, it’s probably worth taking a step back for some motivation.

React is component based, it’s right on their homepage.

Build encapsulated components that manage their own state[…]

This notion of encapsulation can butt heads with another tenet of React — that components should render as a function of their props (… and internal state but shhh).

It’s not immediately obvious where the tension lives, and if you stick to building simple components you may never come across any. Things get hairy when you…

Justin Russell

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