Charles Darwin taught the world about the survival of the fittest and natural selection & he was the evolutionary father himself 😎.

Evolution has been a “theory” for a long time; it’s nature’s way of “optimizing” for species survival.

The man himself, Darwin, went on a trip around the world, chilled on the Galapagos Islands in Ecuador, and discovered that all living things evolved from a common ancestor.

The man himself observing amphibians

Darwin’s theory of evolution is actually more useful than a description to how us humans evolved from:

Our distant grandfather 👋

Evolution = Nature’s way to optimize living things.

Forget nature… We can use this same process to optimize AI 🤯.

AI h̶a̶s̶ ̶t̶h̶e̶ ̶p̶o̶t̶e̶n̶t̶i̶a̶l̶ will improve every single industry, from agriculture to healthcare to retail. Deep learning (DL) will easily automate all industry tasks.

But right now, the models we’re using require lots of data and training. These models are GIGO (garbage in, garbage out). Shitty data = shitty model. Sometimes it’s hard to train our models accurately.

Optimizing DNNs (deep neural networks) is slow and inaccurate.

(There are several more issues in the deep learning space, I’d encourage you to read more here. )

Why do we currently suck @ optimizing our AI models?

Gradient decent (the most common optimizer) isn’t perfect.

The goal of any AI system is to make the most accurate function(good at some goal). So… if you wanted to engineer some sort of water-proof material based on some set of molecules, you’ll want an AI to create the most water-proof combination of molecules.

We “teach” our networks to learn, normally through a process called Gradient descent, which in theory, works like this:

You’re in Paris (aka a random location on your function) and you want to get to Berlin (the global “maximum” or “minimum”) because you’re tired of eating baguettes.

This is you taking a #selfie with the Eiffel Tower… tourist much 🙄
Paris is the blue dot (starting point) and Berlin is the red dot (ending point)

You’re trying to travel from Paris to Berlin, but the catch is you have no map/ have no idea which direction you’re walking in.

So, you ask strangers which way Berlin is. They’ll point you in some direction (some strangers will know, while other strangers will have no clue). Each time someone points you in a direction, you walk for 5km then you ask another stranger. You’ll get to Berlin eventually, it won’t be the best method.

The route might be a little curvy…

This means of traveling is how a computer will approach creating the best neural network (with the best weights for a function). The weights will start randomized (Paris) and they will become the best weights for the given function (Berlin).

AI using gradient descent to optimize

But, there are better ways to go from “Paris” to “Berlin”.

Using strangers will get you lost fast. You might accidentally end up in Munich or Hamburg(cities in Germany) the same way we could accidentally build models not suited for their tasks. This is called converging at a local minimum(or maximum).

You think you’ve reached Berlin, but jokes you’re actually in Munich. They still have good Bratwurst and beer, but Munich isn’t Berlin.

Evolutionary algorithms are a possible solution to finding a global minimum faster.

Instead of trusting strangers, EA evaluates possible paths and generate the best one over time.

We would start with several random routes. (“initialize” population). [Each path would contain different genetic data in its “chromosome”(# turns, when to walk straight… etc)].

EA would try out some paths

Then, we’d evaluate how good the paths were (distance). This is called a fitness function.

Then, we would select the top 10% fastest paths and kill off the rest, (10% is just an arbitrary value). (Aka “selection”)

From the 10%, we’d allow them to reproduce [mix and match their chromosomes] and make a new “population”. Just for funsies, we’d introduce some genetic mutations to add some variation.

With the new population(new set of routes), we’d evaluate them again, choose the top 10%, let them reproduce + mutate them for funsies, & repeat a BUNCH of times.

Over time, the routes “populations” we’d produce would get better and better.

An evolution meme for your pleasure

In evolutionary computation, we pick the top versions of a population and let them reproduce. We want their genetics to survive into the next generation.

The uses for Evolutionary Algorithms

Everything we do is an optimization problem.

Evolutionary algorithms engineered NASA’s spacecraft antenna better and faster than any engineer 👇

EA are able to build on top of designs and evolve them so they can become better. They create generations of designs, each better than the next.

EA can essentially create anything and make it better over time.

EA can help multi-component optimization problems

Some things are far too complex, with too many variables to even envision. If we wanted to make the fastest car, our optimization function would look like this:

Maybe we wanted the fastest, cheapest, and car as well. It would be a more complex optimization situation.

And every time we add new variables like handling or gas-tank size it gets harder to create the most optimal car.

Luckily evolutionary algorithms are able to take in a bunch of desired inputs to be optimized and optimized for all of them. E.g. a the fastest, safest, least-gas using, best handling, cheapest vehicle.

I wanted to implement my own genetic algorithm, and I was able to see optimization in action😅. My algorithm helped create the shortest path between two points, which was similar to the Paris-Berlin problem.

Over the generations, my Genetic algorithm was able to decrease the complexity of its path.

Seeing my algorithm in action really just made me excited for the possibilities of Genetic and Evolutionary algorithms, they’re going to optimize the way the world works.

Evolutionary Algorithms will revolutionalize Deep Learning

Forget engineering + creating new objects, evolutionary algorithms can engineer neural networks. So, EA will create neural networks. AI creating AI.

What’s #fun and #fresh with evolutionary algorithms is the fact that they evolve and get smarter with time. They’re also able to think outside the box and create things with very little instruction.

Evolution strategies + AI = creative AI.

Evolving our neural nets, and DL frameworks will guide us towards solving the world’s biggest problems by making AI that can generate solutions to problems, like NASA’s most optimal antenna.

EA has been around for a long time. Evolution has been around for, well, forever.

As young as he looks, Darwin is old. The 1800s old.

Hi Darwin

We know that evolution has produced, as insane as I might sound, intelligent life (human beings).

Intelligent life 😍

Ok, maybe some of the results of evolution have produced less-than-promising individuals, as a whole humans are pretty smart.

So, it only makes sense to evolve our machines and AI using EvOlUTioN.

Once we create intelligent life in computers, we can revolutionalize every industry.

  • Safer Roads
  • More dependable diagnosis
  • Ecologically sustainable farming
  • Personalized education
  • Enhanced/more productive automation

AI is the marriage of technology and creativity. Evolutionary Algorithms will help solve the world’s biggest problems and they’ll optimize our AI.

Thanks for reading! If you want to connect, please shoot me an email! ( or connect on LinkedIn / Twitter.

17 yo building better maternal healthcare in developing countries.

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