* Final Project Documentation for CAP 4800 / CAP 5805 - Fall 2000

--------------------------------------------------------------------------------------------------------------
* Author:   Mark Hannum                                                                                        .
--------------------------------------------------------------------------------------------------------------
  Mark Hannum                                           golScript10.wrl     bkgnd4.wrl    
--------------------------------------------------------------------------------------------------------------

Game of Life 3D



Introduction

It's been a long semester, and this project has been through many permutations. This is it's final form: the functionality has not been expanded from the previous form, but I did spend a good deal of time trying to make it presentable, and am generally pleased with the results.

Please use Blaxxun Contact to view this VRML world--I have not been able to get it to work with any other Browser (when I attempt to view it using Cortona, my computer ususally ends up crashing).

Documentation

This world depicts a three-dimensional version of Conway's "Game of Life", a simple cellular automata. Conway's original was played on a 2 dimensional grid, and followed the following rules:

  1. A cell is born to a square if that square is surrounded by exactly three living cells.
  2. A cell survies to the next generation if it is being touched by exactly two, or exactly three living cells.
  3. A cell dies if it is touching less than two or more than three cells.

In this implementation, we are no longer restricted to 2 dimensions. And although initially the rules are set to imitate Conway's classic version, they may be changed as the user desires. For example, before or even during play, you may change the situation such that a cell could be given life if it were surrounded by 5 or 10 living cells, and could maintain life only if it were surrounded by 14 living cells (this would produce a fairly uninhabitable situation, I think). Such versatility can lead to some interesting experiments, at the very least.

The user can toggle the state of a cell at any time simply by clicking on that cell. Having set up the initial situation as desired, a user would press the "start" cone on the left side of the game board. About every second another generation is produced, and the user can interact with the board as he or she chooses.


Lining both sides of the pathway between the user's entry point and the gameboard are the interactive graphical depiction of the rules. On the left side, numbers are hovering over non-living cells as an arrow points to the right to show the change of state to either a living or a dead cell. Simply put, the floating integer is the number of living cells surrounding this non-living cell. The arrow and changeable sphere shows what this particular situation will produce. Clicking on the right-hand sphere allows the user to change whether a situation will produce a living cell, or a dead cell. The row of cells on the right side of the pathway (shown above) show the production rules for cells which are living, and again, they may be changed by the user as desired.

My personal preference was to stay with Conway's initial set, but I would encourage any user to experiment-- one of the first experiments that I did was to toggle the "0" rule on the left hand (non-living) side. This produces a "spontaneous generation" situation: cells that are surrounded by exactly no living cells are given life. Unless other changes are made, these cells will then die for the next generation, producing a full board blinker. For another interesting game, toggle the left-hand side "1" from non-living to living. This rule, in addition to Conway's original three, produces some fairly aesthetically pleasing designs, I've found.

Method

I created an initial text version of this idea in Java soon after having received the assignment. This version was ideal in a couple of ways, the two most notable being that the board dimensions were mutable, and that the rules were changeable. My original intention (as is documented by the interim deliverables), was (1)to use this engine to implement the final product, and (2) to use this project as a platform for teaching myself xj3d (which I had incorrectly assumed would be as easy to learn as VRML). Unfortunately, I was unable to realize the second intention, but I hoped to at least be able to use the core of the program to interface with VRML using EAI. I was unable to get either of these to work, and resorted, in the end, to hard coding everything into script-nodes. Near the beginning of the program there's a script node DEFfed "gameEngine" which contains the nuts and bolts of this program. I ended up naming each cell individually and "hand searching" each cell surrounding it by name, and then sending the cell's state, and the number of living cells surrounding it to the "rules" function (also in that script node). The "rules" function returns a true or a false, and the variable for the cell in question's future generation (the "newmem" variables) is set to the result of the production rule.

I found that writing java script can be a little qwirky when the scripts are longer. Originally, I was using Cortona, and could not achieve even partial functionality. At the point my computer was crashing, I had reached new heights of frustration. I was completely shocked that simply switching to Blaxxun solved my problems, and became overjoyed that I had something other than a console window to look at.

Initial Pattern Experiments

I mentioned in my last interim deliverable submission that I had been experimenting a bit, and trying to find notable cell formations. I have a few (some more notable that others). All of these use Conway's original rules (if you've changed the rules, change them back, or just reload).

First is the "Artificial Blinker", and it can be made by putting the cells in this configuration:

It's called "artificial blinker" as opposed to "blinker" because unlike Conway's original blinker, the small size of the board limits expansion--the cells in the middle are artificially held in place by the surrounding cells inability to expand, and their formations to mutate.

The next is notable because it achieves stasis quickly:

The four cell configurations seen as a result of this experiment would act exactly the same in Conway's original--I thought it was an interesting correlation. You could slice the middle plane from this end figure and have a normal, legal, game of life board.

In experimenting, I've found that it's generally easier to keep assymetric formations alive longer than symmetric formations--which is not exactly counter-intuitive, and maybe even a little prophetic. This final pattern I call sidewinder.

It's diametrically symetric--it goes through some time before it finally settles to two colonies.

Shortcomings, Ideas for Future Versions

The most annoying and obvious shortcoming in this game is that it is only a 5 by 5 by 5 board, and not even close to being easily expandable. I'm genuinely curious as to what would happen if the board were 10 by 10 by 10, or even 100 by 100 by 100. Unfortunately, hardcoding even a 10 by 10 by 10 board would be ridiculously tedious. A future version might represent the data a little more convieniently. Most other changes would be relatively minor--I'd like to display the current generation number. Also, I'd like to have a button available that would allow the user to clear the board (rather doing it by hand, or reloading).

Conclusion

Overall, I'm pleased. I've learned much from doing this project. I've even delved into areas that, in the end, I did not pursue, and I value the experience and knowledge that I gained even from that. The most fun part of this project, however, was playing with the 3D Game of Life. I found myself hypmotized by the experience, wondering how long a certain pattern would be able to last before going extinct or building a colony and achieving stasis. I wonder why Conway called it the "Game of Life", actually. I know that he used that metaphor to describe his rules ("starvation" leads to death . . . "overcrowding" leads to death), but I'm curious as to what inspired it. My sister plays a video game called "The Sims", in which she interacts with a virtual family. I find myself playing this with the same attitude. For me, the "Game of Life" metaphore has taken on a life of its own. I'm mezmerized by so many complex permutations that can occur as a result of a simple mathematical system--I wonder if the universe isn't governed by an equally simple system, and I wonder if humanity, and all other unfathomable complexities aren't its result.


--------------------------------------------------------------------------------------------------------------