19 points · by dragonbonheur · 11y ago · 14 comments
The "genome" per individual is an array of 9000 integers but I used only monochrome pictures with either black or white; An individual also has a fitness score.
There are 1000 individuals in the population and only two are selected to reproduce. So that makes 9 million (yes, MEELION as El Reg would write) data points and the scoring information being processed every time.
There's a 0.002% mutation rate just to keep things going because things tend to stall with monochrome data. A higher mutation rate and the algorithm will never approach maximum potential fitness, apparently.
The code is wildly unoptimized and it's my first draft. I could have used memory pointers to manipulate image data faster but this gets the job done so far. Processing color data takes a lot more time and this program wasn't written for that.
Runs on Windows. The source code needs to be cleaned up, so I didn't include or upload it. As far as i know, this may be sadly the only Genetic Algorithm program so far from the island of Mauritius. Download it here: https://sites.google.com/site/bryanbottebell/bryan-bottebell-s-projects/Imolver.zip
@OP Where is the source?, if you want to share, distribute the source not the exe.
About it being unknown, may I remind you that much of Apple OS X or Microsoft Office are just as "unknown"? Have you read the source of LibreOffice recently?
EDIT: I've included the source in the .zip now. Maybe i should have put an EULA like the "trusted" companies but anyway, you wanted it, you got it. In BASIC.
To the sentiment of the parent; Apple, Microsoft and the Document Foundation are all large entities with years of good faith trust building relationships, where you are "just some guy" on the internet asking people to execute arbitrary code.
I understand you not wanting to release source, but I also understand the parent's hesitation to run your binary.
Good work OP.
That's what VMs are for :p
Or, you can vary the mutation rate with a normal curve -- so say most of the population gets a small rate, but a small percentage gets a wildly higher rate and wildy lower rate.
In nature, immortality doesn't seem to lead to much evolution. remember that immortal jellyfish some japanese scientist discovered a while ago that went back to its polyp phase once it got mature? Besides, sometimes species devolve too in nature. I just accept mortality and obsolescence as they are.
Although, to be fair, in nature you're also not dealing with a static fitness function, a high mutation rate, and there's a wide myriad of other variables that affect the overall dynamics of a population (like sexual vs asexual reproduction, migration, recessive genes, sexual selection, etc)