|MWForum Message||[Date Index] [Threads] [Authors] [Attachments] [Subscribe]|
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 190 - FORTRAN 282 - TPU FORTH
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, Pavel
Bob Gorman wrote:
At 09:56 AM 1/31/2002, you wrote:
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.