I'm developing a genetic algorithm to find the optimal connections between points (minimizing distance). Let's assume we have two lists of points:
sources = {s1, s2, s3}
targets = {t1, t2, t3, t4}
I decided to represent the genome as a 2D binary array, where:
- rows represent source points
- columns represent target points
- 1s represent the connection between source and target
This representation implies that each column and each row in the matrix can have at most one 1s.
Now I'm struggling to find a crossover operator which preserves the integrity of the solution.
example:
parent1 :
[0][1][0][0]
[0][0][1][0]
[1][0][0][0]
parent2 :
[0][0][1][0]
[1][0][0][0]
[0][0][0][1]
offspring : ???
Any suggestions?