Question about encoding, decoding and crossover in my scenario?

E724d8394de209a7f094a4d16cdc9cc6
0
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?

B.W.

DXMM2007

2 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 168 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.