Context-free

February 26, 2008 at 12:23 am | Posted in artsy, books, computers, design, geeky, internet, school | 3 Comments
Tags: , , , , , ,

Community of Variation
[via Context Free Art Gallery and Community of Variation]

For a computer science assignment last week I wrote a program with a friend in Scheme that generates sentences using context-free grammar. By specifying a few basic rules for parts of speech and including a simple word list, you can get some remarkably coherent results — coherent, that is, in a strictly grammatical, minimalist sense. There’s actually no attention paid to the meaning of the words used, or to their relationship with each other, a consequence of the grammar being “context-free.” We had a few laughs using our program to generate bogus math proofs, but instead of puzzling you with a slew of inside jokes and insomnia-induced geekiness, I’ll point your way to a much more impressive — not to mention amusing — application of the same algorithm, this time used to generate an entire scientific paper. You can even put your own name down as an author! Here’s an example passage:

We question the need for digital-to-analog converters. It should be noted that we allow DHCP to harness homogeneous epistemologies without the evaluation of evolutionary programming [2], [12], [14]. Contrarily, the lookaside buffer might not be the panacea that end-users expected. However, this method is never considered confusing. Our approach turns the knowledge-base communication sledgehammer into a scalpel.
[Stribling et. al (PDF)]

Not too bad for randomly generated babble, is it? I recommend reading the rest of the article, although you might find it more amusing if you have a slight background in computer science. My favorite part of reading this is picking out the grammatical and structural elements that I’ve written into papers before, and have read countless times in other people’s writing. Cynics (i.e. Alan Sokal) might point out that despite this being completely unintelligible, it actually passes quite well for something that could be published.

Context-free EVERYTHING

Probably even cooler than the paper generator, though, is the same idea applied to digital art. Chris Coyne wrote a program, Context Free Design Grammar (CFDG), which will generate an image given a set of rules specifying shapes, colors, and structure. The cool thing here, again, is that the rules you need to write can be incredibly basic. Most of the complexity and beauty of the images comes from the nature of the algorithm, which is based on recursion and a sort of controlled randomness. Unlike fractals, which are specified almost completely by the math used in the algorithm, or like vector/3D rendered art, which are explicitly described by the artist, what is so fascinating to me about context-free art is the way it seems to strike a balance between user and algorithmic control.

When I first started to learn Chinese ink painting (which I later abandoned) one of the most frustrating things was how little of what I envisioned painting actually made it onto the paper. The ink would invariably bleed and scramble arbitrarily over the rice paper in all sorts of ugly blotches and patterns. Then, moving my brush to try and “control” the bleed only made things worse. Only much later did I realize that the point of painting wasn’t to impose your dominance over the randomness, but to let the randomness happen and try to predict it to achieve your artistic goal. Since much of what passes for “digital art” nowadays seems to be bent on enabling the artist to establish totalitarian control over the final product, it’s really cool to see the kind of creativity that CF art seems to offer. Make sure you check out some of the examples in the gallery (also linked to at the very top of this post)!

Advertisements

3 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Love this blog – you say you were up till 1am in the morning. Would you believe this is when I work at my best. More creative I can be due to the peace and quiet.

  2. Yeah, in fact I’m the same way…can’t really think hard unless it’s absolutely quiet all around me. Although I start questioning my priorities when I’ve seen the sunrise twice in one week, both times from the stuffy, unromantic confines of my computer desk.

  3. Hi,
    if you like SCIgen perhaps Terragen [1] is perfect for you. It’s a random based landscape generator. By by and greetings from Germany.

    [1] http://en.wikipedia.org/wiki/Terragen


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: