
Conway's Game of Life, using floating point values instead of integers - icey
http://www.jwz.org/blog/2012/10/smoothlifel/
======
tim_hutton
Original post:

[https://plus.google.com/110214848059767137292/posts/WtPBhYJs...](https://plus.google.com/110214848059767137292/posts/WtPBhYJswAe)

Technical details on the YouTube page:

<https://www.youtube.com/watch?v=KJe9H6qS82I>

(Two lots of source code available: Stephan's and mine)

Other discussions about this:

Reddit:
[http://www.reddit.com/r/compsci/comments/118svz/smoothlife_a...](http://www.reddit.com/r/compsci/comments/118svz/smoothlife_a_continuous_version_of_conways_game/)

Metafilter: <http://www.metafilter.com/120749/Smoothlife>

~~~
rm999
Very cool, thanks for the links! Are you affiliated with the project?

~~~
tim_hutton
I made an implementation of SmoothLifeL in Ready and this video. Stephan
Rafler created the SmoothLife rules and has his own software. Ready is
designed to let the user play with a large range of systems like this one,
connecting a field of floats to an OpenCL kernel that the user can rewrite on
the fly. Check out Ready for some similar patterns, like Robert Munafo's
U-Skate world.

<http://code.google.com/p/reaction-diffusion>

There's a deep motivation behind all this, which is to try to understand the
pattern formation mechanisms that appear in nature and get harnessed by
organisms.

------
jashkenas
Does anyone have a JavaScript implementation of the paper? It looks like it
would be really fun to play with in <canvas>.

 _Edit_ Quoth YouTube: "74 minutes on an nVidia GeForce GTX 460" ... maybe not
so fun.

~~~
ghostfish
But you missed the most important part of that quote. >"(in Ready, Stephan's
software at the sourceforge link above runs much faster)" So using Ready it
took a long time, but the actual code is much faster. I'd imagine you could
write something in CUDA that would run this (and only this, not something
generalized like Ready) plenty fast to do real time rendering on a new system,
especially considering a GTX 680 has almost 5x the horsepower of a GTX 460.

Admittedly not in a web browser though.

~~~
tim_hutton
Ready is using OpenCL. But Stephan is using FFT for the convolution with a
disk filter, which is a big win for large radii.

~~~
ghostfish
As far as I'm aware OpenCL performance, while portable, is still somewhat
inferior to that of straight CUDA on NVIDIA GPUs, hence my CUDA suggestion. I
didn't actually look at the algorithms used in either so I can't comment,
perhaps I'll do that tomorrow. What do you mean by using an FFT "for" a
convolution? The algorithm is convolving the (presumably 2D) FFT of the game
board with a disk filter?

~~~
tim_hutton
SmoothLife uses two disks around each point to determine the instantaneous
rate of change. Inside each disk the values are summed. This is a convolution
with a disk filter.

<http://en.wikipedia.org/wiki/Convolution>

As it says on that page, FFT is often used for convolution because it is fast:
after applying a discrete Fourier transform to the kernel and the image, the
resulting images must only be multiplied together before applying an inverse
FFT.

<http://en.wikipedia.org/wiki/Discrete_Fourier_transform>

~~~
tomrod
That's so cool. I love to see real world applications of convolutions.

I wonder if there is an application of Gershgorin's Disc theorem here?

~~~
tim_hutton
I see something about a circle that contains the eigenvectors of a matrix. How
does that apply here?

------
tisme
Fascinating, totally mesmerizing video. That's reminiscent of something that
you could be observing under a microscope.

~~~
Anchor
I wonder what a 3D version (<http://www.ibiblio.org/e-notes/Life/Game.htm>) of
a continuous game of life would look like... could similar cell-like
structures emerge with these kind of rules also in 3D.

~~~
mbrubeck
SmoothLife has been generalized to 3D too:
[http://www.youtube.com/watch?v=7RsEyu8Ol-Q&NR=1](http://www.youtube.com/watch?v=7RsEyu8Ol-Q&NR=1)

------
mmagin
Possibly of similar interest - Ready, a program for exploring continuous
valued cellular automata: <http://code.google.com/p/reaction-diffusion/>

------
pav3l
Aren't cellular automata in continuous space just PDE's? If so, what is the
equation being integrated?

EDIT: found the paper: <http://arxiv.org/pdf/1111.1567v2.pdf>

~~~
brilee
Not quite; the values at every point are boolean, not floats.

(From the link) The algorithm is explained here:
<http://www.youtube.com/watch?v=iyTIXRhjXII>

~~~
waqf
It's confusing because several algorithms are explained, but I believe they're
actually floats in this version.

Also it's not a normal PDE because ∂f/∂t is permitted to be an arbitrary
functional of f restricted to a fixed-diameter neighborhood of the point, not
just an infinitesimal neighborhood.

~~~
jules
That's the case for our universe as well, for example d^2x/dt^2 due to gravity
for a piece of material is dependent on all other material in the universe.

~~~
waqf
Not instantaneously: <https://en.wikipedia.org/wiki/Speed_of_gravity>

~~~
Xcelerate
So the Schrodinger equation isn't quite accurate then?

Does the Dirac equation take this into effect?

~~~
crntaylor
You can think of modern physics as a bit like a cube:

    
    
          1/3_____1/2/3
          /|      /|
         / |     / |
        1------1/2 |
        |  3____|__2/3
        | /     |  /
        |/      | /
        0-------2
    

0) At the bottom left corner you have "classical mechanics" - the theory that
explains pendulums, bouncing balls and spinning bodies.

It branches out along the three axes:

1) Add mutual gravitation, giving you the theory of Newtonian celestial
mechanics (in which gravity acts instantaneously)

2) Add relativistic effects, giving you Einstein's theory of special
relativity (there is a finite upper limit to all communication, the speed of
light)

3) Add quantization, giving you 1920s era quantum mechanics, as described by
the Schrodinger equation.

