Game of life
Conway's Game of life is a "programming classic" -- a simulation based on a "cellular automata" where simple rules defined for individual cells in a two dimensional grid produce striking patterns a behaviors when performed over time. A classic example of the prinicple of emergence in computer science.
The term Active Essay was used by Alan Kay to describe the use of a "computational objects" embedded within a text. Mitchell Resnick created this "active essay" Exploring Emergence, using executable examples using Conway's Game of Life (and variations) to demonstrate the concepts he describes. The reader / user is also able (and is in fact encouraged, in tutorial style) to make changes to the inputs of the program and thus "test out" and explore ideas beyond those pre-selected by the text.