12-31-2005, 03:58 PM
Hi,
That said, I did not do cross-over at bit level because that would tear apart a real number and create a new one most of the time, thus leading to an unwanted mutation. I like to control mutation with the function specifically written for mutation, and don't want to have any similar side-effects when doing cross-over.
Instead, I considered the real values to be atomic and did the crossover around them as you suggested as your third possibility, thus ensuring that the real values are preserved and will only altered by the mutation function.
But all these decisions are directly dependant on the problem you want to solve with the genetic algorithm. There are problems for which bit-encoding is preferred, and others for which real values are better. All will work out in the end, but will converge slower or faster which might be critical. My Athlon 3400+ spent over six weeks of raw computing time evolving my AIs. :blink:
Other decisions are how to order your genes (building block hypothesis), what kind of cross-over you do (one-point, two-point, ...), how to design your fitness function, how to decide who is allowed to generate offspring etc., which might have even more impact than the representation of the genes.
-Kylearan
GenericKen,Dec 31 2005, 09:27 AM Wrote:I'm playing around with genetic algorithms, and I'm trying to implement a phenome composed of real numbers (a data structure as opposed to simple bit-strings).I've recently done something similar; I've used a genetic algorithm with real numbers as "genes" to evolve an AI to play the card game San Juan against, which worked quite well. For those who are interested, the end result can be downloaded on my website.
Quote:Does it make sense to do a bit-crossover on the bit-encodings of the real numbers, or does the crossover function have to take into account the logical structure of the bit-encodings?First, I think any kind of cross-over will work, as genetic algorithms are amazingly robust. Choosing the type of cross-over, the chance of mutation, the data structures for genes etc. will only affect how fast the algorithm will converge.
That said, I did not do cross-over at bit level because that would tear apart a real number and create a new one most of the time, thus leading to an unwanted mutation. I like to control mutation with the function specifically written for mutation, and don't want to have any similar side-effects when doing cross-over.
Instead, I considered the real values to be atomic and did the crossover around them as you suggested as your third possibility, thus ensuring that the real values are preserved and will only altered by the mutation function.
But all these decisions are directly dependant on the problem you want to solve with the genetic algorithm. There are problems for which bit-encoding is preferred, and others for which real values are better. All will work out in the end, but will converge slower or faster which might be critical. My Athlon 3400+ spent over six weeks of raw computing time evolving my AIs. :blink:
Other decisions are how to order your genes (building block hypothesis), what kind of cross-over you do (one-point, two-point, ...), how to design your fitness function, how to decide who is allowed to generate offspring etc., which might have even more impact than the representation of the genes.
-Kylearan
There are two kinds of fools. One says, "This is old, and therefore good." And one says, "This is new, and therefore better." - John Brunner, The Shockwave Rider