dxmm2007 at May 30th, 2007 15:35 — #1
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?
reedbeta at May 31st, 2007 02:19 — #2
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.
dave_ at May 31st, 2007 04:08 — #3