We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Genetic Algorithm
Page Index Toggle Pages: 1
Genetic Algorithm (Read 2246 times)
Genetic Algorithm
May 7th, 2006, 2:42am
 
As I'm researching this for my latest project I've decided to upload a Processing version of code I found here which is a demonstration of a tutorial.

Basic Genetic Algorithm

Since I may add new GA developments and research to this thread I would like to mention Blprnt's Darwinstruments which are a nice artistic example of what you can do with genetic algorithms.

I personally will be researching the opportunity to create L-Systems that breed using the GA.

If anyone else has interesting links about GAs, please add to this thread.
Re: Genetic Algorithm
Reply #1 - May 8th, 2006, 6:20pm
 
Thanks for the link!

I'm working with a lot of GA projects right now - I just came back from a conference on Evolutionary Computing in Art and Music and I am really inspired.

Evolving L-systems is definitely possible. The key I think is to use a branch-replacement crossover rather than a segment replacement crossover or something similar. Combined with a mutation this could yield interesting resuts.

Of course the trickiest bit is always determining the fitness function - what makes one L-system 'better' than the other? I avoided this question with the first version of Darwinstruments by making the system an IGA (interactive Genetic Algorithm) in which the fittest individuals were selected by the user. In the next version I want to give the computer the ability to select the individuals that it determines to be the fittest.

I did a fair amount of thinking about this with my L-system trees - trying to think of a simple test for fitness. I couldn't really come up with anything. However, with my train implementation, I would like to use traffic flow as a fitness test - might yield some interesting results.

Anyhow, your project sounds interesting. If I can help you out inn any way, let me know...

-Jer

Re: Genetic Algorithm
Reply #2 - May 8th, 2006, 6:22pm
 
I found this link incredibly helpful:

http://cs.felk.cvut.cz/~xobitko/ga/
Re: Genetic Algorithm
Reply #3 - May 8th, 2006, 8:38pm
 
Here's something I was messing around with a while back. Your post inspired me to dig it out and upload.

http://www.mark-hill.co.uk/p5/GeneticStrings/

I'd like to be able to implement this on a larger scale, but this implementation would require enormous buffers for much larger text. Does anyone have any ideas on how to improve it in this regard?
Re: Genetic Algorithm
Reply #4 - Aug 31st, 2006, 9:08pm
 
Found a GA link (lots of dead links in it unfortunately but some fruit still fresh).

http://www.red3d.com/cwr/evolve.html

This has been driving me up the wall for weeks but it's finally here. The GA Library 1.0.

http://www.robotacid.com/PBeta/GALib/index.html

It looks fairly ugly because I wanted it to be as flexible as possible and I decided to keep all properties hidden like the books tell you to.

There's a few things missing like recalculating the bit masks when changing traits (upload and notice afterwards syndrome). And I haven't played with sorting the genePool (implements Comparable) as TomC's AStar interpretation gave me the thought that that may come in handy.

Harsh criticism is appreciated - I want to get this little bugger right.

I'm not sure whether it's an appropriate solution for mark_h's genetic strings though, the cross over and mutation in the dna is happening on the sub-integer level. Perhaps I should account for this...
Re: Genetic Algorithm
Reply #5 - Sep 3rd, 2006, 4:42pm
 
Wow, looks awesome. . . Hooray for genetic algorithms!

Here's another reference with some Processing GA code if anyone is curious:

http://www.shiffman.net/teaching/the-nature-of-code/ga/
Page Index Toggle Pages: 1