TIP: Click on subject to list as thread! ANSI
echo: educator
to: RON MCDERMOTT
from: SHEILA KING
date: 1996-08-27 18:46:00
subject: The game of LIFE

-> SK>This reminds me of the program I wrote recently to model the game
-> of SK>"Life" as played out on a computer.
......
-> SK>I am considering assigning this as a programming problem to my
-> class SK>this year. Are you familiar with the game? I had seen it
-> before, but SK>never programmed it until last week.
-> I'm familiar with the game, I haven't attempted to program
-> it myself; is it a difficult process?
Not really. I managed the program in a couple of hours. The logic is
fairly simple. It's the details of input/output, correctly counting
loops, etc.. that can mess you up (one of those looping problems had me
going for a while).
-> I'd be inclined to think that it might involve filling a 2
-> dimensional matrix
-> with a repeating pattern, doubling the number of interations
-> on each pass?
Far simpler than that. I used two 2-dimensional matrices, one for the
current generation, one for the upcoming generation. For each cell in
the matrix of the current generation you do a count of the number of
living vs. dead(or empty) surrounding cells (as this is the criterion
that determines whether the particular cell under investigation will
live or die in the succeeding generation), and then mark the cell under
investigation appropriately in the succeeding generation matrix. No
doubling or iterations or recursion or anything like that.
-> Then you map the patterns on the screen matrix in random fashion?
-> Are you planning on including
-> attrition (or consumption) to complicate the doubling
-> process?
Maybe I should have explained the rules of the game first. There is no
"doubling" process in the game in the way you are thinking of (sounds to
me like the typical "exponential growth" taught as an
application/example in high school math classes).
If you're interested in the specific rules, let me know. I'll look them
up and post them here.
--- PCBoard (R) v15.22/M 10
---------------
* Origin: Castle of the Four Winds...subjective reality? (1:218/804)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.