I'm hoping to gain a little insight on a particular problem involving gene languages. In my implementation of GA, I've defined my gene language as a binary string consisting of 8 digits. A single gene, then, can represent one of a possible 256 values. For the most part, I won't have 256 distinct objects to be represented by the entire range that my gene can represent. This presents a problem for me when I go to mutate or reproduce chromosomes. The process will usually cause the new chromosome to have genes that are invalid (values that don't represent anything in my language).
For example, say I have 15 objects I want represented by my gene language. That means a valid gene is within the set of all 8 digit binary strings that correspond to the values 0-14. So how do I go about mapping or transforming the other 241 binary strings in the language to one of those in my set?
The modulo operator comes to mind...
Ah, a cyclical method. This was my initial thought. Thanks for the idea.
Here is a C# .NET simulation to demonstrate how Genetic Algorithm work.
This is a very good entry for GA beginner to see CODE level implementation of Genetic Algorithm.
The sample program can be download: