I wrote this tiny python app about a year ago, over the course of a weekend just for fun. I’m sure that someone will find it useful and fun to play with and hack on so I’m putting it out there for everyone to enjoy
Just run it with python, “python flies.py” as long as you have all the gumpf installed it needs
I was going to use this to develop an interesting genetic algorithm system for these flies, allowing them to have predatory eyes or defensive eyes, and give various food sources, having the bottom feeders, feeding off some conways life generated scum and let the whole thing evolve a little… What can I say, sometimes I have the attention span of a newt!

Hmm, seems to be running much slower than it should on my pc. something I should do to speed it up?
For some strange reason it shows up as a static gray empty window for me (using Ubuntu 8.4). Python doesn’t complain about not finding the imports (I think I got the correct gumpf installed though). Screenshot looked pretty neat though
Here, the window stays desperately blank… (well, actually, gray)
“Just run it with python, “python flies.py†as long as you have all the gumpf installed it needs ”
Not sure what the problem is, but it has a lot of trouble drawing anything here. Think one refresh every 15/30 at 1.5Ghz. I can’t actually just let it run at the maximum CPU frequency since it utilizes the CPU so much the temperate will eventually reach critical levels. At 1Ghz all I’m looking at for over a minute or so is a blank screen.
Looks fun though (I think).
Some of you are probably running into this bug in the X drivers.
https://bugs.freedesktop.org/show_bug.cgi?id=15479
Or something very similar, the problem should be fixable by commenting out the section for drawing the visual ranges of the flies.
other than that its up to you to fix it…
I just get a blank white window (depending on the gtk theme I’m using).
Any idea what might be going wrong?
Yes, some profiling showed that most of the time is spent drawing, and esp. the “arc()” call heavily increases CPU usage. This is on Athlon 2600+, with NVidia graphics.
Lowering the number of flies per swarm (in FliesWidget.__init__()) to about 10 makes the whole thing run smooth as well.
Works fine, nice work