Comment

Comment by ahilss

I believe they are using a non-standard crossover operator in this implementation. A standard crossover operator will generate some permutation of the genes of the two parents: either you inherit the gene from your mother or your father. This implementation creates a new gene that is a weighted average of the genes of the two parents. This will probably cause rapid convergence of the gene pool, which may or may not be intended. Changing Math.random() to Math.round(Math.random()) in crossVars would change this to the standard crossover operator. I'd be interested to see how this affects performance.
parent ahilss 16 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton