Ant Food Collection Genetic Program
User Guide

The ant program is a Microsoft .NET WinForm program written in C#. Although the .NET Framework has been ported to several Operating Systems, your best bet is to use Windows. You can:

The ant program

The ant program consists of 3 tabs:

Note: If you haven't read the Background page yet, you should do that first.

Ant Program Tab 1
;

The Evolver

This tab is the actual Genetic Program. It is used to evolve a solution to a particular problem. Note: On startup, everything is setup to start evolving a solution to a simple food collection problem. You just need to click Start Genetic Program. To evolve your own solution to a more complicated problem, you will need to:

The other sections you need to set up to get started are: Initial Population, Crossover / Mutation, Fitness Calculations, and Interpreter Options. You can get detailed information on these parameters from the Parameters page.

Once you think everything is setup, give it one final check to make sure everything is correct. It can take hours even on a fast PC to get any type of a solution. You don't want to find out hours later that you made a mistake.

When everything is set, click the Start Genetic Program button. You should soon see updates in the set of text boxes on the right. It will first make the Initial Population, which can take over an hour depending on the number of ants, number of turns per ant, the population size, the average program size and the speed of your computer. Once the initial population is created the crossover counter will start to go up. Detailed information on the best solution found so far is provided along with some information about the average program fitness and size.

You can pause and resume the Genetic Program at any time. You can also update any of the options while the program is paused, including adding or removing ant programs from the population. Note: Changing parameters will not cause the fitness to be re-evaluated on the existing programs.

Ant Program Tab 2
;

The Program

This tab lets you view the program you just evolved, view one of the canned solutions, or create a program from scratch. To view the program you just evolved, go to the "Load a Genetic Program Solution" text box, and select "Load your last Evolved Solution". Your program will then appear in the program tree above.

To view a premade canned solution, use the same text box to choose one of the other options. Before making your own solution, you will probably want to start with one of the existing premade solutions. To modify the solution, select an instruction in the program tree, select an instruction in the list on the left, and then select one of the four buttons to add, remove, or replace an instruction in the program tree.

Ant Program Tab 3
;

The Simulator

The simulator tab will show the ant programs in action. To run an ant program you must select a map and a program solution. By default, everything is setup with a map and solution for a simple light weight food collection problem.

You can change the map by picking a premade map from the "Load Map" textbox or you can create your own. You can also choose to use the same map from Tab 1 that was used to evolve an ant program. To create a map, click on one of the map icons and then click the map to place that item. Each map must contain a nest for the ants to start on and at least one piece of food.

Use the "Load Solution" text box to choose a solution to run. You can pick the solution you evolved from Tab 1, a solution you created by hand from Tab 2, or use one of the premade solutions. The premade solutions were designed to run on one of the premade maps.

SolutionMap
Simple Light Grouped Food SolutionThree Food(1) Piles
Simple Heavy Food SolutionSix Weight Food(1,3,6) Piles
Seven Food(6) Pieces
Ten Food(9) Pieces
River Solution w/ Dead AntsOne Food(1) Pile With River
River Solution w/ TreesThree Food(1) Piles River Tree
Heavy Food w/ River SolutionSix Food(5) Pieces Wall/River

The sliders on the right control the number of ants, the pheromones, and the amount of turns an ant will wait for help in trying to lift a heavy piece of food. The Ant Movement Speed can be used to slow down the ant movement to you can see what they are doing.

When everything is set, click the Test Solution button to start the ants.