In article <YsCvd.14841$3U4.403540 / news02.tsnz.net>, Robo <robo / mars.com> wrote: >-=-=-=-=-=- > >Hi, I took an interest in genetic algorithm after reading this article: > >http://www-106.ibm.com/developerworks/linux/library/l-genperl/ > >The code listing is here: > >http://www-106.ibm.com/developerworks/linux/library/l-genperl/numbers.html > >To gain a better understanding, I tried the convert the code to Ruby, >and on the way I should be able to understand how it works. > >Unfortunately my lack of knowledge in genetic and Perl means I couldn't >quite get the code working. When it runs, each generation doesn't seem >to improve. It would be great if someone could take a look, compare it >to the original Perl version and see where I've gone wrong, and the fix >require to get it working. The code's attached to this post. > > That's a lot of code. :) If you're interested I've got some Ruby code I wrote for a GA class I took a couple of years ago. At least I know it works (as in there is improvement from generation to generation). email me if you're interested and I'll try to dig it up. Phil