Talk:Evolutionary algorithm: Difference between revisions

m
Line 131:
:* I made a rookie mistake in the <code>CHOICE</code> macro. It should be <code>sizeof(tbl) - 1</code>.
:* Mutate rate of 1/15 is too high for long strings. When offsprings mutate too much, the effectiveness of inheriting from a fit parent is suppressed. Think it this way: if <code>MUTATE</code> is 1, i.e. every letter always mutates, you are effectively generating a completely random string every time, and fitness of parent string is ignored. In that case, for a 600 letter string, you have a chance of 1 in 27<sup>600</sup> to match regardless of current parent, and given a 32 bit random number generator, chances are it's never going to happen. Try set <code>MUTATE</code> to, say, 1000.
:* This task is more of a demonstration than a simulation of evolution. It demonstrates how inheritance helps reduce generations needed to improve a species' average fitness to a dramatic level, but don't take it at the face value and think evolution works exactly like it in nature. --[[User:Ledrug|Ledrug]] 11:37, 11 October 2011 (UTC)
Anonymous user