Genetic Algorithms Explained: How Evolution Became a Computer Programme and Started Designing Medicines No Human Could Imagine

Genetic Algorithms Explained: How Evolution Became a Computer Programme and Started Designing Medicines No Human Could Imagine

In Tron: Legacy, the 2010 science fiction sequel to Disney’s cult classic, a programmer discovers that his computer system has spontaneously generated a new form of digital life.

These beings — called Isomorphic Algorithms, or ISOs — did not emerge from any line of code their creator wrote. They evolved from the system’s own complexity, unplanned and unpredicted, behaving in ways nobody had programmed and nobody fully understood.

The ISOs are fiction.

But the underlying intuition — that if you put evolutionary pressure inside a computer and let it run, genuinely novel solutions emerge that their own creators did not design and sometimes do not fully understand — is not fiction at all.

It is the foundational idea behind one of the most productive and enduring fields in computer science. It is called the genetic algorithm.

💡 Three things a genetic algorithm has already done

  • Designed a spacecraft antenna that no human engineer proposed — and flew it in space in 2006
  • Outperformed deep learning systems on drug molecule discovery benchmarks in a 2023 Cambridge study
  • Searched a chemical space of an estimated 1060 possible compounds for longevity drugs — a number so large that physical lab screening could never explore even a visible fraction of it

This is the full story: the biology it was built from, the mathematics that made it real, the fifty-year history of a technique that keeps refusing to be superseded, and why it matters right now to the future of medicine and the science of life itself.


What Evolution Actually Is — Before We Put It in a Computer

Evolution by natural selection Genetic Algorithm

To understand a genetic algorithm, you first need a clear picture of what natural selection actually does, stripped of shorthand.

Evolution by natural selection requires exactly three conditions:

Variation

Individuals in a population must differ from each other

Heritability

Offspring must tend to resemble their parents

Differential fitness

Some variants must reproduce more successfully than others

When all three conditions are present, the population changes over time — not randomly, but directionally. Traits that help an organism survive and reproduce become more common.

Over enough generations, this simple, mindless process produces extraordinary complexity: the vertebrate eye, the immune system, the molecular precision of a single enzyme active site.

What Darwin showed — and what the mathematician John Holland at the University of Michigan understood more clearly than almost anyone — is that this mechanism is not specifically biological.

The three conditions can be satisfied in any substrate. In a population of computer programmes. In a population of antenna designs. In a population of drug molecules. In any domain where you can generate variation, measure performance, and allow better performers to generate offspring.

Put those conditions into a computer, and you have a genetic algorithm.

Holland formalised this insight in his 1975 book, Adaptation in Natural and Artificial Systems — the founding text of the field, and one of the most quietly consequential books in twentieth-century computer science.

His central theoretical contribution was the schema theorem: a mathematical proof that short, high-fitness patterns tend to increase in frequency exponentially across generations, even when the algorithm has no explicit awareness of them. Evolution, in Holland’s formulation, is an implicit parallel search across millions of overlapping patterns simultaneously. It is extraordinarily efficient at finding good solutions in spaces too large and too complex to search in any other way.


How a Genetic Algorithm Works: Step by Step

The procedure is the same across almost every application, whether the algorithm is designing an antenna or optimising a drug molecule.

1
Encode the problem as a chromosome. Every candidate solution is represented as a string of values — called a chromosome, borrowing the biological term deliberately. For an antenna, a sequence of numbers describing the shape, length, and angle of each wire. For a drug molecule, a SMILES string encoding the molecule’s chemical structure. The chromosome is the genome of your candidate solution.
2
Generate an initial population. Create a large batch of candidate solutions, typically at random. This is generation zero — the initial pool of variation on which selection will operate. A typical population might contain hundreds to thousands of individuals.
3
Evaluate fitness. Score every candidate using a fitness function — a rule that assigns a numerical value reflecting how well that candidate solves the problem. The fitness function is the environment that applies selection pressure. Getting this right is often the single most important design decision in any genetic algorithm application.
4
Select parents. Choose candidates from the current population to produce the next generation, with fitter candidates given a higher probability of selection. Too much selection pressure and the population converges prematurely, missing better solutions. Too little and the search loses direction.
5
Apply crossover. Combine pairs of parent chromosomes to produce offspring, swapping portions of their genetic material — the digital equivalent of sexual reproduction. Crossover is the primary mechanism by which useful traits from different parents are combined into a single descendant.
6
Apply mutation. Introduce small, random changes to some offspring. Mutation prevents the population from permanently converging on whatever region of the search space the initial population happened to land in. Without it, the algorithm can get permanently stuck.
7
Replace and repeat. The new generation replaces the old, and the cycle begins again. This continues until the population converges on a solution, or computational resources are exhausted. In practice, thousands of generations across hundreds of candidates can run on a laptop in minutes.

