Skip to content

kupad/darwinian-string-evolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

More Giddy Than A Monkey - Darwinian String Evolution

In a lecture on probability and evolution called "Climbing Mount Improbable," Richard Dawkins describes a computer program inspired by the "infinite monkey theorem," that says "a monkey typing at random on a typewriter could eventually write the complete works of Shakespeare."

The program simulates two "monkeys," each generating random phrases, aiming for the target phrase 'MORE GIDDY IN MY DESIRES THAN A MONKEY'.

The "Hoyle monkey" generates a random phrase, checks to see if it matches the target, and if it fails tries again by generating a new random phrase, repeating until it finds a match.

The "Darwin monkey" also starts with a random phrase and checks to see if it matches the target. If it failed to, it "breeds," generating 50 new "mutations" of its randomly generated phrase, each mutation like the original randomly generated phrase with only a single character modified. The mutated phrase that is closest to the target is selected, and tested against the target. The breed/select process is repeated until the target phrase has been generated.

The "Hoyle monkey" will, in practice, never reach the target. (In the lecture, Dawkins gambles everything he owns that the "hoyle monkey" will not succeed any time in the next 10 billion years.)

The "Darwin monkey" will typically generate the target sentence in less then 200 tries.

The simulation is a powerful example of the difference between randomness with and without selection. (Though it's really simulating something more like artifical selection then natural selection).

See the lecture here: https://www.youtube.com/watch?v=YT1vXXMsYak&feature=youtu.be&t=8m47s

About

Darwinian String Evolution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages