Genesaver

Genesaver is a simple screensaver that consists of a bunch of creatures, each with a unique gene sequence and neural network, living, eating, reproducing, and dying. Each time the screensaver is terminated it saves the genes of every living creature, so that over time you'll see the creatures becoming more and more advanced. I wrote Genesaver because after a lot of searching, I couldn't find anything like it already written. (Since then the ALife screensaver has become a bit more popular, but at the time the only game in town was Conway's Game of Life.)

Genesaver was written using OpenGL and with a little help from Rachel Grey's screensaver tutorial.

Windows installation instructions:

  1. Locate your system directory, which is where screensaver (*.scr) files go. On most systems this directory is either C:\WINNT\System32 or C:\Windows\System32.
  2. Save Genesaver.scr in your system directory.
  3. Right-click on your desktop background and choose "Properties" to get the Display Properties dialog. The "Screensavers" tab will now have an entry for "Genesaver" - choose this and you're done.

FAQ

How does it work?
In a nutshell: all the creatures follow the same basic rules, but have differeing attributes based on their genes. These attributes include color, diet, and neural network values. Behavior is determined by the creatures' neural networks, and ecological role (i.e. what any given creature is able to eat) is determined by color and diet. The creatures are capable of both asexual and sexual reproduction (nothing too graphic, don't worry kids), and over time the fittest will breed, leading to increasingly fit offspring.

My creatures have gotten pretty smart, but now I need to use my computer again and I don't want to lose them! What do I do?
Never fear: by default, each time Genesaver stops running, it'll create a text file called Genes.txt that contains the gene sequences of every creature living at that time. When it starts back up, Genesaver loads up that file and those creatures are restored just as if nothing happened.

Are there any ways that I can interact with the screensaver while it's running?
Pushing the 'c' key while Genesaver is running will switch the camera mode between the "world view", the "chase-cam", and the population graph. When in the "chase-cam" mode, you can push 'v' to view different creatures. While in the world-view camera mode, press numpad '+' and '-' to zoom in and out.

Are there any other ways I can tweak Genesaver?
Tons! Press the "Settings" button in the Windows dialog where you set up your screensaver, and it'll pop up Genesaver's configuration file. There you can make all sorts of changes to the environment and the way it's displayed. (Here are a few examples.) Some of the configuration options can have a drastic effect on performance, so if Genesaver starts running too slowly, try turning some of the settings down a bit.

My Genesaver doesn't look as pretty as the screenshot you have above. Whyzat?
Play with the configuration settings a bit. If you have a half-decent graphics card, I recommend enabling antialiasing and blur trails, since they're pretty. Also, if you have a fast CPU, you might want to try increasing the amount of plant growth, or decreasing the creature size, or both, since these will respectively make the world more populous and more roomy,

My creatures don't behave the same way they used to! Are they broken?
Part of Genesaver's charm is the creatures' behavior is not preprogrammed in the slightest; the creatures have certain physical limits on how fast they can move and what sorts of food they can eat, and their brains are too small to permit for truly sophisticated intelligence, but within those limits they will eventually evolve to do whatever gives them the best odds of survival. As such, your creatures may occasionally exhibit new (and improved, from an evolutionary standpoint) behavior.

What's the deal with this chase-cam thing? What do all the flashing lights and lines and stuff do?
The chase-cam is a very detailed view of one particular creature as it goes about its life; it shows you not only what the creature sees around it, but what (and how) it's thinking! Here's a slightly more detailed explanation.

How does all this artificial life stuff work, anyway?
Artificial life is a fascinating and diverse field; this screensaver is only a very simple example of it, and explaining alife in general is a bit beyond my scope. If you'd like to do further reading on the principles behind Genesaver in particular, the two alife techniques that it uses most heavily are neural networks and genetic algorithms.

Can I see the source code? I'd like to try modifying/porting/studying it.
The source is freely available in the Perforce Public Depot, right here. The Windows-specific code is fairly contained, so porting to other platforms should be a snap; if you do come up with a port, please let me know so I can link to it from this page! All I ask is that you don't claim credit for or try to make money off Genesaver; otherwise do what you will with it.

I tried Genesaver out a long time ago and it looks like you've made some changes since then! What were they?
The old release notes contain a record of changes made since Genesaver was first made publicly available to the time when it was put into the Perforce Public Depot. You can browse more recent changes here.

This is soooo cool! Can I send you money?
HA! Just kidding, nobody's ever asked me that. Not that it wouldn't be nice.

I have questions not covered by this FAQ. Is there no hope for me?
Drop me a line at spamwise at gmail dot com. Questions, suggestions, and feedback welcomed.


Back to the LeadToGold.com software directory