Genetic Algorithm Home Page




Genetic Algorithms are one type of learning algorithms patterened after the processes underlying evolution; shaping a population of individuals through the survival of its most fit members. They view learning as a competition among a population of evolving candidate problem solutions. A "fitness function evaluates each solution to decide whether it will contribute to the next generation of solutions. Then through operations anlogous to gene transfer in sexual reproduction, the algorithm creates a new population of candidate solutions. After evaluating each candidate, the algorithm selects a pair for recombination. Recombination uses genetic operators to produce new solutions that combine components of their parents. The two commonly known genetic operators are as follows:

  1. Crossover: One of the genetic operator is crossover which takes the two candidate solutions and divides them, swapping components to produce two new candidates.
  2. Mutation: This is another important genetic operator. It takes a single candidate and randomly changes some aspect of it.

The genetic algorithm continues until some termination requirement is met, such as having one or more candidate solutions whose fitness exceeds some threshold.

Return to top.

Quick Description on how to run the program

Virtual Reality Modelling Language (VRML) is used for visualizing the Genetic Algorithm program. The student can use this visualization tool to generate the VRML world. To use the Genesis GA system, do the following. Create a directory called genesis. Copy the contents of ~juell/cs724pub/genesis/* to your genesis directory. Change directory to genesis. Type the command setup. For the questions "file name" and "suffix" type f1alt (F1ALT in lower case). For all of the other questions enter a carriage return. The carriage return causes it to use the specified default values. This will run the f1alt example. There are examples 1, 2, 3, 4 and 5. It is expected, that you will take f1alt and modify it so it solves your problem. The file f1alt.c contains two functions: doinit and eval. The function doinit is called once, at the start of processing and can be used to setup variables etc. The function eval has two parameter and returns a double floating point value. The two parameters are a pointer to a buffer and the length of the buffer in bytes. Each byte in the buffer represents one bit in the chromosome. The value returned by the function is the goodness metric for the chromosome represented by the buffer. Genesis does a valley decent, so the lowest possible metric value is the best answer.

After you have modified the f1alt.c, it will generate the "data" file for you. Copy the to your space and compile it with "javac" to create the "gen_alg3.class" file. After compiling, run the java program by typing "java gen_alg", which will ask for the "data" file and then generate the VRML world for you.

Return to top.

VRML worlds of Neural Networks

Return to top.

Resources used for this visualization

Students taking the NDSU CS 724 course do not need to understand the internals of the visualization operation. These links are to help if you are interested in the internals of the visualization process. They also should help if you want to use these visualizations in other environment.

The files used for this system are as follows:

Return to top.