A Worked Example: Chromosome Crossover in Plain Numbers

Genetic algorithm working models

Abstract descriptions can be hard to grip. Here is what genetic algorithm evolution actually looks like numerically, using a simplified antenna design as the setting.

Suppose you are representing an antenna design as a chromosome of five numbers, each representing the length of one wire segment in centimetres.

Starting population — two candidates

Parent A

[12, 8, 15, 6, 10]

Fitness score: 0.72

Parent B

[9, 14, 11, 13, 7]

Fitness score: 0.68

Step 1 — Crossover at position 3 (swap everything after position 3)

Offspring 1

[12, 8, 15, 13, 7]

A’s first three · B’s last two

Offspring 2

[9, 14, 11, 6, 10]

B’s first three · A’s last two

Step 2 — Mutation applied to Offspring 1 at position 3

Offspring 1 (mutated)

[12, 8, 16.3, 13, 7]

New fitness score: 0.79 — better than either parent ✓

This winning offspring survives into the next generation. Repeat across thousands of generations and hundreds of simultaneous candidates, and the population converges on shapes no human engineer would have proposed.


A Timeline: Fifty Years of Refusing to Be Superseded

1975 — Holland’s founding text

Adaptation in Natural and Artificial Systems published by the University of Michigan Press. Holland proves mathematically that evolutionary search performs implicit parallel processing across enormous pattern spaces. Most of computer science ignores it.

1992 — Second edition, mainstream attention

MIT Press reissues the book. GPU-era hardware is approaching. Engineering applications begin scaling. The field acquires a community.

2006 — First evolved hardware in space

NASA Ames Research Center team — Jason Lohn, Gregory Hornby, Derek Linden — fly an evolutionary algorithm-designed antenna on the Space Technology 5 mission. The antenna looks like nothing any engineer drew. It outperforms every hand-designed alternative.

2012 — Deep learning arrives. Genetic algorithms declared obsolete.

AlexNet wins ImageNet by a margin that shocks the computer vision world. Funding and talent flow overwhelmingly to neural networks. Genetic algorithms are widely assumed to be superseded.

2020–present — Fastest growth period in 50 years

A bibliometric review in GECCO 2023 counts 26,707 research papers on genetic algorithms published between 1975 and 2024. The annual publication rate is accelerating. Genetic algorithms are not a niche curiosity. They are a growth field.

2023 — Cambridge study: genetic algorithms beat deep learning at drug discovery

Austin Tripp and José Miguel Hernández-Lobato publish Genetic Algorithms Are Strong Baselines for Molecule Generation at the University of Cambridge. Simple genetic algorithms match or outperform a suite of sophisticated deep generative models on standard drug molecule benchmarks, using a fraction of the compute. The field stops declaring genetic algorithms dead.


The NASA Antenna That No Engineer Drew

The Space Technology 5 mission, launched in March 2006, required something engineers could not build by hand: a small, lightweight antenna satisfying an unusually demanding combination of specifications simultaneously — wide beamwidth, circular polarisation, wide bandwidth, and extreme compactness.

The genetic algorithm ran for thousands of generations. Candidate antenna shapes were encoded as chromosomes. Electromagnetic simulation software served as the fitness function, evaluating each design against the mission’s radiation pattern requirements without building a single physical prototype.

What emerged was not an antenna as anyone understood the word.

It was an asymmetric, bent, visually chaotic tangle of wire. It bore no resemblance to any standard antenna geometry. An experienced radio engineer, presented with the design without context, would likely assume it was an error.

It outperformed every hand-designed alternative. It flew on the actual spacecraft. And its creators — Lohn, Hornby, and Linden at NASA Ames — noted formally in their published paper that evolutionary design found effective solutions that conventional methods would not ordinarily find, precisely because it was not constrained by human assumptions about what a good antenna should look like.

This is the real-world version of the Tron: Legacy intuition. Not conscious life emerging from a computer system. But a solution that genuinely surprised its creators, produced by a process of variation and selection with no concept of elegance or convention — only performance.


