APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Monkey Business: A Genetic Algorithm Model Documents

This material has 2 associated documents. Select a document title to view a document's information.

Main Document

Monkey Business: A Genetic Algorithm Model 

written by Fernando Silva Fernandes

Monkey Business illustrates the reproduction of the famous Shakespeare phrase "To be or not to be, that is the question!" by a simple genetic algorithm.  It was inspired by the American physical chemist Henry Bent regarding the 2nd Law of Thermodynamics: "At room temperature, for example, conversion of a single calorie of thermal energy completely into potential energy is a less likely event than the production of Shakespeare's complete works fifteen quadrillion times in succession without error by a tribe of wild monkeys punching randomly on a set of typewriters."   The model uses successive strings (phrases) from a random population without crossover but mutating, with a fixed probability to match the given phrase. Strings are kept or discarded using a fitness function as described in the documentation.

Monkey Business was developed using the Easy Java/JavaScript Simulations (EjsS) version 5 modeling tool.  It is distributed as a ready-to-run (compiled) Java archive.

Published August 9, 2016
Last Modified September 9, 2016

Source Code Documents

Monkey Business: Genetic Algorithm Source Code 

The source code zip archive contains an XML representation of the Monkey Business Model.   Unzip this archive in your EjsS workspace to compile and run this model using EjsS ver 5.

Last Modified September 9, 2016

OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book