Question about encoding, decoding and crossover in my scenario?

DXMM2007 101 May 30, 2007 at 19:35

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?



2 Replies

Please log in or register to post a reply.

Reedbeta 167 May 31, 2007 at 06:19

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.