We know how to combine any two of these:

1/2) Combining gravitation and relativistic effects gives you Einstein's
theory of General Relativity. In this theory, gravitational effects travel at
the speed of light.

2/3) Combining relativity and quantum mechanics gives you quantum field theory
and the Standard Model. This encompasses the Dirac equation, which is a
quantum relativistic theory of fermions (i.e. matter particles).

1/3) Combining gravity and quantum mechanics gives you... well, it's kind of
boring and we don't talk about it much, but you get a quantum theory with
gravitation, but no relativistic effects. No one really studies this.

Combining all three is the holy grail of physics:

1/2/3) Often called `quantum gravity` or the `theory of everything`, this is
the as yet nonexistent theory that can explain both very small and very
massive (in the sense of having a large mass) objects, like black holes or the
early universe.

~~~
Alekanekelo
Could you elaborate a bit on your point 1/3? How come the little interest in
this subject? Even though it contains no relativistic effects it would seem to
have some importance in filling out the complete 'cube' of theories?

~~~
crntaylor
The equations you end up with are called the Schrodinger-Newton equations [1].
These are the same as Schrodinger's equation, but with an extra term that
couples the wavefunction to a global gravitational field via its mass.

I'm not an expert, but possible reasons for the relative lack of interest in
these equations include:

1\. It doesn't produce many interesting predictions (possible exception: it
_might_ be useful for explaining how gravitational effects can induce
wavefunction collapse, but this appears to be highly speculative.)

2\. There isn't a natural domain of applicability. For example, combining 1/2
(gravity and relativity) has a natural applicability to things that are heavy
and move fast (i.e. stars, galaxies, the universe). Combining 2/3 (relativity
and quantum mechanics) applies to things that are small and move fast
(electrons and other fundamental particles). The domain of applicability of
1/3 would be things that are small and heavy, but move slowly. I can't think
of any examples of things that fit the bill (note that 1/2/3 applies to things
that are small, heavy and move quickly, i.e. black holes).

