Title: A Simple Genetic Algorithm
Description: To run, java Simulation...This is a simple genetic algorithm, designed to introduce people to the concept. The idea of a genetic algorithm is that you have "Chromosomes" and each represents a solution to your search space. You find the fitness Chromosomes out of your population and make offspring with them, thereby making (hopefully) fitter Chromosome. Once you find a Chromosome that is fit enough, you have a solution. What my program does, is take a simple problem and applies a genetic algorithm to that problem. The problem is: find a string of bits (1's and 0's) that contains the maximum number of 1's for a given length. It's a trivial problem but it helps to learn about genetic algorithms. Hope this is useful to you.
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=3722&lngWId=2
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.