Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: MWcybercourse@xxxxxxxxxxxxxxx
Subject: Re: Game of Life
From: Pavel Boytchev <pavel@xxxx>
Date: Fri, 01 Feb 2002 23:55:38 +0200

Hi there,

I looked at the zip file with Life game simulations in different languages. I was impressed by the table, containing numbers of lines for implementations in different programming languages:

096 - C
109 - LISP
120 - PROLOG
136 - BASIC

So, where does LOGO go in this table? Does the Magic of Life sit more comfortable in a LOGO environment? To answer these questions, I've used my favourite LOGO implementation - Elica. Please, accept my sincere appologies - I don't have MW on my computer, but I hope you can easily get the main idea looking at the Elica Logo source.

The program I wrote contains one magic procedure that is (obviously) called "magic". This procedure is used to initialize the grid with a random pattern of 0-es and 1-s. The same procedure is used to "draw" a safeguard of 0-es around the grid. Later on, the magic procedure is used to print the grid, to calculate the next generation and to copy it over the primary grid. So, this magic procedure alone does all the job.

Let's go back to the statistics. The program is only 29 lines long. But 9 of them are comments and empty lines.

I attach a snapshot from the screen. The left window contains the *complete* source of the program. The right one contains the last three generations of the Life game session.

10-20 years ago I used to spend hundreds of hours studying the game Life and the results that other people had found. The two most interesting facts (IMHO) are:

- It is possible to simulate a computer (with blocks of memory, transmission of bits, logical operations)

- By using a computer it is found that there is a configuration of a playground which *CANNOT BE* generated out from any other configuration. This configuration is called "Eden". It is a kind of a configuration for which you cannot reverse time to find its parent -- it just has no parent!

That's my first post in this forum. I hope you will find it interesting although it is definitely off-topic.

All the best,

Bob Gorman wrote:

At 09:56 AM 1/31/2002, you wrote:

I have a student who is trying to create a game of life in Logo. She has a grid down (8x8 for starters) and can mark the squares black or white to begin. Does anyone know a way she can scan the first row in groups of three and then choose an instruction on the basis of the result mark the second row according to a set of rules. Did I ask that question so that it is coherent? Let me try again.

Anyone done this before or have any ideas?

Attached is a collection of source files for "Life" in a variety of languages, plus my early notes on trying to build a cross language translator. There a wide variety techniques to accomplish the same task, a point I like to make with my students.


GIF image

  • Previous by thread: Mandelbrot Music Generator
  • Next by thread: Re: Game of Life

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008