Tag Archives: the power of evolution

Bit zero on Genetic Programming

When I mention genetic programming the faces of those I talk to often go a bit funny, scrunched up. They don’t get it or can’t easily understand. Fair enough. Let me try and put it simply.

What does genetic programming achieve?

Genetic programming is known for producing unusual and successful outcomes. These are often computer programs, but can be physical objects too. The odd looking NASA antennae shown here was the first artificially evolved object in space, and achieved good transmission rates for low power consumption at odd angles as the satellite flew around Earth studying the magnetosphere in the mid 2000’s. 19 06 10 NASA GP Evolved Antennae BLOGGED.png

Obviously, it depends what the outcome is that the evolution is aimed at. This video from Karl Sims is from 1994 and shows simulated virtual creatures evolved to achieve a range of outcomes. This 2014 video from Cornell University shows ‘electrophysical robots’.

Genetic programming can be used to achieve all sorts of outcomes, provided that the fitness function can be programmed.

Where did genetic programming come from?

Evolutionary approaches were started in the 1960’s in Berlin and then in the 1990’s John Koza popularised the genetic programming technique at MIT. He published big fat heavy books on the topic, including Genetic Programming II, which I have on my bookshelf, and Genetic Programming Theory and Practice II which I also have hardcopy.

Genetic programming is: “Using code to evolve code to solve a problem”

This is the way I often put it. Genetic programming uses Darwinian evolutionary approaches coded into the computer, with a clear outcome specified. The outcome defines what the evolved code you get does.

To achieve genetic programming you need:

  1. A definition of what a good outcome is (the fitness function)
  2. DNA blocks (the small bits of code you will put into the evolutionary processes)
  3. A way of evolving the individuals (the code that manages the evolution process)

Throw them at the wall, and see what sticks

The fitness function is crucial. It defines how you will select from the evolved individuals. As each individual is evolved, they are ‘thrown at the wall’, or tested using the fitness function.
Those individuals that get ‘good’ scores are kept, and breeding happens more with higher them.


The process goes on, generation after generation, following that approach. And you get graphs like this one.Blogged IMG_2017_08_05 Website from CROC_Fig_015 2D Fitness Graph

Automatic Programming

Back in the 1990’s, a term often used was ‘Automatic Programming’, i.e. instead of developers working to code a solution to the problem, this technique outputs the program without a person directly involved. Of course a human must be involved to define and set up the problem.

The subtitle for one of those books above is “Automatic Discovery of Reusable Programs”, and this is what researchers really wanted to achieve. Put another way:

“Genetic programming addresses this challenge by providing a method for automatically creating a working computer program from a high-level problem statement of the problem”

For some more detail, see below:

Continue reading Bit zero on Genetic Programming

Condor GP: some of the inspiration

The CondorGP project came together over many years. Since 2005 in fact.

There are many pieces of the puzzle and my bet is that no-one else has cobbled together the bits I have, in the way that I have.

I should note there are some inspirational bits that I’m not going to talk about much (at all) as they are key to the design.

Self sustaining something

At one point at University, Alex, my coursemate and housemate and I were talking stuff. About how wouldn’t it be better if you could work on something, a business or an idea, and then when it was up and running then it would look after itself.

Seems minor, and obvious, but has influenced the thinking.

Genetic progammming

I came across Genetic Programming in an interesting textbook I bought at Brunel University, where Alex and I did an AI module as part of our engineering masters. This book was: Artificial Intelligence – A guide to intelligent systems, by Michael Negnevitsky

Alex and I worked together on an AI project, using ANNs, Artificial Neural Networks, like Deepmind used to create AlphaGo. AlphaGo came later, it must be said…

But flicking through again after University in 2005, I thought the sections on Genetic Programming were more interesting. I’ve still got the same copy of Negnevitsky’s book, so I type out directly:

“Genetic programming offers a solution to the main challenge of computer science – making computers solve problems without being explicitly programmed.”

This was pretty mind blowing and intriguing to a geeky engineering graduate. Further:

“Genetic programming represents an application of genetic model of learning to programming. Its goal is to evolve not a coded representation of some problem, but rather a computer code that solves the problem. That is, genetic programming generates computer programs as the solution.” 

So the first steps of inspiration where that the power of genetic programming was enormous.

Key point 1 being that Darwin had hit upon the idea that evolution as a mechanism that had allowed or encouraged, or maybe actually been the basis for all the complexity and wonder of our planet. Key point 2 being that something of that power could be made available to us as part of computer work to solve complex problems. I quote again:

“evolutionary strategies can solve a wide range of problems. They provide robust and reliable solutions for highly complex, non-linear search and optimisation problems that previously could not be solved at all (Holland, 1995, Schwefel, 1995).”

So my brain immediately went to solving the obvious problem to a new graduate, how to make money. And directly to trading on the stock market.

I’ll look to write about genetic programming itself, in future posts, to share a little of how this works.