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
Feb 21, 2017

Jan 31, 2017

Jan 24, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

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