Re: [livecode] live genetic programming

From: Dave Griffiths <dave_at_pawfal.org>
Date: Thu, 31 Mar 2005 19:53:45 +0100

On Thu, 31 Mar 2005 01:46:34 +0200, Julian Rohrhuber wrote
> >Thinking about it some more, and discussing this off list - I think that
> >this is actually a pretty promising idea.
> >
> >You could livecode a fitness function that would select from populations
> >of genetic programs that create music.
> >
> >Makes my head hurt tho :)
> >
> >dave
>
> I think this is an interesting topic to discuss on-list. Aren't
> languages ways to make things thinkable that weren't otherwise?

So, genetic programming is about generating code by using biologically
influenced methods of selection and competition. You make a population of
programs, either randomly created, or from a single ancestor, run them all,
select the best one (or a top percentage) - and create a new population by
mutating these programs, or merging them to make new ones using crossover
(also known as sex). After many iterations, you should approach an ideal
you're looking for.

In a simple system like my GP synth, the selection is manual - I'm stepping
though the "semi infinite space of possible noises" manually, and according to
my own whimsy. The populations are only ever 4 big.

The job of a fitness function would be to make this process automatic. It
marks the results of a generated piece of code. This means you can have much
bigger populations, as you don't have to mark them yourself - and you can tune
the selection mechanisms to achieve optimal results.

If a fitness function for scoring music was programmed to score fast melodies
highly, the selected individuals would favor speed, and the population as a
whole would be slowly filled with programs that create faster melodies. If you
could change the fitness function on the fly, your population would react to
the changing pressures and adapt further to gain high marks.

Obviously, the overhead to all this is quite heavy, but ignoring that...

The more interesting problem is how you describe the the music (or whatever)
in qualitative terms that can be used to grade results. If you could devise a
language that would be suitable to this you could hack it live to guide the
evolution. I think of the text adventure game creating language as a possible
model - "make me a tune with 3 notes" ... "add an off beat snare drum, panning
from left to right" ... etc

This may be somewhat like strapping a livecoding interface on to a generative
process, but it may be possible to rapidly program complex applications this way.

There is a lot more on this technique here:
http://www.genetic-programming.org/

ramble ramble,

dave
Received on Thu Mar 31 2005 - 18:57:59 BST

This archive was generated by hypermail 2.4.0 : Sun Aug 20 2023 - 16:02:23 BST