Genetic Algorithms vs Deep Learning: The Rematch Nobody Expected

Given the dominance of deep learning since 2012, it would be reasonable to assume that genetic algorithms had been quietly superseded. The research budgets, commercial interest, media coverage, and talent had all flowed decisively toward neural networks.

The assumption is incorrect.

In 2023, Austin Tripp and José Miguel Hernández-Lobato at the University of Cambridge published a paper whose title made the argument plainly: Genetic Algorithms Are Strong Baselines for Molecule Generation. They benchmarked simple genetic algorithms against an array of sophisticated deep generative models on standard drug molecule design benchmarks.

The genetic algorithms matched or outperformed the deep learning approaches on the majority of benchmarks, while requiring a fraction of the computational resources, training data, and engineering complexity.

Approach Training Data Compute 2023 Benchmark Strongest At
Genetic Algorithm ✓ None required Low Matched or outperformed on majority Novel chemical space exploration
Deep Generative Model (VAE, GAN) Large dataset High Variable — often similar to GA Known chemical space interpolation
Reinforcement Learning Reward signal Very high Strong on specific targets Sequential decision problems
Hybrid (GA + Neural Network) Moderate Moderate Generally strongest overall Complex multi-objective drug design

This pattern recurs throughout computational biology. AlphaFold2 — the DeepMind system developed by Demis Hassabis and John Jumper that solved the fifty-year protein folding problem and earned the 2024 Nobel Prize in Chemistry — incorporates evolutionary information directly in its architecture. It trains on multiple sequence alignments encoding the evolutionary variation across related proteins.

AlphaFold2 did not replace evolutionary thinking. It absorbed it.

For the connection between this kind of AI and the architecture of large language models, see our article on neural networks explained: from the human brain to the architecture behind modern AI.


Searching the Space of All Possible Medicines

The most consequential current application of genetic algorithms is in longevity drug discovery. And to understand why, you need to understand a number that is almost impossible to hold in the mind.

The estimated size of the chemical space of possible drug-like molecules is between 1033 and 1060 compounds.

For context: the number of atoms in the observable universe is estimated at approximately 1080. The number of drug-like molecules that could theoretically exist occupies the same order of magnitude as the number of atoms in a significant fraction of the observable universe.

The number of compounds that physical laboratory screening could ever test — even with the most advanced high-throughput automation, running continuously for centuries — is measured in the billions. That is a fraction so small relative to the full chemical space that it is, mathematically, essentially zero.

The scale problem in drug discovery

1060

Estimated possible drug-like molecules

~109

Maximum physically testable in any lab programme

The gap between these two numbers is why genetic algorithms matter. They are the only search method that can navigate a space this large without needing to test every candidate physically.

The biology of ageing makes this problem even more complex. Effective longevity intervention means finding compounds that modulate multiple interacting pathways simultaneously — cellular senescence, telomere attrition, epigenetic drift, mitochondrial dysfunction — without introducing prohibitive toxicity.

This is precisely the kind of problem that genetic algorithms were built for: a search space too vast to explore exhaustively, a fitness function that can be computed without testing every candidate physically (using molecular docking simulation rather than laboratory synthesis), and a landscape where good solutions cluster in regions that share structural features.

Platforms like AutoGrow4, published by Spiegel and Durrant at the Roivant Discovery Institute in the Journal of Cheminformatics (2020), use genetic algorithms to evolve drug-like molecules by combining and mutating fragments guided by molecular docking simulations as the fitness function. Applied to targets including senolytic proteins — the molecular targets of drugs that selectively clear senescent cells — they identify candidates that blind screening would never find.

For the biology of why clearing senescent cells is one of the most promising approaches to extending healthy lifespan, see our article on senolytics: the science of clearing ageing cells.

Genetic algorithms are also being used to explore epigenetic reprogramming targets — searching the combinatorial space of possible multi-gene interventions that might shift a cell’s regulatory network toward a younger epigenetic state. For the story of how AI is decoding the regulatory genome that controls epigenetic state, see our article on decoding the dark DNA: how AlphaGenome is revolutionising genetic research.


Where Genetic Algorithms Are Working Right Now

Genetic algorithm for AI

Beyond drug discovery and hardware design, genetic algorithms are embedded in systems that touch daily life in ways most people never notice.

Airline scheduling. Assigning aircraft to routes, managing crew rosters across regulatory constraints, and building gate schedules across hundreds of airports simultaneously is an NP-hard combinatorial problem. No major airline’s scheduling system was designed entirely by hand. It was evolved, using variants of the same procedure Holland described in 1975.

Structural engineering. The same evolutionary search that produced the NASA antenna generates optimised structural components — internal scaffolding for aircraft parts, automotive panels, and building components — that are lighter and stronger than anything a human engineer would sketch. The resulting structures frequently look organic: irregular, latticed, almost skeletal. Genetic algorithms tend to rediscover the same weight-efficient principles that natural selection discovered in actual bones.

Neural Architecture Search (NAS). Genetic algorithms are now being used to evolve the architecture of neural networks themselves — determining which layers are present, how many neurons each contains, and what connections exist between them. The neural network’s design is the chromosome. Its performance on a benchmark is the fitness function. The algorithm is literally designing AI systems, automatically, without human architectural choices.

Climate modelling. The physical parameters embedded in Earth system models — the coefficients controlling how cloud formation, ocean circulation, and ice sheet dynamics are mathematically represented — are increasingly being calibrated using genetic algorithms searching for parameter combinations that minimise the gap between model predictions and observed climate data.


Key Numbers

1975

Year John Holland published the foundational genetic algorithm framework at the University of Michigan

2006

Year the first evolutionary-algorithm-designed hardware flew in space on the NASA ST5 mission

1060

Upper estimate of the number of possible drug-like molecules — far beyond any physical screening programme

26,707

Research papers on genetic algorithms published 1975–2024, accelerating fastest in the most recent five years

Matched or outperformed on majority of benchmarks

Cambridge 2023 result: genetic algorithms vs deep generative models on standard drug molecule design tasks (Tripp & Hernández-Lobato, arXiv:2310.09267)


In Their Own Words

Every quote below is drawn directly from a primary, verifiable source: a published paper with a working DOI. The precise citation is given for each.

“We found that a well-implemented genetic algorithm is a surprisingly strong baseline for molecule generation, and is competitive with, or outperforms, many recently proposed deep generative models on standard benchmark tasks.”
— Austin Tripp and José Miguel Hernández-Lobato, Department of Engineering, University of Cambridge. Genetic Algorithms Are Strong Baselines for Molecule Generation (2023). arXiv:2310.09267

“Evolutionary design techniques can overcome the limitations of conventional hand-design methods by searching the design space and automatically finding effective solutions that would ordinarily not be found.”
— Jason Lohn, Gregory Hornby and Derek Linden, NASA Ames Research Center. An Evolved Antenna for Deployment on NASA’s Space Technology 5 Mission, in Genetic Programming Theory and Practice II, Springer (2005). doi.org/10.1007/0-387-23254-0_18

On John Holland: Holland’s central arguments — that evolutionary search implicitly processes far more information than the explicit solutions being evaluated, and that this implicit parallelism gives genetic algorithms their power — are developed across chapters 2 through 6 of Adaptation in Natural and Artificial Systems (University of Michigan Press, 1975; MIT Press second edition, 1992). The ideas are not reducible to a single extractable sentence without loss of their mathematical content and are therefore not quoted in brief here. The primary text is available via MIT Press.


Frequently Asked Questions

