Music AI Program

Peter Hansen peter at engcorp.com
Sun Dec 15 15:28:35 EST 2002


Joel wrote:
> 
>     I've been trying to get a genetic algorithm program started, for
> creating guitar riffs. You train it by telling it if the riff is good or
> bad, and what notes make it sound good or bad, and it adjusts its algorithms
> accordingly. It selects different scales and styles, different moods etc.

Not answering any of your questions, but a comment or thought on 
using genetic algorithms...

You indicate you are telling the GA if the riff is "good" or "bad",
which is presumably an expression of your fitness function, probably 
with a range of responses so there is a gray scale rather than just 
black and white.

You also say you actually tell the GA *which* notes make it sound
good or bad.  In my experience with GAs, this might be sort of 
overspecifying the fitness function, so to speak.  The GA knows 
what it's doing, so you might consider letting *it* figure out
which notes are good or bad.  Otherwise you may actually find you
are fighting against it, as it homes in on the notes which 
*really* sound good, while you're possibly being inconsistent or
something and telling it "no, *these* notes are what makes it
sound good".  If it's not finding the right notes, you maybe 
should adjust the weighting on the importance of "the right notes"
in the evaluation of the genome.

In other words, you might consider sticking *just* with the fitness
function and letting the GA make the choices about which variables
to vary.

Just a thought.  (If I misinterpreted what you're doing, just
ignore me. :-)

-Peter



More information about the Python-list mailing list