When I say "move quickly" here I don't necessarily mean that the object you're
modelling must be moving quickly - just that there are speeds in the problem
that are appreciable fractions of the speed of light.

[1]
[http://en.wikipedia.org/wiki/Schr%C3%B6dinger%E2%80%93Newton...](http://en.wikipedia.org/wiki/Schr%C3%B6dinger%E2%80%93Newton_equations)

~~~
gus_massa
There are a few experiments that combine Newtonian gravity and quantum
mechanics (1/3).

For example you can split a ray of neutrons, direct each beam throu a
different path with different height and then make them collide and see the
interference pattern. (The details are in the book of Sakurai "Modern Quantum
Mechanics" pp127-129, with data from an experiment of Colella, Overhauser,
Werner (1975).)

It is possible to create systems that combine 1/3, but they are almost corner
cases and most of the time the other combinations are more useful.

------
nickknw
That's awesome! My project inspired by the Game of Life is quite a bit less
ambitious (and still incomplete) - <http://nickknowlson.com/projects/conways-
revenge/>

It lets multiple cell colonies fight against each other using a modified
ruleset.

~~~
jmilloy
Cool! I've been wanting to do this for some time and haven't gotten around to
it.

------
DanBC
Pinchyfingers submitted this link:

(<http://news.ycombinator.com/item?id=4642628>) which goes to a Youtube video
of a game of life in a single line of APL. It's a really nice description of
the code too. (It's a sale pitch for dynalog - but the best kind where they're
just using the tool to do something neat and not pushing their URLs at you.)

~~~
mikeash
I've watched that video several times and it never occurred to me that it was
a sales pitch.

~~~
DanBC
That's the best kind of sales pitch. Don't sell it. Just show it. People who
want it will be grateful not to have it pushed at them, and people who don't
want it will watch it and share it with others, and those other people might
want it.

------
kasra
Have you googled "conway's game of life" recently?

~~~
antimora
Yes. Google has nice animation =)

[https://www.google.com/search?q=Conways+Game+of+Life&sug...](https://www.google.com/search?q=Conways+Game+of+Life&sugexp=chrome,mod=14&sourceid=chrome&ie=UTF-8)

------
jrl
It looks like cells under the microscope. Very interesting stuff.

------
dexter313
Awesome, but the results/behaviour (in the video) don't seem very complex like
the original Conway's game of life.

~~~
canistr
It does seem more "organic", if you will.

~~~
dexter313
It does. Still I think the point of game of life is not to look organic but to
make complex thing from very simple rules. Like supposedly the universe we
live in. Conway's game of life would look organic if you zoomed out enough, no
computer can do that of course.

~~~
ktizo
_no computer can do that of course._

we are getting there - <http://www.youtube.com/watch?v=xP5-iIeKXE8>

~~~
scrumper
Outstanding, thank you for this. Worth a post on its own don't you think?

~~~
DanBC
It had one, 4 months ago. No comments, only 4 points.

(<http://news.ycombinator.com/item?id=4014078>)

I think I've seen it before that too, from HN.

------
jcromartie
I'm not sure if this is as cool as it looks. I guess it's yet to be seen what
the larger-scale behavior might be, but it looks like it's just a lot of the
same gliders, orbits, and strands between them.

------
jcampbell1
Watching this video makes me wonder if Wolfram's "New Kind of Science" is more
worthy of study. There was so much controversy about the book and Wolfram's
claims, that I didn't bother with it.

~~~
mck-
Watching this video makes me wonder if Wolfram's "New Kind of Science" is
getting old (like Tetris).

I was actually reading that book at the book store for hours, getting quite
intrigued, but at the same time deterred by its size. Perhaps I should give it
another shot some day.

~~~
andolanra
The general criticism of Wolfram's book is that it's heavy on pictures and
self-praise and comparatively light on content. It's certainly very pretty,
and has some interesting results (e.g. that Rule 110 is Turing-complete) but a
lot of the work is summary or rehash of other extant (and often non-cited)
material. There are often more thorough, more concise, and more lucid
resources on cellular automata from other research; I'd cite Zuse's
_Rechnender Raum_ (Calculating Space) off the top of my head for a work that
comes to many of Wolfram's conclusions several decades prior to Wolfram.

In fact, a good strategy for becoming familiar with cellular automata as a
field is to read reviews of ANKOS by people with degrees[1], collect the works
and authors mentioned, and trawl them. You'll learn a lot about a lot that
way.

[1]: <http://shell.cas.usf.edu/~wclark/ANKOS_reviews.html> has an extensive
selection of such reviews.

EDIT: It's also worthy of note here that Wolfram would reject the original
post's model as not worthwhile, as ANKOS explicitly argues that we should
reject continuous models in favor of discrete models; indeed, that is the very
definition of his "new kind of science."

~~~
lmm
Note that the proof that Rule 110 is Turing-complete was actually invalid.

(Also, like much of the work in the book, it was written by an uncredited
employee rather than Wolfram)

~~~
andolanra
I knew that the proof was actually Matthew Cook's work, but I didn't realize
it was invalid. Can you point me to a citation for that?

~~~
lmm
I was thinking of
[http://science.slashdot.org/story/07/10/29/2212226/wolframs-...](http://science.slashdot.org/story/07/10/29/2212226/wolframs-23-turing-
machine-not-universal) ; looking again it seems that's a different proof,
apologies.

------
jonny_eh
I need this as a screensaver, asap!

~~~
mrshoe
Considering this is the XScreenSaver creator's blog, you might just get your
wish.

------
jmpeax
Is it Turing complete?

~~~
shmageggy
I'd bet it is, but I imagine it would be really hard to prove. The original
turing-completeness proof [1] for discreet cellular automata worked by setting
up some predictable repeating patterns and then using these to encode a
representation of some other simple machine that was known to be turing-
complete. Getting anything repeatable out of this would obviously be much
harder, as any slight perturbation would cause unpredictable effects (see:
chaos theory). However, I haven't read the paper so maybe they have some way
of setting up the system that enables repeatability.

1\. <http://www.complex-systems.com/pdf/15-1-1.pdf>

------
tomrod
This is one of the most beautiful things I think I've ever seen simulated.
Kudos!

------
uvdiv
HTML5 implementation in 3, 2...

~~~
nuttendorfer
Surely you mean "pure CSS3 implementation".

~~~
ktizo
How about doing an implementation of smoothlife in conway's life? Might run a
bit slow.

------
kriro
This is fantastic both intellectually and from an artistic point of view.

I'm not a fan of electronic music but the music that was picked for the video
was perfect.

------
Pitarou
Someone's gonna package this up and sell it as a product, for sure! A 21st
century lava lamp.

------
jes5199
how close are the rules running here to the standard rules of Conway's Life? I
know some of those are supposed to be "gliders" - is it possible to port other
shapes from Life into SmoothLife?

------
jolohaga
Wish the music were as interesting.

------
wissler
Now to try it with complex numbers and/or 3D coordinates.

------
teamls
Hey guys, check out the Conway's Game of Life Code Garage project on
LearnStreet: <http://www.learnstreet.com/cg/simple/project/conways>

~~~
waqf
I'm not logging in with Facebook to see your site, about which I know nothing,
when you haven't even sold me on its relevance to the topic under discussion.

~~~
pests
Did you, um, click the links at the top?

~~~
waqf
I was following a URL that apparently was supposed to go to a specific
subpage, not to the site homepage. And apparently there was a loginwall in
front of that subpage. What good would clicking around the site have done?

If you think I was going to read all the pages I could access on the site, so
that I could ascertain whether it was worth my while to log in, then you
grossly overestimate my commitment to a poorly-explained link I clicked
speculatively in a comment.

