I want to solve a system of n linear equations containing n variables using a genetic algorithm.
I am having difficulty in defining the crossover operation as the solution may consist of floating point values. How do I proceed? It seems possible, but this is my first encounter with genetic algorithms.
Suppose we have to solve
x + 2y = 1
2x + 8y = 3
The answer would be x = 1/2 and y = 1/4.
How do we model the problem?
Update: see if you could decipher anything from the paper http://www.masaumnet.com/archives/mjbas/volume1/issue2/mjbas010205.pdf.
One route is to pick your own floating point representation, which frees you to much with values as you want. Of course, that makes you responsible for implementing arithmetic operations. Perhaps you could find a bignum library you could alter.
You could also decompose platform-native floating points using e.g.
frexpduring the crossover step, then recombine it during culling.