dolphin278 / genetic

Implementation of genetic algorithms for nodejs
179 stars 41 forks source link

Preserve score sum when inverting scores #2

Closed scottcheng closed 11 years ago

scottcheng commented 11 years ago

When looking for minimized fitness, score sum of all chromosomes should maintain the same when inverting the scores, so that the normalized fitness can work.

Particularly, if the sum becomes smaller after inverting scores, then on line 206 there is a chance that level might never reach point, if point happens to be greater than the new sum.

I am using another method of inverting the score which maintains the sum of scores at the same time.

scottcheng commented 11 years ago

Oops I pushed a couple of extra commits to my master which don't belong to this pull request... Opened another request. Sorry :)