Artificial Creativity

Imagine bringing Antonio Vivaldi back to life from his long lost Viennese grave to write a new violin concerto—just to perk you up while you work. Or maybe, having already listened to every Chopin, Bach, and Mahler piece there is, you would give anything to get your fix of just one more new sonata.

Well, you can… in a sense. But instead of zombie Vivaldi, think robot Vivaldi.

This tune wasn’t written by RoboVivaldi, but it was composed by a machine. EMI (pronounced “Emmy”), is a program written by David Cope, a former professor of music at the University of California, Santa Cruz. Cope “trained” EMI by feeding it a number of existing songs and having it play around with mixing themes, rearranging the musical structures, and tweaking the different dynamics and articulations until it came up with what you just heard.

Artificial Creativity is a branch of Artificial Intelligence that doesn’t get a whole lot of mainstream attention. It’s so fascinating, though, that it earns the honor of being the subject of my first blog post!

Now, you may be asking yourself: “How does a computer even begin to create something like this?” Well, first it would help to understand the creative process. Where do novel ideas come from?

Regular Ol’ Creativity

It turns out that “creativity” is not some magical, serendipitous place. New ideas, unromantically, come from one of (or a combination of) these two methods:

  1. Mixing together old ideas.
  2. Turning an old idea on its head.

As an example of the first, let me show you a picture of my childhood:

Image

The guy who spearheaded the rotating sugar-on-a-stick Spin Pop movement, John Osher, took a look at a toothbrush one day, and thought “Hey! I could totally stick the head of a toothbrush on a Spin Pop and make bank.” And he did.

Taking two simple, separate ideas and putting them together made one new and useful idea. After a couple of years of product development and marketing, he sold the SpinBrush to Procter & Gamble in 2001 for nearly a half a billion dollars. Procter & Gamble then went on to use the SpinBrush to propel their subsidiary, Crest, into becoming the number one oral-care company in the U.S. Not bad, huh?

As an example of the second approach, you’ll notice a bottle of Ketchup on the left—while on the right, you’ll notice a multi-million dollar idea!

Image

Need I say more? Heinz made huge profits in 2002 by essentially flipping the sticker on their bottles of Ketchup upside down, switching in a better nozzle with a cap it could stand on, and thus setting the standard for cleaner, richer, and more convenient condiments around the world.

How do computers emulate this creative process, then? It turns out that this mixing and modification of ideas quite nicely resembles another process in nature that computer scientists have already had experience modeling.

Evolution!

Evolutionary Computation is a sub-field of Artificial Intelligence that attempts to “evolve” good solutions to otherwise tricky problems similar to how a species might evolve to its environment.

There are four branches in the field of Evolutionary Computation.

The most common and most widely-known one is arguably the study of “genetic algorithms”, and is the branch we’ll be talking about. The second most used is “genetic programming”, which is really just an application of genetic algorithms that specifically evolves programs (this can be applied to some fascinating stuff as we may see in a later post). The other two of the four branches are called “evolutionary programming” and “evolution strategies”, and are related, but are also a bit off topic.

Genetic algorithms, to return to our main point, consist of the same four basic processes that are found in natural evolution:

  1. Reproduction
  2. Inheritance
  3. Variation
  4. Selection

A genetic algorithm begins with some initial population of individuals, either randomly generated or from a pool of existing “solutions” (Vivaldi compositions in our case), and every individual is made up of a number of their own gene-like components (musical phrases for us, but potentially geometric shapes or even just strings of ones and zeros).

Then from those members of the population, new child individuals are created. Perhaps not surprisingly, the genes of the children come from a crossover of the genes of some two parent individuals. Along the way, though, we randomly mutate some of those genes, where a mutation could be as simple as flipping a bit from a 0 to a 1, or it could be something slightly more interesting like sorting the notes in a musical passage to have ascending or descending pitches.

The secret sauce that makes it all work is “artificial” natural selection, you might say. Reviewing the produced solutions, the user actively registers which are preferable and which are not. This allows us to keep the fitter individuals and discard rest. Then we start our four-step loop all over again. This process is repeated until we’ve either created something we like or the process has gone through a predefined number of repetitions.

Now, if you give a non-creative genetic algorithm a very one-dimensional and quantitative difference between a “good solution” versus a “bad solution,” you can solve some mildly interesting optimization problems. But! for evolving artistic work, if you give it a bit more leeway and let it explore in different directions, you can come up with some very exciting and creative solutions (or at least artificially creative solutions).

The limiting issue with this inventive leeway, though, is that it becomes very difficult to automate your algorithm’s selection phase (or in genetic algorithm parlance, its “fitness function”). This means that Cope had to sit down and manually rank which pieces sounded better than others. I mean, how do you tell a machine how to judge the “beautifulness” of a poem or a painting, or the wittiness of a joke, or the expositive quality of a novel?

Image

Well… There are, in fact, some clever ways of getting around this issue…

But that’s for another post on another day. In the meantime, happy computing!

Rich