Hi there,
The thing is i wanted to realize some genetic algorithms in vvvv. In essence, i wanted to start out by implementing Shiffman’s Nature of Code (Processing) ideas in v4, purely in patch. I wanted to make a fully fledged contribution (would make a great 1st one) with these examples. Think of the possibilities: path finding particles, astroboys who learn to walk themselves, self-patching patches…
It would have been nice to see someone jump in with compute shaders etc. too.
(really excited about node15 btw!)
In the attached patch there’s the first example, working, but not really cool.
The idea is to start with a random population of strings, evalute the ones that are best matching to a certain phrase, cross them, mutate them, repeat from evalutation.
I was surprised how easily you could patch a GA in v4, but then i ran into problem. I have difficulties with the mating process (yeah i know, pun not intended). The patched solution is too messy (big stallones and getSlices), to the point were you can’t really make this for bigger gene sequences. Every extra gene would require some patching; so very unmodular.
Can you help me out? The key would be to get rid of 2 stallones and make this thing (the genes in fact) spreadable.
I already looked into the combinatorics nodes by bjo:rn but couldn’t really implement them. Should i learn c# to write my own node? Is there a way to figure this out in patch? Should i wait for node15 to bug you in person? :)
in excitement to your replies,
Gorg
GA_string02.v4p (99.5 kB)