I am learning genetic algorithms. I am trying to demonstrate one GA interation process for the problem as follows: X, Y and Z are the three integer variables ranges between 0 to 3, and there are initial population (Po) given as
x y z
1 0 3
1 2 0
Now I am trying to find the binary representation of the variables and apply crossover and mutation.
x=1 y=0 z=3 001 000 011
x=1 y=2 z=0 001 010 000
Next generation
Crossover
001 000 011
001 010 000
After crossover
010 000 011
001 001 000
I am not sure if I did the two point crossover correctly. Please correct me if am wrong and help me get the result after mutation. So, that I can apply the fitness function to get the best solution found in the next generation.