Friday, May 13, 2005

Evolving robots for next semester: some links

In next semester's intro course I will be again teaching Justin Lieber's Can Animals and Machines Be Persons. In the past, this has meant spending at least two hours of class time dealing with the objection "but computers can only do what they are programmed to do." I don't know why this objection retains its popularity. I haven't seen a computer do what it was told to do in nearly a decade.

Still the objection comes up, and the only thing that seems to quiet it is a discussion of evolutionary algorithms in programming, a spiel derived from Dan Dennett's talk In Darwin's Wake, Where Am I?


For those of you who don't know, an evolutionary algorithm is a process for generating computer software that mimics evolution by natural selection. You start with a set of simple programs for a task and a mechanism by which the programs "mate" to produce offspring that resemble the two parent programs. You can also throw in mechanisms for mutations. In each generation, pick the programs that are best at the task to mate and form the subsequent generations. Given enough time, you will have software that is much much better at the task than anything you could have designed on your own.

Next semester I want to get more serious with this line of thought. I have already decided to cut the number of readings, mostly to make room for exercises in writing and reasoning. But I would also like to add some secondary sources related to the primary sources I'm working with. When we get to the 20th century, and talk about Lieber, I want to do more stuff with evolutionary algorithms. So in preperation, I generating a list of links to relevant materials, which I will share with you, the internet.

First, via /., is this page by someone who implemented evolutionary algorithms using robots made with Lego MindstormsTM. I'm thinking about just making some lego robots that are capabale of evolving and bringing them to class. I've always assumed that I would buy Caroline Lego MindstormsTM when she was old enough. But really, why wait. I already get too much fun playing with her duplos. You are saying "Heck, why not have the students build their own evolving robots?" That would take us too far afield. The issue, really, is the nature of personhood. The robots are just their to break some stereotypes. I'll leave how to build the fuckers to the people in math and CS.

The other, very striking, example I want to go into in depth is David Cope's Experiments in Musical Intelligence project, discussed in the Dennett peice. EMI uses evolutionary algorithms to write classical music. Here is Dennett's description:

When EMI is fed music by Bach, it responds by generating musical compositions in the style of Bach. When given Mozart, or Schubert, or Puccini, or Scott Joplin, it readily analyzes their styles and composes new music in their styles, better pastiches than Cope himself–or almost any human composer–can compose. When fed music by two composers, it can promptly compose pieces that eerily unite their styles, and when fed, all at once (with no clearing of the palate, you might say) all these styles at once, it proceeds to write music based on the totality of its musical experience. The compositions that result can then also be fed back into it, over and over, along with whatever other music comes along in MIDI format, and the result is EMI’s own “personal” musical style, a style that candidly reveals its debts to the masters, while being an unquestionably idiosyncratic integration of all this “experience.” EMI can now compose not just two-part inventions and art songs but whole symphonies–and has composed over a thousand, when last I heard. They are good enough to fool experts (composers and professors of music) and I can personally attest to the fact that an EMI-Puccini aria brought a lump to my throat–but then, I’m on a hair trigger when it comes to Puccini, and this was a good enough imitation to fool me.


Note that this means that you really can insert Bach and Mozart and get out a Mach piece, just like Nigel Tufnel said.

MP3's of EMI's compositions are available for free here. I like the joplin one a lot (more than most real joplin). The Bach sounds like Bach to me, but this is only because it sounds baroque, and my knowledge of music is limited enough that when I hear baroque music that doesn't suck, I guess "Bach." I'm usually right, but that is more a function of the limited repertoire of classical radio and most local ensembles. In any case, my complaint about the pseudo-Bach is actually the performance. The tempo is slow and lifeless.

I'm listening to the opera after Mahler now. It's good.

Cope has four books out based on the EMI project: Computers and Musical Style (1991), Experiments in Musical Intelligence (1996), The Algorithmic Composer (2000) and Virtual Music (2004). Well worth checking out.

During fall semester, the Alexander String Quartet generally comes to campus, performs gigs and visits classes. Last year I jammed some of Plato's ideas on art and censorship in to my intro syllabus in order to get the ASQ to play Shostakovich in my classroom. This time I may get them to talk about EMI. The only problem is that they generally come early in the semester, and the Lieber stuff is late.

Ok some other evolutionary algorithm links:

This general research page was linked to in the comments field at the hack a day site. The people who run the page have actually done some work with legos.

Here's another guy using evolutionary algorithms from the hack a day comment board.

Here's a recent Nature article on a robot that can make copies of itself. Here is the BBC write up.

No comments: