The Ghost in the Machine


Could a computer ever write poetry?

Paint a picture? Compose a song?

Why is it that we can do these things
but they can't?

What's the difference between 
a poet and a program?

THE GHOST IN THE MACHINE


Functions

A function is a relation between some input and some output.


The add-1 function returns the number that is one bigger than its input.


3 => add-1 => 4

7 => add-1 => 8

The GHOST in the machine


Functions apply to more than math

A poet can be described as a function.

experience => poet => poems

A poet converts experience into poetry.

THE GHOST IN THE MACHINE

This is just to say

I have eaten
the plums
that were in
the icebox

and which
you were probably
saving
for breakfast

Forgive me
they were delicious
so sweet
and so cold

William Carlos Williams


149 characters. 28 words, 12 lines, 3 stanzas.

The poetry is in the selection.

The GHOST IN THE MACHINE


Machine Poets

Could a computer ever select such evocative words, lines and stanzas? 

We'd need to collect every thought and feeling a poet uses to select their words in a program.

That's an immense task. Maybe an impossible one. 

Let's start small. Can we generate rhyming couplets?

The GHOST IN THE MACHINE


(word) => "bird"
(word) => "sky"

(word (rhymes-with "dog")) => "frog"

(word (syllables 3)) => "delicious"

(sentence 
  (words 3) 
  (syllables 5))
=> "delicious bird sky"

The GHOST in the machine


(rhyming-couplet 
  (sentence (syllables 8))
  (sentence (syllables 8)))

(stanza 
  (sentence (syllables 6))
  (sentence (syllables 10))
  (sentence (syllables 6))
  (sentence (syllables 10))
  (rhyme-scheme :A :B :A :B))

deck

By pascalc

deck

  • 865