Jump to content


Genetic Algorithm Gene Language


3 replies to this topic

#1 jdavidw13

    New Member

  • Members
  • Pip
  • 7 posts

Posted 07 January 2008 - 05:07 PM

Hello all,

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?

#2 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 07 January 2008 - 06:32 PM

The modulo operator comes to mind...
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*

#3 jdavidw13

    New Member

  • Members
  • Pip
  • 7 posts

Posted 07 January 2008 - 09:26 PM

Ah, a cyclical method. This was my initial thought. Thanks for the idea.

#4 ahyeek

    New Member

  • Members
  • Pip
  • 7 posts

Posted 30 July 2008 - 10:35 AM

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:
here





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users