Download Game Of Life: A C# lesson for free. Game of life is a c# lesson in object oriented programming. It provides places to write code which is Object Oriented and work on AI routines, Multi-threading and least importantly, fun. Game of life gives you the chance to go through a whole life in one day.
What is the Game of Life?
by Paul Callahan
Rules of the Game of Life
Life is played on a grid of square cells--like a chess board but extending infinitely in every direction. A cell can be live or dead. A live cell is shown by putting a marker on its square. A dead cell is shown by leaving the square empty. Each cell in the grid has a neighborhood consisting of the eight cells in every direction including diagonals.
To apply one step of the rules, we count the number of live neighbors for each cell. What happens next depends on this number.
Note: The number of live neighbors is always based on the cells before the rule was applied. In other words, we must first find all of the cells that change before changing any of them. Sounds like a job for a computer!
In Life, as in nature, we observe many fascinating phenomena. Nature, however, is complicated and we aren't sure of all the rules. The game of Life lets us observe a system where we know all the rules. Just like we can study simple animals (like worms) to discover things about more complex animals (like humans), people can study the game of Life to learn about patterns and behaviors in more complex systems.
The rules described above are all that's needed to discover anything there is to know about Life, and we'll see that this includes a great deal. Unlike most computer games, the rules themselves create the patterns, rather than programmers creating a complex set of game situations.
Ever since Adobe gave Premiere an overhaul and added the Mercury playback engine to speed up workflow alongside an ability to add nearly any video clip to the timeline without any need to transcode it before hand, it's gained wide acceptance. Adobe premiere pro video effects plugins.
Life PatternsA good way to get started in Life is to try out different patterns and see what happens. Even completely random starting patterns rapidly turn into Life objects recognizable to anyone with a little experience. In this section, we follow a simple-looking pattern called the R-pentomino. It starts out with just five cells, but gets complicated very fast. We can see many of the early discoveries in Life just by running this one pattern in the applet. (click Download Free The Game Of Life Diversity Activity For ClassicGo to start the pattern, see Applet Help to single-step and other control features)
The R-pentomino is the first pattern Conway found that defied his attempts to simulate by hand. In fact, the pattern eventually becomes 'stable' or easy to predict, but this does not happen until 1103 steps have passed. Some of the earliest computer programs for Life were written to determine the fate of this small pattern. This was a challenging problem for many computers of that time, but a modern PC can run the complete sequence of steps many times in one second. Even the applet can run this pattern very fast, but you should slow it down enough to watch it carefully. Try drawing your own patterns on the grid to see what happens. (Applet help)
What Kinds of Objects Emerge in Life?
Still Life Objects
Some of the most common objects in Life remain the same from step to step. No live cells die and no new cells are born. Conway, who is fond of making puns, called this kind of object a 'still life.' You can observe several of these objects by running the R-pentomino in the applet. For an object to be a still life, every live cell most have 2 or 3 live neighbors, and every dead cell may have any number of neighbors except 3.
The most common still life is called the block. It is simply a 2x2 square of live cells:
You will see it appear many times as you run the R-pentomino. Every live cell has exactly three neighbors, but no dead cell has more than two neighbors.
Some other still lifes you will see are:
Look for these in the applet, and try to understand why these objects remain the same. You can design still lifes by hand, and it makes an interesting puzzle. Some people with a lot of experience are good at designing still lifes, but usually computer search is used to find new ones. All still lifes of up to 20 live cells have been enumerated this way. OscillatorsOscillators are objects that change from step to step, but eventually repeat themselves. The simplest kind are period-2 oscillators, or those that repeat themselves after two steps. The most common is the blinker, which consists of three cells:
You will see a lot of these when you watch the R-pentomino.
Another common period-2 oscillator is the toad:
You can see this one in the R-pentomino, but you have to watch carefully! After 737 steps, a toad briefly appears at the far right of the pattern. It is destroyed by a nearby explosion after just 14 steps.
GlidersIf you've been following the R-pentomino in the applet, you've probably noticed that some of the objects are moving. This was one of the most exciting early discoveries in Life. These common moving patterns, called gliders, consist of just 5 cells:
(Click Go to start the pattern) Follow this pattern along for four steps in the applet. Or, to really understand what's going on, apply the rules by hand as Conway did. You will see that after four steps, it looks just like it did when it started. The only difference is that it is shifted along a diagonal. Repeat this process, and you have a moving Life object, which in general we call a spaceship. Remember, the rules said nothing about movement; moving patterns just appear. This is a simple but convincing demonstration of emergent complexity.
The Queen Bee Shuttle
A very important pattern makes a brief appearance after running the R-pentomino for 774 steps:
It doesn't last long in these stormy surroundings, but you can enter it into the applet by itself and watch what it does. First it moves to the right, but after a few steps, it produces the still life called a beehive and turns back to the left. Then it produces another beehive to its left and turns right again. Conway called this pattern the queen bee shuttle for this reason. Unfortunately, the next time around, it crashes into the first beehive it created. But we can get rid of unwanted beehives using a block:
If you run this in the applet, you will see that the beehive goes away but the block remains. By putting a block on either side of the queen bee, we can cause it to shuttle back and forth indefinitely. This is a period-30 oscillator, since the shuttle moves for 15 steps in each direction. Later, we will see how this pattern was used to answer an important question about Life.
Other Interesting Objects The orthogonal spaceships move left, right, up, or down instead of on diagonals like gliders. These are much less common than gliders, but very important in certain kinds of patterns. They come in three sizes:
There are some early discoveries that do not show up in the R-pentomino, but which sometimes show up from random starting states.
The following pattern becomes a very pretty period-3 oscillator called the pulsar:
Do All Patterns Stabilize Eventually?
We say a pattern has stabilized when it becomes obvious that the population has stopped growing. For example, we say the R-pentomino stabilizes at step 1103 because at this point it consists of just gliders and oscillators, and it is clear that the gliders will never collide with each other or with any oscillators. It was observed early on in the study of Life that random starting states all seem to stabilize eventually. Conway offered a prize for any example of patterns that grow forever. Conway's prize was collected soon after its announcement, when two different ways were discovered for designing a pattern that grows forever.
The first of these patterns is the period-30 glider gun, which is based on the interaction of two queen bee shuttles. Where these shuttles collide, instead of producing beehives, they produce a new glider. This glider moves away in time for the process to repeat itself 30 steps later.
[no button] (click Go to start the pattern)
Another kind of pattern that grows forever is called a puffer. Unlike the glider gun, which remains stationary and produces moving objects, puffers move while producing objects, which may be either moving or stationary. Here is one of the simplest, and earliest puffers.
[no button] (click Go to start the pattern)
In recent years, many new puffers and guns have been discovered or invented.
Finally, here's a pattern, called the spacefiller, that grows as fast as the rules of Life can allow. It is not at all like the kinds of Life patterns that result from random starting states, and would never have been discovered without the aid of a computer search. It's a very recent discovery compared to the patterns described above, and was not known until 1993. How Complex Can Life Get?[no button](click Go to start the pattern) A computer can be built inside the Life 'universe'. Space does not permit a detailed description, but you can find much more information in some of the references given at the bottom. Briefly, streams of gliders and spaceships can be used to send information just as electrical signals are used to send information in a physical computer. These streams of gliders can react in a way to perform all of the logical functions on which a modern computer is based. It would be very impractical to build a computer this way, but given a large enough Life pattern and enough time, we could run any program that runs on a computer. Several interesting special-purpose computers have been constructed as Life, including one that outputs the prime numbers.
A universal constructor can even be built. This is a pattern that can take a blueprint for some other Life pattern (or its own) and build that pattern. No one has built this yet, since it would be very large, but it has been shown to be possible. This means that Life patterns could exist that reproduce themselves. They could even modify their blueprints just as living things combine and mutate their genes. Who can say what would develop in a large enough universe of reproducing Life patterns?
What is Life Good For?
Studying the patterns of Life can result in discoveries in other areas of math and science.
The behavior of cells or animals can be better understood using simple rules. Behavior that seems intelligent, such as we see in ant colonies might just be simple rules that we don't understand yet. Take a look at this simulation of termites piling up woodchips. (click here) There are only 2 rules in this system, and yet, a seemingly 'intelligent' pattern emerges. What does this say about the nature of intelligence?
Traffic problems might be solved by analyzing them with the mathematical tools learned from these types of simulations. (Unjamming Traffic with Computers)
Computer viruses are also examples of cellular automata. Finding the cure for computer viruses could be hidden in the patterns of this simple game.
Human diseases might be cured if we could better understand why cells live and die.
Exploring the galaxies would be easier if machines could be invented that could build themselves. Imagine sending a probe to Mars that could build a copy of itself. Although this is theoretically possible, it hasn't been invented yet!
Is Life Alive?
Would living creatures evolve in a sufficiently large Life universe if we waited long enough? We can see that Life, simple as it is to describe, exhibits much of the complexity of our own universe. It is intriguing to ask what would happen in an infinitely large Life space seeded with random patterns. It seems that likely that complexity would emerge beyond what we can see when we watch Life on a computer. Even in our own universe, there is a huge difference between what we know about natural history and what we can observe on a human time frame.
On the other hand, Life has only two dimensions, unlike our own universe, and that is a severe limitation. There are other properties of Life -- the tendency to stabilize locally into oscillators -- that may make it an unlikely place for living things to develop. The answer to this question remains unknown, but Life illustrates at a simplified level the kinds of evolutionary forces that we witness in our own universe.
Bibliography
Berlekamp, Conway, and Guy: Winning Ways (for your Mathematical Plays), Volume 2, (c)1982. ISBN 0-12-091152-3. Gardner, Martin: Wheels, Life, and Other Mathematical Amusements, (c)1983. ISBN 0-7167-1589-9. Poundstone, William: The Recursive Universe, (c)1985. ISBN 0-688-03975-8.
About the Authors
Paul Callahan - text Paul's Page of Conway's Life Miscellany - Patterns, how to create your own pattern files, and links to other Life pages.
Alan Hensel - applet
Alan Hensel's page - more about the applet and more patterns. Download Free The Game Of Life Diversity Activity For ClassifiedsOther Wonders of Math
Applet Help
Buttons Download Free The Game Of Life Diversity Activity For Classroom
Troubleshooting
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |