This is the forty-first article in a series dedicated to the various aspects of machine learning (ML). Today’s article will introduce genetic algorithms, which is a form of learning that finds its basis in the biological concept of evolution.
You’re back in grade school, and you are having the strangest daydreams in your science class. Fish with feet run out of the water and morph in a terrifying time lapse into giant fish-men with the legs of a human but the torso of a fish, which then morphs into an ape, which then morphs into a giant cell, which then morphs into butterfly that morphs into a human. You writhe in your seat in discomfort at these disturbing visions until your science teacher shakes you awake.
“Alright, what’s all this then?” (He’s British).
“Um, I was, um, resting my eyes sir. I’m listening!”
He laughs Britishly, then puts the question to you: “You mind telling me what the word ‘evolution’ means?”
“Um,” you stammer out, looking around the class for help but only finding faces pinched with schadenfreude, but manage to only utter “fish turn into human.”
“Are you having a go? Is this a wind-up? Tell it to me now, lad, or I’ll send you down to the principal for a punishment.”
“N-no, fish turn into human. I saw it in a dream!”
But your teacher has stopped paying attention to you, and has gone to the board to chalk this definition of evolution: The development of something simple into a complex form.
“But, but,” you strain to be heard, “I thought evolution meant fish turn into human!”
The whole class boos and throws balled pieces of notebook paper at you.
“As it turns out, thou ignorant child, evolution is not a concept that is limited to biology. In fact, the tenets of evolution can be found in a field like machine learning!
“Machine learning,” you say, “what’s that!?!?”
All of your classmates, good eggs every single one of them, simultaneously chant this definition: “Machine learning is the theory and practice of computers learning from data independent of any outside help.”
“Good, children, I see at least some of you have been paying attention in class. Now, I say that machine learning involves evolution, but I do ought to mention that evolution in machine learning is modeled after hypotheses in biological evolution.”
“So fish does turn into man!” You cry.
“Not in the world of machine learning, it doesn’t,” says your teacher. “In machine learning, there is a certain type of algorithm called a ‘genetic algorithm,’ which has its basis in evolution.”
“What does a genetic algorithm do, and how is it related to evolution?” You ask, suddenly overtaken with curiosity.
“A genetic algorithm seeks to ‘evolve’ certain hypotheses in the sense that it will take existing hypotheses and recombine them or ‘mutate’ them to create what are called ‘successor’ hypotheses.”
A blonde bespectacled boy named Poindexter raises his hand with urgency. “Teacher! Teacher!” he cries, “don’t forget to add that this evolution begins with what is called a population of hypotheses, and that there is indeed a ‘survival of the fittest’ element to the work of a genetic algorithm in that only the best hypotheses in the population, determined to be the best by a chosen metric of fitness, will be selected by said genetic algorithm for the recombination and mutation part. The idea is that the best hypotheses will repopulate while the worst hypotheses will be tossed out, so that there is a consistent strengthening of hypotheses for the agent!”
“Bra-vo, Poindexter, I believe you have hit the nail on the proverbial head,” congratulates your teacher. “It is worth noting that this method is actually quite popular among machine learning agents, for the simple fact that it is effective. As you may know, evolution is quite popular among biological systems, has been for oh let us not go into the number of years, so that ought to tell you something.”
“Hm,” you say, trying to figure out if you truly grasp it all. “So, teacher, and, um, Poindexter, I suppose that if I had to summarize the concept of genetic algorithms, and evolution in machine learning, I would say this: Genetic algorithms develop hypotheses into new and more complex combinations, choosing only the best hypotheses in the interest of creating the best hypotheses, and leaving the weakest hypotheses out of the evolution.”
“Correct!” your teacher cries. “Now, try and stay awake for the rest of class, how about that?”