ChBaudlaire - artificial poet
Author ANYA YOUNG

Contents
Domain
Illustration
Methods
Conclusions

Domain

Poets deal with language. ChBaudlaire is not an exception. Although at the tender age of 3 months he didn't have time to learn verbs, he already has 34 words in his vocabulary, including some highly abstract notions as "lie" and "cry", which gives me the hope that someday he can develop into real symbolist poet, and therefore can justify the name given to him.

He, of course, knows how to rhyme. Depending upon the phonetic ending of the word, he sorts them into appropriate classes. For example words frog and fog will be in the same class og, which could be represented by the binary relations rhyme(frog,og). rhyme(fog,og).

ChBaudlaire loves adjectives, and values their expressive power. Because of the nature of his poems he needs to deal with two kinds of sensations, the ones people can taste and visible images. He also aware about the correspondence between those kind of sensations, as well as the metaphorical meaning which people tend to give to either one. That is why along with unary relations color (name of the color, number) he keeps track of the mood of the each word (in the relation mood(adj, mood)), anticipating the future task of composing the poem of the certain flavor. So far he has just two moods: up and down, but the possible range is infinite, of course.

And, last but not least there are the nouns - things to taste and to see, which will be used later to prove the point that the real artists don't necessarily have to experience what they write about.


Illustration

Here is some poems ChBaudlaire produced:

relation poem2:


A = white,
B = moon,
C = sweet,
D = spoon ?


A = blue,
B = sky,
C = sweet,
D = pie ?


A = dark,
B = sky,
C = bitter,
D = lie ?


poem1


A = green,
B = log,
C = slow,
D = frog ?


A = green,
B = log,
C = loud,
D = frog ?


A = dry,
B = moon,
C = loud,
D = spoon ?


A = old,
B = crow,
C = old,
D = snow ?

poem3


A = pink,
B = sweet,
C = sweet,
D = dry,
E = loud,
F = green,
G = frog ?


A = pink,
B = cold,
C = bitter,
D = green,
E = dry,
F = old,
G = pie ?


A = grey,
B = bitter,
C = bitter,
D = broken,
E = old,
F = dry,
G = lie ?


Methods

Poem2 matches visual images with taste sensations by choosing randomly the third word in the poem from category cansee and finding the rhyme to it from the category cantaste.


qualityrhyme(A,B):-
A \== B,
random(1,4, R1),
cansee(A,R1),
rhymes(A,B),
cantaste(B,_).

After finding those two words we pick the first word from the KB using relation visual(A,B), in which we choose randomly from the color category.


visual(A,B):-
random(1,10, R1),
color(A,R1),
cansee(B,_).

Now, when we have 3 words we can move on to pick the fourth one, from the relation cantaste(). We do it through the relation tastesensation, and then check the mood of the adjectives.


tastesensation(A,B):-
taste(A,_),
cantaste(B,_).


setmood(A,B):-
mood(A,X),
mood(B,X).

poem2(A,B,C,D):-
qualityrhyme(B,D),
visual(A,B),
setmood(A,C),
tastesensation(C,D).

Poem1 uses random operator more often and gets more interesting results. It uses relation seetaste which chooses 3 words randomly (2 adjectives and the image) and then chooses fourth taste sensation to complete the poem.


seetaste(A,B,C,D):-
random(1,9,R1),
adj(A,R1),
random(1,12,R3),
cansee(B,R3),
random(1,9,R2),
adj(C,R2),
rhymes(B,D),
cantaste(D,_).


poem1(A,B,C,D) :-
seetaste(A,B,C,D).

Poem3 is totally random. Only constraints are the classes of the words. It picks up 5 adjectives and then chooses a noun for them, getting some cute results.


poem3(A,B,C,D,E,F,G):-
random(1,10,R1),
color(A,R1),
random(1,6,R2),
taste(B,R2),
random(1,6,R3),
taste(C,R3),
random(1,9,R4),
adj(D,R4),
random(1,9,R5),
adj(E,R5),
random(1,9,R6),
adj(F,R6),
random(1,6,R7),
cantaste(G,R7).


Conclusions

It was fun to see that that kind of task can be coded. What I observed though, is that the KB should be very carefully thought of. (There were a lot of pitfalls I had no idea about). The ratio of successes and failures also depends a lot on how we implement the search. (And this was a very good excersize, b/c it was hard to understand until I saw how it worked). The search started to become more difficult with the increase of the number of constraints. The set of the successful results was becoming more and more narrow, and the poems became more repetitive with the attempt to establish the relations with the larger number of words in the poem.

All this indicates that there is two problems which would make us to implement search differently. One is to find one or some small number of solutions, and therefore "get to the right place" as efficiently as possible, and the second one is aimed on getting diverse and interesting combinations of the KB elements. The task is to find a balance between those two. And it is amazing how our head can manage with both of them.