In genetic algorithms, we have a function called "mutation". Before we call this function, we choose parents.
In my version of the algorithm, when i mutate the child, i don't change the bits which are the same as the given input.
By that, I mean : Imagine we want to reach the string "ABCDE".
The algorithm first generates 5 strings randomly :
"ADDDE", "ABDIO", "MSDKO" , "POIUU" , "QWERT"
The fitness function says that the first two strings, have better quality to survive. So, we select them.
So we have "ADDDE","ABDIO" as parents.
Then we choose a random number between 0 & 4. Assume that 1 is chosen.
We take "AD" from the first string and "DIO" from the second one.
The child we made is : "ADDIO"
Now, The part which makes me confused :
When i mutate this child, I say "A" is in the same place of "ADDIO" as "ABCDE". So, I don't change "A". I mutate the other characters . For example i make "AQWERT","ARTYUI" , ...
Is this correct? Any idea? Any improvement ?