pygame is
Simple DirectMedia Layer is
Site Swing
Genetic Algorithm Photo Survival

Genetic Algorithm Photo Survival - 1.0

Randy Keeton (keetonssu)



This is a genetic algorithm that uses an image as the best possible fitness for survival. It generates a number of random noise pictures, and then mates or selects the next generation with chance of mutation. This is something that takes time to run depending on the size of the picture since the program has to check every pixel of every picture. Sorry I don't have an executable. I can't figure out how to get py2exe to let me use both the console and pygame window. Ill upload a version later will just use that window. For now, here is the source.


Home Page:


click to view original size


Genetic Algorithm Photo Survival - 1.0 - Nov 12, 2008 account Comments

If you wish to leave a comment with your account, please sign in first.

November 13, 2008 6:13am - Carsten Eggers - nickname: (masterlee)
Debian Lenny - amd64. Maybe it is an floating point problem. .1+.1+8 isn't 1.0 it is something less. You will only see 1.0 as rounding result.
November 13, 2008 1:36am - Randy Keeton - nickname: (keetonssu)
What os are you using?
I haven't had that problem.
I'd like to know for future reference.
November 12, 2008 5:23pm - Carsten Eggers - nickname: (masterlee)
Ok change line 190-191 into:
generation = newgen
then it works!
November 12, 2008 5:02pm - Carsten Eggers - nickname: (masterlee) - 3/5
Crasches when you have more than 5 Entities. Wanna have 256

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Oct 1, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

Aug 21, 2015

Aug 16, 2015

Jul 30, 2015

Jun 24, 2015

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)