Back to DGP Applet page | Introduction | Overview of Genetic Programming | A distributed approach to Genetic Programming | The Artificial Ant Problem |
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.
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.
to send the settings of the parameters used for its run to the server and to obtain a unique random number from the random number generator at the server to create its initial population. To ensure that the initial population created at each machine is different, it is important that the applet can connect to the server to obtain a unique random number. As such, the applet will prompt you to power on your modem if it discovers that the modem is not on. If you choose to ignore the prompt and the applet cannot connect to the server, the genetic program will use a default random number to create its initial population and will run stand-alone without communicating to the server. Upon receiving the parameter settings, the server will ensure that the problem that the applet is trying to solve matches the problem being solved by the server. This ensures that an applet which was downloaded some time ago and was subsequently reconnected back to the server does not deposit incompatible individuals into the population pool at the server when the server proceeds to a new problem. A dialog will be displayed to inform you of the incompatibilities of the problem being solved and request you to download the applet again. Again, if you choose to ignore the prompt, you can continue the run in a standalone mode.
the DGP applet deposits a specified number of its best individuals into a common pool at the server and obtains a specified number of individuals from the pool back into its new population. If your modem is not powered on when the sending and receiving of individuals take place, the applet will prompt you to power on your modem if the exchange of individuals take place when the run terminates but will abort the exchange of individuals at other times. This design is based on the assumption that the best individuals generated by subsequent generations are 'fitter' than those of previous generations.
the DGP applet sends information on whether a solution is found and whether a run is completed or terminated prematurely, the number of food pieces eaten by the ant at program termination, the number of the generation in which the program is terminated and the best individual found in the terminating generation or the solution, if a solution is found. As it is important for the server to keep track of the termination status of a participating client, the applet will again prompt you to power on your modem if you have not already done so.
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