Random Monkey vs. Evolutionary Algorithm

This demonstration shows how completely random keystrokes (the “Monkey”) struggle to find a specific text, while a genetic algorithm with random mutation plus selection can reach that goal much faster.

In real evolution, there is no "predetermined target text". Here, the "target text" is just a simplified representation of environmental fitness.

Settings

Monkey Settings

No special parameters here. Each random string is compared to the best so far; if better, it becomes the new best.


Evolutionary Algorithm Settings
Important Note:
  • Monkey: Even if it finds a correct character, there’s no guarantee it remains. Only the best individual is stored.
  • Evolutionary Algorithm: The population undergoes crossover and mutation each generation, progressively seeking higher fitness.
  • Compare these two processes to see how natural selection can dramatically outperform pure randomness.
Monkey Process
Pure Randomness
No best string yet...
Number of attempts (Monkey): 0
Target Fitness: 0
Evolutionary Algorithm
Directed Randomness
No best string yet...
Generation: 0
Estimated Time (Maymun Yıl): 0
Target Fitness: 0

Note: Neither approach fully models real-world evolution, since in nature there is no "predetermined target". Selection favors better adaptation to the current environment over generations, leading to complex changes. This example simply illustrates how "randomness + selection" can vastly outperform pure randomness. We assume an average monkey lifespan of ~32-35 years for demonstration.