Page 1 of 1

### Sandpiles

Posted: November 28th, 2017, 7:37 pm
There's an interesting bit of mathematics called "sandpiles" I found on "Numberphile":
I believe this could be emulated in a cellular automaton with an "always-dead" cell and some b1e2ei3e4e shenanigans. (Also, some sort of "grain generator" might be nice for oscillation.)

### Re: Sandpiles

Posted: November 28th, 2017, 9:54 pm
This should work:

Code: Select all

``````@RULE Sandpiles
n_states:9
neighborhood:VonNeumann
symmetries:permute
var a={0,1,2,3,4}
var b={0,1,2,3,4}
var c={0,1,2,3,4}
var h={0,1,2,3,4}
var d={5,6,7,8}
var e={5,6,7,8}
var f={5,6,7,8}
var g={5,6,7,8}
1,a,b,c,d,2
1,a,b,d,e,3
1,a,d,e,f,4
1,d,e,f,g,5
2,a,b,c,d,3
2,a,b,d,e,4
2,a,d,e,f,5
2,d,e,f,g,6
3,a,b,c,d,4
3,a,b,d,e,5
3,a,d,e,f,6
3,d,e,f,g,7
4,a,b,c,d,5
4,a,b,d,e,6
4,a,d,e,f,7
4,d,e,f,g,8
5,a,b,c,h,1
5,a,b,c,d,2
5,a,b,d,e,3
5,a,d,e,f,4
5,d,e,f,g,5
6,a,b,c,h,2
6,a,b,c,d,3
6,a,b,d,e,4
6,a,d,e,f,5
6,d,e,f,g,6
7,a,b,c,h,3
7,a,b,c,d,4
7,a,b,d,e,5
7,a,d,e,f,6
7,d,e,f,g,7
8,a,b,c,h,4
8,a,b,c,d,5
8,a,b,d,e,6
8,a,d,e,f,7
8,d,e,f,g,8
``````

### Re: Sandpiles

Posted: November 28th, 2017, 10:37 pm
Majestas32 wrote:This should work:

Code: Select all

``````n_states:9
neighborhood:VonNeumann
symmetries:permute
var a={0,1,2,3,4}
var b={0,1,2,3,4}
var c={0,1,2,3,4}
var h={0,1,2,3,4}
var d={5,6,7,8}
var e={5,6,7,8}
var f={5,6,7,8}
var g={5,6,7,8}
1,a,b,c,d,2
1,a,b,d,e,3
1,a,d,e,f,4
1,d,e,f,g,5
2,a,b,c,d,3
2,a,b,d,e,4
2,a,d,e,f,5
2,d,e,f,g,6
3,a,b,c,d,4
3,a,b,d,e,5
3,a,d,e,f,6
3,d,e,f,g,7
4,a,b,c,d,5
4,a,b,d,e,6
4,a,d,e,f,7
4,d,e,f,g,8
5,a,b,c,h,1
5,a,b,c,d,2
5,a,b,d,e,3
5,a,d,e,f,4
5,d,e,f,g,5
6,a,b,c,h,2
6,a,b,c,d,3
6,a,b,d,e,4
6,a,d,e,f,5
6,d,e,f,g,6
7,a,b,c,h,3
7,a,b,c,d,4
7,a,b,d,e,5
7,a,d,e,f,6
7,d,e,f,g,7
8,a,b,c,h,4
8,a,b,c,d,5
8,a,b,d,e,6
8,a,d,e,f,7
8,d,e,f,g,8
``````
It doesn't include dead cells :C

### Re: Sandpiles

Posted: November 29th, 2017, 2:24 pm
State 0 is always dead cells

### Re: Sandpiles

Posted: November 29th, 2017, 6:55 pm
Majestas32 wrote:State 0 is always dead cells
Ah, sorry. What I meant was a special cell that would prevent other cells from being born next to it. I was hoping the dead state would act as 0.

### Re: Sandpiles

Posted: November 29th, 2017, 8:57 pm
Gamedziner wrote:prevent other cells from being born next to it
Can you explain this? Does it mean other cells can't change state next to it or what? Currently state 0 always stays as state 0

### Re: Sandpiles

Posted: November 29th, 2017, 10:47 pm
Majestas32 wrote:Does it mean other cells can't change state next to it...?
Yes.

I want state 0 to function as "0" does in the video.

### Re: Sandpiles

Posted: December 1st, 2017, 5:02 pm
I figured out how to make it work:

Code: Select all

``````@RULE Sandpiles
@TABLE
n_states:10
neighborhood:vonNeumann
symmetries:permute
var a={0,1,2,3,4}
var b={0,1,2,3,4}
var c={0,1,2,3,4}
var h={0,1,2,3,4}
var d={5,6,7,8}
var e={5,6,7,8}
var f={5,6,7,8}
var g={5,6,7,8}
0,a,b,c,d,1
0,a,b,d,e,2
0,a,d,e,f,3
0,d,e,f,g,4
1,a,b,c,d,2
1,a,b,d,e,3
1,a,d,e,f,4
1,d,e,f,g,5
2,a,b,c,d,3
2,a,b,d,e,4
2,a,d,e,f,5
2,d,e,f,g,6
3,a,b,c,d,4
3,a,b,d,e,5
3,a,d,e,f,6
3,d,e,f,g,7
4,a,b,c,d,5
4,a,b,d,e,6
4,a,d,e,f,7
4,d,e,f,g,8
5,a,b,c,h,1
5,a,b,c,d,2
5,a,b,d,e,3
5,a,d,e,f,4
5,d,e,f,g,5
6,a,b,c,h,2
6,a,b,c,d,3
6,a,b,d,e,4
6,a,d,e,f,5
6,d,e,f,g,6
7,a,b,c,h,3
7,a,b,c,d,4
7,a,b,d,e,5
7,a,d,e,f,6
7,d,e,f,g,7
8,a,b,c,h,4
8,a,b,c,d,5
8,a,b,d,e,6
8,a,d,e,f,7
8,d,e,f,g,8
``````
Thank you for making the rule!