Library tutorials & articles

An Introduction to Genetic Algorithms

Overview

After reading an interesting tutorial by Chris Stones on Artificial Intelligence, I decided to follow this up with a different problem-solving technique, known as the Genetic Algorithm. Genetic Algorithms, or GAs, have been around since the 1970’s, and provide a method of solving vast problems quickly.

The solution to any problem may be found eventually by simply considering every possibility in turn.  Imagine a combination lock with only two numbers each accepting the digits 0 – 9, the possible combinations are:

Although this may work when trying to discover a two digit combination, if this is increased to a forty digit combination the time needed to discover the combination is greatly increased.  Genetic Algorithms are just one of a number of tools which aim to discover answers to problems in a much quicker time. 

Before we demonstrate how a GA works it is necessary to define the term “Problem Space”: consider the combination example above, instead of representing the possible answers in a list as we have above, consider them in a grid:

This is what is called a problem space, i.e. the solution to the combination problem lies somewhere in this grid.  In order to find the solution we potentially have to look at every position in this grid.  Simply put - Genetic Algorithms just “bounce around” until they find the answer.

Comments

  1. 25 Oct 2008 at 16:18
    I think your math is slightly off... in your example you derice 23 and 75.5 from formulars that don't arrived at these... what am I missing ??? 5*4 = 20, 20/2 = 10, 10 + 1 = 11, 11 + 6 = 17
  2. 26 Apr 2007 at 20:30
    I think that's a basic knowledge of GAs.
    Can give to us about detail of GAs, and another important application of this algorithm especially in Robot?


  3. 01 Jan 1999 at 00:00

    This thread is for discussions of An Introduction to Genetic Algorithms.

Leave a comment

Sign in or Join us (it's free).

Rob Bickel

Want to stay in touch with what's going on? Follow us on twitter!