Life Program -- Life Program

Start of home page

You can get a copy of a free life program, if you like. Remember to select the load to disk option, if necessary. The program is a compressed zip file and the file size is 32072 after unpacking.

I've spent hours watching the program run, partly during the time when it was originally being developed. Usually there's a hope that a sequence will continue and an opportunity to see history, war, travel, and sports in a different light. The program runs continuously on the full screen.

I wrote most of the program during the time of June 1994 to April 1995. When I first thought of the "life sequence" itself being "watched" on the screen, it was pretty exciting. I don't think that the life algorithm should advance the cause of thinking that biological life and all other matter and space are the result of unauthored or self-authored events. Some people think that because the simple "life" rules can produce an apparently complicated process that that is evidence that real life and biological processes could have originated from very basic survival rules. Yet the elements in the life game are not affected at all by any of the processes that they go through. Rules are applied to items in the array, and the conservative nature of the rules causes changes to happen through the cycles. If the rules removed or added items quickly, then the result would not be so many changes. Since the life algorithm became part of computer science's domain, other more involved algorithms have been devised that incorporate more changes into the objects in the process.

Jeff Prosise who writes for some of the computer magazines wrote a C++ life program for Windows that I used some in deciding how to process the array of points. Leor Zolman wrote a life program and improved the quickness through adding to surrounding points from active points rather than adding to each point for any possible surrounding points. Credit for the algorithm itself is given to Ward Christensen who mentioned it to him. What I learned from the programming examples improved the program.

After getting a glimpse of how to solve certain problems like detecting the last of a cycle and the location of greatest activity, most of the program development was fairly easy. I actually got a lot of confidence and ideas by just listening to my pastor at church and walking home with a contented mind! The greatest difficulties were being "off by one" in dealing with the array space and not clearing the border around the life array when the program counted on it not affecting the calculations. "Off by one" means being off in counting by one; it often is due to things like counting from 1 instead of from 0. The greatest problem was dealing with the dread of how was I going to move from two integer arrays to one character array. It wasn't as difficult as I thought, and the result was faster as well as allowing much more memory space for the one array. It would be neat to find out if the "life sequence" can be calculated back one generation. It's not as easy as going forward :) yet it would be interesting to see if a certain life sequence could be reached from different "histories".

The program requires a DOS operating system and a VGA monitor and card, and doesn't check for VGA. The main reason the VGA is needed is because the program operates in 50 X 80 character text mode. The program is free and is intended to be interesting and possibly educational; it isn't guaranteed to work, though I've never seen the operating version not work. The program manages an array that is nine times the size of the screen and is supposed to move toward the area in the array where the most change has recently occurred. That works out to be a lot of computations. The program runs OK on a 486 66MHz PC; it may seem slow on some other machines.

The program was developed originally in Qbasic and then compiled in Power Basic. Then I wrote a one-screen version in C. Then eventually I developed the program further in Borland C/C++ 3.1. The program here is compiled with the Watcom compiler using the small memory model, one of my chief constraints, since Watcom executables are the fastest based on C source that I've seen, and the small memory model is the only version of the Watcom compiler that I own. This might mean something to C programmers! As I see it now, the source code is not available, though I think that I would be willing to explain the procedures that are used.

The program writes two files, life.max and life.min, that show the starting points in the maximum and minimum life sequences, selected on the basis on the generations before a sequence is considered to be finished. Right now, there isn't a way to use the data in the files to start a new life sequence.

Typically, the program recognizes when the items within the total array have reached the last of the sequence and gives a report on the numbers of generations and the PC timer counts that it took to reach that point. Then a new cycle starts. The program doesn't recognize when "gliders" are moving across the screen, so that affects detecting the last of the sequence.

"Life", in computer science terms, is an algorithm designed by John Conway, now of Princeton University. It consists of two basic rules that govern the changes to items in a two-dimensional table. If an item has two or three neighbors, then it continues in the next "generation". If a cell on the table does not contain an item, if it is surrounded by exactly three neighbors, then it is set for the next generation.

The terminology varies, with words like cell for item and alive for set or continues being used.

From these simple rules, complicated interactions arise. Actually, the interactions are always explainable by the simple rules; however, the array of cells seems to have a life-like sequence of changes.

To me as a person, I believe that life is very much dependant on how we're thinking. The same day can be "filled with treachery" or light-hearted, based on thoughts, and thoughts can be based on hearing a branch scratch across the rooftop or accomplishing an important task or not having an important task. So life isn't experienced automatically based on what's around us, and our choices affect us.


JPF