Genetic algorithm for the infnite monkey problem
The infinite monkey theorem states that if a monkey starts hitting keys at random on a keyboard for an infinite amount of time, he will almost surely type a given text, such as the complete works of William Shakespeare. In fact, the monkey would almost surely type every possible finite text an infinite number of times. However, the probability of this event is so tiny that it will require more time than the estimated age of the universe, but chances of occurrence of this event is not zero.
Check this for more information - https://en.wikipedia.org/wiki/Infinite_monkey_theorem
I have tried to solve the problem by using genetic algorithms.
- Set variable 'target_string'
- Set mutation rate and initial population size
- run>
python ga.py