Dreamscape Implementation

2005-10-20 18:02:00

A complete desk

A complete desk flopped outside the red boy.
Boldly the desk swam.
The boy bent into a green telephone.
A obscure ocean

A obscure ocean yelled without the dark box.
Today the ocean oscillated.
The box swam through a noisy telephone.
A white mountain

A white mountain vibrated between the blue telephone.
Patiently the mountain talked.
The telephone acted near a complete fish.

I implemented the dreamscape program mentioned in the book "Computers and the Imagination". Above is some of the output.

The schema file that this program reads is a little different then the one in the book. Here is an example:


A (adj a1) (noun n1)
A (adj a1) (noun n1) (verb v1) (prep p1) the (adj a2) (noun n2).
(^adv av1) the (noun n1) (verb v2).
The (noun n2) (verb v3) (prep p2) a (adj a3) (noun n3).

The information contained in parenthesis tells the program which list to pull the information from and the variable name to assign that information to.

Here is an example of a different schema and it's output:


(verb v1) (prep p1) the (noun n1)
the (noun n2) (verb v2) (prep p2)
(adj a) (noun n3)
walked besides the fish
the cat slithered until
black fish

You can get the code here