Quantcast
Channel: Machine Learning
Viewing all articles
Browse latest Browse all 63805

Genetic algorithm crossover operator for a fixed number of "on" chromosomes?

$
0
0

I want to create a crossover operator for a genetic algorithm, such that exactly N genes are active in each of the offspring (exactly N genes would be active in each parent as well). Say that I have two parents, the characteristics of which are represented by bit strings of boolean values, e.g. :

[1,0,0,0,1,1,1,0,0,1] and [1,1,1,0,0,0,1,0,1,0]

Five genes are "on" in each parent; I need the offspring to also have exactly five genes (bits in the bit string) on or active. Choosing a cut point and swapping sections won't work, nor will iterating over the positions in the chromosome and assigning a bit from either parent based on probability (both of these approaches could result in more or less than five positions being active).

The alternative I can think of would be to combine all the ON genes from both parents in a pool, and randomly select five from that pool (if a gene is active in both parents, double the probability of it being selected). Is this a good solution, or am I overlooking something really obvious?

It seems like it sucks a bit, as with most other crossover schemes I've seen, if a gene is active in both parents it's guaranteed to be active in the child. Unless I coded this behaviour into the probabilistic selection (i.e. select all genes that are in both parents as mandatory "on", then select the remaining positions randomly from the pool from both parents?).

I feel like I've solved this problem before, but it's been a while since I've played with a GA; thanks in advance for suggestions/comments!

submitted by CunningPlant
[link][3 comments]

Viewing all articles
Browse latest Browse all 63805

Latest Images

Trending Articles



Latest Images