On Jan 31, 10:43 am, [EMAIL PROTECTED] wrote: > Hi, > > I got some help with this from here, and there's been a little bit of > discussion around GA's recently, so thought I'd post up my likey slow and > clunky version of a GA that in essence just 'evolves' a solution to 'make a > sum that evaluates to n using */+-0123456789' it's a really simple GA that > would be useful for someone who doesn't quite get GA's to look at. > > I think it's simple enough to be fairly self explanatory. > > to see it come up with evolved solutions to n=1000 > > >>>from quickga import * > >>>evolve() > > I like playing with stuff like this. I'm going to use this little toy to > investigate how mutation rates/crossover gene length, pop size etc.. etc.. > interact with each other. All completely unscientifically and for my own > bemusement.
Another interesting technique, similar to GA, is SA or Simulated Annealing. You should be able to adapt your quickga.py program to an SA approach without too much trouble, and comparing the two should tickle your academic bemusement. -- Paul -- http://mail.python.org/mailman/listinfo/python-list