Jump to content


Question about encoding, decoding and crossover in my scenario?


2 replies to this topic

#1 DXMM2007

    New Member

  • Members
  • Pip
  • 7 posts

Posted 30 May 2007 - 07:35 PM

Dear all,

In my scenario, the gene of each individual is one integer (from 0 to 2^31).

If there were two 8-digit integers, e.g. 60983245, 32467831, they should be encoding to binary string, e.g.

11101000101000011111001101 (60983245), and 1111011110110101101110111 (32467831). How shall I do the crossover for

this two numbers? shall I just pick the random length of the string to switch with the other as cross-over, e.g. combine the first 16 or 17 bits of 60983245 with last 16 or (15 = 32-17) bits of 32467831?

Do you have any comment on it?

B.W.

DXMM2007

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5305 posts
  • LocationBellevue, WA

Posted 31 May 2007 - 06:19 AM

I think the standard way to do this would be to break the 32-bit string into pieces of a certain size, say 4 bits, and for each 4-bit piece choose randomly whether it comes from the first parent or the second parent.

It really depends on your application though. Ideally you want to break it into pieces that control independent features of the agents. The point of crossover is to create offspring that have some of the behaviors of each of their parents, so use whatever makes sense given your encoding of the agent features into bits.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 31 May 2007 - 08:08 AM

http://en.wikipedia....etic_algorithm)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users