Explore Courses Blog Tutorials Interview Questions
0 votes
in AI and Deep Learning by (50.2k points)

I'm using a genetic algorithm "to learn" the best parameters for a draughts/checkers AI. This parameter is stored in a vector of double.

[x1 x2 x3 x4 x5 x6 x7 x8 x9]

Actually, I do the crossover using two simple methods: one-point crossover and two-point crossover. Unfortunately, in my opinion, these methods are not good enough.

For example, if I have a genetic pool with:

[10 20 1]

[30 10 9]

[100 1 10]

If the theoretical optimum for x1 value is 50 I can't even find it by crossover. My only hope is to spawn a mutation with x1=50 good enough to pass in the next generation.

So, there is a better way to perform crossover with an array of numbers?

1 Answer

0 votes
by (108k points)

There exist a very huge number of possible crossover (and mutation) and the discussion about it is almost infinite. If you want to use that representation (vector of double) then you might want to look at the simulated binary crossover or blend crossover and gaussian mutation operator, they are most likely to help you to find children that are blends of their parent's genes rather than simple exchanges.

For example, the simulated binary with eta = 0.5 will give (there is randomization implied) from those two parents

[30 10 9]

[100 1 10]

The two-child

[52 8 9]

[77 2 10]

Almost all major EC frameworks implement those operators like; Open Beagle, ECJ, DEAP, EO, etc.

Another approach - is not to use a genetic algorithm, but evolution strategy algorithms that change all genes in the chromosome. But this approach is feasible if the number of different gene versions is not very big. So this may not fit your problem with floats/doubles.

If you want to learn more about the Genetic Algorithm then visit this Artificial Intelligence Course.

Browse Categories