Thursday, October 9, 2008

Poetry in Motion

http://www.codeasart.com/poetry/darwin.html

Darwinian Poetry anyone? Software engineer David P. Rea designed “an experiment in collaborative composition based on genetic algorithms” that aims to create new poems using a modified form of natural selection.

Simply put, the idea is to create, or to evolve, new poems from 2 parent poems (species A and species B), using “non-negotiated collaboration.”

The program presents the user with two poems (“abysmal pieces of nonsensical garbage”) from a set of 1,200 randomly generated groups of words. Once the reader selects his/her preference, the program duplicates each parent and randomly chooses a "snip" point, where each poem is then cut. Next, the software combines the snipped portions of the parent poems, resulting in two new poems.

Rea describes the program in this way:
The Darwinian Poetry software relies primarily on a mechanism called "crossover", similar to the process that operates on chromosomes in biological evolution, except that here the basic genetic units are words rather than nucleic acids. When the program sees that there is room in the population for new poems (because some unfit poems were...um...culled from the herd) it chooses randomly, albeit weighted by popularity, two surviving poems to serve as parents. These two poems are cloned then crossed over, producing two new offspring.
For basic descriptions of crossover techniques and genetic recombination, please see http://en.wikipedia.org/wiki/Crossover_(genetic_algorithm)
and http://en.wikipedia.org/wiki/Genetic_recombination.

Rea notes that voter selection “[kills] off the "bad" [poems] and [breeds] the "good" ones with each other. …Over time the poems users select will interbreed. …If enough generations go by, and if the gene pool is rich enough, we should eventually start to see interesting poems emerge.”

Mutations, whereby word position within a line segment can change, occur about 10% of the time. As we know, mutations are important sources of new variation for natural selection to work upon.

In addition, it’s possible to track a poem’s lineage, and to see how many generations it has “lived”. Most poems, though not all, tend to be much shorter in length than their parents.

Though the Discussion Boards shut down in 2004, they remain a good place to sample the types of poems that “evolved”. If you’re interested in participating in this project, voting remains open.

Sample Random Poem, #5:
Track this poem’s offspring here: http://darwinianpoetry.com/servlet/ReportingServlet

distance
she that her
don you preferred lot
to I long
stoops laughing in
who a cup but

Sample Evolved Poem, #17717:
Track this poem’s lineage here: http://darwinianpoetry.com/servlet/ReportingServlet?action=showPoem&id=17717

you lie beautiful
beating beyond love
imagine
beneath chairs
dark stars magic
everything frozen strangely in
you

Rea explains that “breeding two poems won't necessarily produce a better poem. In fact, if either poem is any good to start with, it will probably produce a worse poem. But sometimes something better will be produced, and such offspring will tend to survive a long time, producing many more offspring. Evolution is all about preserving those rare beneficial developments amidst a sea of failed genetic experiments.”

Poetry may not be the realm Darwin had in mind to test his ideas about natural selection and evolution, but Rea’s program competently illustrates the concepts. Of course, natural selection is not a matter of conscious choice in nature, nor is it so simplistic. However, just as life complexifies over time in nature, these Darwinian poems did evolve from previously random words gaining meaning and complexity over time, some being species worth a read.

Roxanne Enman

No comments: