mmcirvin: (Default)
[personal profile] mmcirvin
I went looking for a good Conway Life implementation for modern Macs and found a Java applet.

This really makes me feel old: I remember when you had to push a PC to its absolute limit to get a fraction of this kind of performance, and William "Big Secrets" Poundstone wrote a book on cellular automata that described the life of the R-pentomino as beyond the capability of current PCs to handle (I don't think that was actually true even at the time).

The most interesting Mac cellular automata program was an old System 7 one whose name I forget that actually included a Pascal-like programming language for the cell rules, so you could do far more complex things than most CA programs will let you do. The language had a random number generator in it, so there could be a stochastic element. I remember coming up with models that exhibited things like domain walls and phase transitions.

Date: 2006-02-11 10:40 pm (UTC)
From: [identity profile] ammenemes3.livejournal.com
Like akin to the Wolfram Classes for CA behavior?

Date: 2006-02-11 11:29 pm (UTC)
From: [identity profile] mmcirvin.livejournal.com
More like statistical models of spin systems, or stochastic field theories.

Date: 2006-02-11 11:31 pm (UTC)
From: [identity profile] mmcirvin.livejournal.com
If you want more horsepower than this applet can manage, there's an open-source native project called Golly (http://golly.sourceforge.net/) that looks interesting. One of the authors previously produced OzTeX, an old Classic Mac TeX implementation that I used to write my doctoral thesis.

Date: 2006-02-12 12:01 am (UTC)
From: [identity profile] pentomino.livejournal.com
A life simulation was one of the first programs I wrote in Java after I learned it from that book.

on itconversations.com, there was this podcast... I'll describe it in the morning.

Date: 2006-02-12 06:01 am (UTC)
From: [identity profile] mmcirvin.livejournal.com
I think the Poundstone book inspired a lot of people. In the mid-1980s, I think after being inspired by some A. K. Dewdney columns in SciAm, I wrote a version in the horrible Atari ST BASIC that got me thinking about optimization strategies, and with the help of the Poundstone book I later prodded my friend Alan Farmer into writing a couple of pretty slick and (for the time) very fast versions for MS-DOS PCs that got some circulation as freeware.

Date: 2006-02-12 06:04 am (UTC)
From: [identity profile] mmcirvin.livejournal.com
...One of Alan's efforts is depicted running the Gosper glider gun here (http://www.calresco.org/pic4/img4.htm).

Date: 2006-02-12 08:50 am (UTC)
From: [identity profile] pentomino.livejournal.com
I bought Dewdney's compilations of SciAm articles. It's amazing how hard it is to program these things for modern PC's, where all the programming interfaces assume you want text boxes, buttons, and bitmaps loaded from files, and nobody assumes you want a grid of pixels that are large enough to see. The hardest part of the Java Life program I did was getting the grid to display.

There was a web page that had some neat "Star Wars" CA that looked like space battles.

But what I was curious about were the CA's mentioned in this podcast: Stephen Wolfram: A New Kind of Science. The main reason being, he describes some blatantly visual results on an audio-only podcast. This guy also claims that since everything in the universe is capable of computation, that we can't use prime numbers as our marker for intelligent life in SETI, though I don't recall him producing anything in nature that could generate prime numbers, or even a situation in which generating prime numbers would benefit a non-intelligent system enough for it to actually happen naturally.

Date: 2006-02-12 09:12 am (UTC)
From: [identity profile] mmcirvin.livejournal.com
Wolfram claims a lot of things. Obviously we know that matter is capable of computation since we can make it compute. That doesn't mean it will under any given circumstance.

Anyway, any naturally occurring object that generated prime numbers would be interesting in its own right whether or not it was intelligent by somebody's definition. My hunch is that if we ever find something that is arguably a nonhuman intelligence, instead of engaging in any meaningful dialogue with it we'll spend hundreds of years arguing over whether it is actually intelligent or not. But maybe I've just read too much Lem.

Date: 2006-02-12 10:01 am (UTC)
From: [identity profile] mmcirvin.livejournal.com
The hardest part of the Java Life program I did was getting the grid to display.

Playing with Golly, it does seem to me that the biggest bottleneck in the program is just displaying the grid. The internal Life calculations are almost unbelievably fast--even without the pattern hashing that can let it run away exponentially on a sufficiently regular configuration, the thing can scream if you let it skip displaying generations; but it doesn't seem to be able to animate a continuous display with the kind of boiling chaos you could see in the late-Eighties PC implementations.

However, I'm thinking that it might be possible to do better with OpenGL, since MacOS's own screen-magnification feature can blow up the screen to fat pixels at tremendous speed by leveraging the capabilities of the video card.

Date: 2006-02-12 10:10 am (UTC)
From: [identity profile] mmcirvin.livejournal.com
...On the other hand, with these algorithms a lot of the trouble might be not spraying the grid to the screen, but converting from whatever nontrivial internal representation it's using. (Obviously Golly is not storing the whole grid as raw bits for something like the late-stage Metacatacryst; that would not be possible for any computer in existence.)

Date: 2006-02-12 10:42 am (UTC)
From: [identity profile] paracelsvs.livejournal.com
Mac OS X's graphics APIs are powerful, but notoriously slow. There's a reason I put in an immense effort to make Xee use OpenGL instead, because the OS X functions just aren't cutting it.

OpenGL has a small bottleneck in actually uploading the texture data to the video RAM, but that is probably not too signficant here.

Date: 2006-02-12 10:48 am (UTC)
From: [identity profile] paracelsvs.livejournal.com
Speaking of custom cellular automata (and Wolfram), for LotsaSnow I actually developed my own cellular automata that grows snowflakes. I started out with a simple cellular automata on a hexagonal grid that Wolfram had presented as an example of something that grows patterns like those in nature, in this case snowflakes - however, it grew very unconvincing snowflakes. Or rather, just the one same snowflake-like shape over and over.

I added some sort of semi-physical model of diffusing water vapor freezing onto the edges of the snowflake, and with a bit of tweaking of parameters, I got it grows some pretty neat-looking snowflakes, if I say so myself. It manages to grow flakes that are symmetrical and differ quite wildly in appearance. Later on, as a speedup, I made it calculate just one twelfth of the whole flake and then mirrored it, but I was happy it got the symmetry right even without that.

Date: 2006-02-12 02:11 pm (UTC)
From: [identity profile] darius.livejournal.com
Beyond the capability of Poundstone's program, anyway. It did a multiply for every grid access, or something like that... Of course the real limit for that program was the size of the screen.

Date: 2006-02-24 09:57 am (UTC)
From: [identity profile] calieber.livejournal.com
And then there's zooming to 8X on MS paint and doing it by hand.

If you have, y'know, a couple of decades you've got no plans for.

June 2025

S M T W T F S
1234567
89101112 1314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 15th, 2025 02:49 am
Powered by Dreamwidth Studios