bushi opened this issue on Feb 11, 2004 ยท 45 posts
bushi posted Wed, 11 February 2004 at 3:06 PM
A GA (I'll be using GA for genetic algorithm from now on) uses this concept of chromosomes and genes as a mechanism for solving problems. The image is of a slightly different pose created using PoseGenie. The print window on the right shows the chromosome that was the best solution found when the script was run. You'll notice that down in the listing there is a section titled Genes. Each gene is composed of a body part name, a rotation name and a number that represents the number of degress for the named rotation. I'll get into how PoseGenie uses the chromosome later. I just wanted you to have an idea of what a GA chromosome looks like.
Typically, a GA will start by creating a number of chromosomes with values for the individual genes selected at random. This first set of chromosomes is the first generation of chromosomes. It then uses a fitness function to grade how well each individual chromosome performs at solving the task. Figuring out what the fitness function should test for is one of the more difficult tasks when building a GA. After all the chromosomes are graded, a predetermined number of the fittest chromosomes are selected and saved. Copies of these saved chromosomes are then used in a process called cross-over. Two chromosomes are selected from the most-fit group and the GA goes down the list of genes. At random points through the list, the GA plucks the gene from one chromosome and uses it to replace the corresponding gene in the other chromosome. During the replacement the gene that is being replaced is copied over to the other chromosome. So what you've got is a gene for gene replacement at random points between the two chromosomes. The result is two new chromosomes that have shared characteristics. The new chromosomes are saved and the process is repeated with two different chromosomes from the saved most-fit chromosomes. This process continues till a pre-determined number of new chromosomes are created. (more)