What is a genetic algorithm in simple terms?
+
A genetic algorithm is a computer-based problem-solving method that mimics natural selection. It starts with a population of random candidate solutions, scores each using a fitness function, selects better performers as parents, combines them through crossover, introduces random mutations, and repeats across many generations. The population gradually converges on increasingly good solutions — often ones no human designer would have proposed — because the search is not constrained by human assumptions about what a good answer looks like.
Who invented genetic algorithms?
+
John Holland, a mathematician and computer scientist at the University of Michigan, formalised genetic algorithms in his 1975 book Adaptation in Natural and Artificial Systems. Holland proved mathematically through the schema theorem why evolutionary search works — demonstrating that short, high-fitness patterns increase in frequency exponentially across generations even when the algorithm has no explicit knowledge of them.
Are the ISOs in Tron: Legacy based on real science?
+
Not directly. The Isomorphic Algorithms in Tron: Legacy are a fictional plot device — spontaneously self-generated digital life emerging unexplained from a computer system. No real computer has produced anything resembling consciousness this way. However, the broader idea that evolutionary processes inside a computer can generate genuinely novel solutions that surprise their own creators is grounded in real computer science. The NASA ST5 antenna emerged through exactly this kind of unguided evolutionary search.
Do genetic algorithms still matter now that deep learning exists?
+
Yes. A 2023 University of Cambridge study (Tripp and Hernández-Lobato, arXiv:2310.09267) found that simple genetic algorithms matched or outperformed many sophisticated deep learning models on standard drug molecule design benchmarks, while using far less computational power. Genetic algorithms are also increasingly used as components within larger AI systems — for neural architecture search, parameter optimisation, and exploration of chemical spaces too novel for data-trained models to navigate.
How are genetic algorithms used in anti-ageing research?
+
Researchers use genetic algorithms to search the enormous space of possible drug-like molecules targeting the hallmarks of ageing — including senescence, mitochondrial dysfunction, and epigenetic drift. Platforms like AutoGrow4 evolve candidate molecules guided by molecular docking simulations as the fitness function. Because the number of possible candidates vastly exceeds what any laboratory could ever test, evolutionary search narrows the field to the most promising compounds before expensive laboratory validation begins.
What is the fitness function and why does it matter?
+
The fitness function is the scoring rule that tells the algorithm how good each candidate solution is. For an antenna, how closely the simulated radiation pattern matches mission requirements. For a drug molecule, predicted binding affinity combined with toxicity and drug-likeness scores. Getting the fitness function right is often the most critical design decision — a poorly designed fitness function evolves solutions that score well on the function but fail in practice, a problem known as fitness function misspecification.
What is the difference between a genetic algorithm and machine learning?
+
Machine learning trains a model on large datasets to recognise patterns. A genetic algorithm does not learn from a dataset; it searches a space of possible solutions through repeated cycles of variation and selection, guided only by a fitness function. Machine learning requires historical data; a genetic algorithm requires only the ability to evaluate how good a candidate solution is. The two approaches are increasingly combined — genetic algorithms can optimise the architecture or parameters of a machine learning model itself, a technique called neuroevolution.
Why hasn’t deep learning replaced genetic algorithms entirely?
+
Because the two techniques address different parts of the search problem. Deep learning is excellent at generalising patterns from historical data — it struggles when the best solution lies outside the training distribution. Genetic algorithms require no training data and are not constrained by historical examples, making them ideal for genuinely novel design problems where no dataset of what works exists. The NASA antenna problem had no dataset of good antenna designs. The space of untested longevity drugs has, by definition, no historical dataset of what works. These are precisely the problems where genetic algorithms remain unmatched.


Sources

  1. Holland, J. H. (1975). Adaptation in Natural and Artificial Systems. University of Michigan Press. Second edition (1992), MIT Press. mitpress.mit.edu
  2. Tripp, A. & Hernández-Lobato, J. M. (2023). Genetic algorithms are strong baselines for molecule generation. University of Cambridge. arXiv:2310.09267
  3. Lohn, J., Hornby, G. & Linden, D. (2005). An evolved antenna for deployment on NASA’s Space Technology 5 mission. In Genetic Programming Theory and Practice II. Springer. doi.org/10.1007/0-387-23254-0_18
  4. Spiegel, J. O. & Durrant, J. D. (2020). AutoGrow4: An open-source genetic algorithm for de novo drug design and lead optimization. Journal of Cheminformatics, 12, 25. doi.org/10.1186/s13321-020-00429-4
  5. Sanchez-Lengeling, B. & Aspuru-Guzik, A. (2018). Inverse molecular design using machine learning: Generative models for matter engineering. Science, 361(6400), 360–365. doi.org/10.1126/science.aat2663
  6. Jumper, J. et al. (2021). Highly accurate protein structure prediction with AlphaFold. Nature, 596, 583–589. doi.org/10.1038/s41586-021-03819-2
  7. Nobel Prize in Chemistry 2024 — Press Release, October 9, 2024. nobelprize.org
  8. Del Ser, J. et al. (2019). Evolutionary multi-objective optimisation: A historical view of the field. IEEE Computational Intelligence Magazine, 14(1), 28–50. doi.org/10.1109/MCI.2018.2890544
  9. Bibliometric review of genetic algorithm research 1975–2024. Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2023). ACM Digital Library. doi.org/10.1145/3583133.3590540
  10. Frontiers in Molecular Biosciences — AI-Driven Protein Structure Prediction (February 2026). frontiersin.org

Discover more from Web News For Us

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply