I've been experimenting with Literate Programming, Excelsior, and spreadsheets, carrying on the topic that I talked about at EuSpRIG 2007. Here at www.j-paine.org/excelsior/repository/spin/spin.xls is a spreadsheet to demonstrate it, that generates SF stories. Select "recalculate" in cell B4, and watch a new story appear in cells A4 downwards.
It contains a graph, i.e. a network of nodes linked by edges. Each edge is associated with a chunk of story text. To generate a story, the spreadsheet starts at a node, randomly chooses one of the edges leading from it, outputs the story text associated with that edge, and then goes to the node at the end of that edge and repeats, continuing until it hits a node with no edges leading out of it. No VBA: this is entirely with Excel functions. The spreadsheet is explained in www.j-paine.org/excelsior/repository/spin/index.html , in which I have tried to follow the kind of expository style often used in Literate Programming.
It's derived from the Prolog story-generator at www.j-paine.org/cgi-bin/spin.php. This has its origins in Gahan Wilson's The Science Fiction Horror Movie Pocket Computer, published in The Year's Best Science Fiction No. 5, edited by Harry Harrison and Brian Aldiss. Anyone who joined the Oxford University AI Society may remember seeing the version on card that we used to stand at our yearly Freshers' Fair desk.
