Looking for a two-color Game of Life on Linux
July 25, 2006 3:23 PM   Subscribe

I'm looking for the source code to a Linux screensaver that plays something like Conway's Game of Life, only with red and blue squares as the cells.

In about 1997 or 1998, the (Slackware) Linux machines in our CS lab at college were set to display random X-Windows screensavers. One of them was a cellular automata similar to the Game of Life, displayed on a black background, with small blue and red squares for the cells. The different colors seemed to fight each other -- if my memory isn't faulty, sometimes one color would take over the board entirely.

I'd like to find the source code for this screensaver, or, failing that, a description of the rules it followed. Does anyone else remember it?
posted by vorfeed to Computers & Internet (8 answers total)
 
Any of these?

If you call The X Windowing System "X Windows" in front of a bearded UNIX guru he'll probably snark at you.
posted by kcm at 4:01 PM on July 25, 2006


All you need are a few simple rules:
For a space that is 'populated':
Each cell with one or no neighbors dies, as if by loneliness.
Each cell with four or more neighbors dies, as if by overpopulation.
Each cell with two or three neighbors survives.

For a space that is 'empty' or 'unpopulated'
Each cell with three neighbors becomes populated.

Then have the initial condition be either random or choose it from a set of conditions that generate interesting patterns (google "Game of Life patterns" for this - you want 'repeating patterns', most likely, or at least long-running ones). Or have "random" be one of the possible initial conditions. You probably also want to make sure that it starts with a new initial condition every so often, either after a given number of moves or on a time limit.
posted by spaceman_spiff at 4:02 PM on July 25, 2006


spaceman spiff, take a look at that question a little more closely. The poster isn't asking how to code up the vanilla Game of Life, they're looking for a different algorithm.
posted by onalark at 4:11 PM on July 25, 2006


Onalark: Oh, right. Missed that.
posted by spaceman_spiff at 4:14 PM on July 25, 2006


Response by poster: kcm: it's not one of the screensavers you linked to, though I think I saw "IFS" and "Julia" in the pack along with the one I'm looking for.

In my experience, "X-Windows" is far more commonly used than "X Windowing System", regardless of its formal correctness, but I'll bring my snark repellent just in case.
posted by vorfeed at 4:19 PM on July 25, 2006


Best answer: the life screen saver on sun workstations set the cell color to the relative age of the cell, red on new, getting bluer as it got older.
posted by plinth at 6:53 PM on July 25, 2006


Response by poster: ah, we did have some Sun 4 machines... the emphasis on the age of cells might make the algorithm "Generations" or something similar. I'll start with a standard Life algorithm that applies colors according to age, and if that doesn't look right I'll try Generations. Thank you, plinth!
posted by vorfeed at 9:54 PM on July 25, 2006


Hey, kcm?

That's "The X Window System", "X11", or just "X"^.
posted by baylink at 7:37 AM on July 26, 2006


« Older StatsFilter: Evidence challenging/contradicting...   |   Taking the mickey (mouse) Newer »
This thread is closed to new comments.