Background for DGP Applet

Background


Back to DGP Applet page Introduction Overview of Genetic Programming A distributed approach to Genetic Programming The Artificial Ant Problem

Introduction

I am Phyllis Chong, an MSc student of the University of Birmingham and I am working on my summer project which explores a distributed approach to genetic programming. This work is a result of the inspiration from my project supervisor Dr W. B. Langdon. The increased availability of the Internet has motivated us to study the potential of harnessing the wealth of computing resources presented by the Internet to solve difficult problems that require a large amount of memory and cpu resources.

A distributed genetic programming applet termed DGP is developed in the Java programming language to demonstrate the potential of a distributed approach to implementing genetic programming over the Internet. The use of genetic programming to generate a program that navigates an artificial ant along the Santa Fe trail is used as an example problem.

I would like to express my gratitude to Hansueli Gerber who has provided the source code for his GP applet to solve the Symbolic Regression problem. My DGP system was built on top of his source code and developed to be general and generic to support the solving of different problems as well as robust to handle the unpredictability of the network connection and the demands of a distributed approach to genetic programming.

Overview of Genetic Programming

Genetic Programming (GP) is a research area in artificial intelligence which attempts to solve problems using a model of evolution and natural selection. In this model, the computer creates and works with a population of computer programs. These programs are typically encoded as tree-structures to ease the process of creating new programs from two parent programs. Each node with children represents an operation, such as plus or minus or IfFoodAhead for the Artificial Ant problem. The children of that node are taken as the arguments to the operation. To execute a tree, the children of the node are first evaluated, and the results are fed back to the operation of the node.

In all GP problems, there is a given task that each program must try to accomplish. In this project, that task for the program is to navigate the artificial ant to follow the Santa Fe trail so that the amount of food eaten by the ant is maximised. In other problems, the task might be to compute a function that best approximates a given set of points. The program's fitness is thus determined by how well it accomplishes its task. This evaluation function takes in a program created by genetic programming, executes it, and assigns a ranking of it based on its performance. In the Artificial Ant problem, the ranking is determined by the amount of food eaten by the ant when a program created by genetic programming is executed. Thus, the programs that enable the ant to eat a lot of food have high fitness levels and are more likely to survive in the population.

After the initial population of programs have been evaluated and ranked, new populations of programs are created and evaluated through an iterative process of probabilistically selecting the 'fitter' programs and producing new and better programs from them using simulated genetic operations like crossover and cloning. The process of crossover involves removing branches from one tree and inserting them into another. Cloning operation copies the program into the new population. Mutation operators take in a single program and randomly change parts of it, to create a new creature. Mutation operators are not used by the DGP applet to solve the Artificial Ant problem. As the programs for all these operators are chosen according to their fitness levels, the better performing creatures reproduce more often.

In this manner, the population is continually evolving. After many generations, the best programs that solve the problem should appear in the population and begin to dominate. In this way, the population converges to a program that, hopefully, solves the problem a near optimal manner.

Genetic Programming has been applied successfully to find acceptable solutions to problems in business, engineering and science. More links on the subject can be found here.

A distributed approach to genetic programming

With the distributed approach, each participating DGP client applet obtains a random number from the server to create its initial random population and evolves it locally. Upon completing a designated number of generations, the DGP applets running on the participating machines communicate with the server to export their best individuals(programs) and import immigrants from the server into their new population. Specifically, the DGP applet communicates with the server

The Artificial Ant Problem

The Artificial Ant problem is a well studied problem often used as a GP benchmark. It is described in John R. Koza's book "Genetic Programming: On the Programming of Computers by Means of Natural Selection" is used as an example problem for the demonstration.

The problem is to devise a program that can successfully navigate an artificial ant along a twisting trail, known as the 'Santa Fe' trail, placed on a 32 x 32 toroidal grid. The program can use three operators, namely Move, Right and Left, to move the ant forward one square, turn to the right or left. Each of these operations takes one time unit and the maximum time steps allowed for the genetic program is 600. Once the maximum time steps is reached, the program terminates. The functions used for the genetic program include IfFoodAhead, Prog2 and Prog3. The IfFoodAhead function looks into the square the ant is currently facing and executes one of its two arguments depending on whether that square contains food or is empty. Prog2 and Prog3 take two and three arguments respectively which are executed in sequence.

The artificial ant must follow the 'Santa Fe' trail which consists of 89 food units distributed non-uniformly along it. Each time the ant enters a square containing food, the ant eats it. The larger the amount of food eaten, the fitter the control program navigating the ant is.


This page has had hits since 24 August 1998.

Last updated on 24/08/98