Page 1 of 1

Rules in non uniform tiling.

Posted: March 13th, 2019, 7:21 pm
by simsim314
For CA we don't need too much - just a good adjacency graph. We can have several adjacency neighbors and collect different neighbors types into hash table as part of the rule. As long as we have finite amount of adjacent vertices we can run CA on it.

To show case the idea I've prepared golly script for 8-4 tiling and I post different tiling system that can use this idea.

The reset:

Code: Select all

#8-4 tiling rule on 100X100 Setup 
#Written by Michael Simkin 2019 to check different types of CA on irregular grid. 

import golly as g 
import random

g.setrule("LifeHistory")

N = 100 
for i in range(N):
		for j in range(N):
			if (i+j) % 2 == 1:
				g.setcell(i,j, 6)
			else:
				if i % 2 == 0:
					if i > 150 and i < 250 and False:
					
						if random.uniform(0, 1) > 0.5:
							g.setcell(i,j, 1)
						else:
							g.setcell(i,j, 2)
							
					else:
						g.setcell(i,j, 2)
						
				else:
					if i > 150 and i < 250 and False:
						if random.uniform(0, 1) > 0.5:
							g.setcell(i,j, 3)
						else:
							g.setcell(i,j, 4)
					else:
						g.setcell(i,j, 4)
				
This is iterate 1 generation - you need to run it instead of golly if you want to see the result:

Code: Select all

import golly as g 

g.setrule("LifeHistory")

N = 100 
def get2darr(n):
	return [[0 for i in range(n)] for j in range(n)]
	
def apply_rule(x, y):
	state = g.getcell(x, y)
	
	if state == 6:
		return 6 
	
	if state == 3 or state == 4:
		vals = {0:0, 1:0, 2:0}
		vals[g.getcell(x+-1,y+-1)] += 1
		vals[g.getcell(x+-1,y+1)] += 1
		vals[g.getcell(x+1,y+-1)] += 1
		vals[g.getcell(x+1,y+1)] += 1
		
		if vals[1] == 2 or vals[1] == 3:
			return 3
		else:
			return 4
		
	if state == 1 or state == 2:
		vals = {0:0, 1:0, 2:0, 3:0, 4:0}
		vals[g.getcell(x+-1,y+-1)] += 1
		vals[g.getcell(x+-1,y+1)] += 1
		vals[g.getcell(x+1,y+-1)] += 1
		vals[g.getcell(x+1,y+1)] += 1
		
		vals[g.getcell(x+2,y+0)] += 1
		vals[g.getcell(x+-2,y+0)] += 1
		vals[g.getcell(x+0,y+-2)] += 1
		vals[g.getcell(x+0,y+2)] += 1
		
		if (vals[1] >= 2 and vals[1] <= 2) or (vals[3] % 2 == 1 and vals[1] % 2 == 0):
			return 1
		else:
			return 2				
				
arr = get2darr(N)

for i in range(N):
	for j in range(N):
		arr[i][j] = apply_rule(i, j)
		
for i in range(N):
	for j in range(N):
		g.setcell(i,j, arr[i][j])

Here is a natural linear replicator in this rule:

Code: Select all

x = 16, y = 13, rule = LifeHistory
FBFBFBFBFBFBFBFB$DFDFDFDFDFDFDFDF$FBFBFBFBFBFBFBFB$DFDFDFDFDFDFDFDF$F
BFBFBFBFBFBFBFB$DFDFDFCFCFDFDFDF$FBFBFBFBFBFBFBFB$DFDFDFDFDFDFDFDF$FB
FBFBFBFBFBFBFB$DFDFDFDFDFDFDFDF$FBFBFBFBFBFBFBFB$DFDFDFDFDFDFDFDF$FBF
BFBFBFBFBFBFB!

Attached alternative adjacency groups. It would be also nice to find someone with interest in hyperbolic geometry.

Re: Rules in non uniform tiling.

Posted: March 13th, 2019, 9:20 pm
by 77topaz
simsim314 wrote:It would be also nice to find someone with interest in hyperbolic geometry.
Here's a simulator of CAs on hyperbolic tilings (by Dmitry Shintyakov), which may be useful: https://dmishin.github.io/hyperbolic-ca ... /help.html

Re: Rules in non uniform tiling.

Posted: March 13th, 2019, 11:00 pm
by praosylen

Re: Rules in non uniform tiling.

Posted: March 20th, 2019, 1:13 am
by Hdjensofjfnen
77topaz wrote:
simsim314 wrote:It would be also nice to find someone with interest in hyperbolic geometry.
Here's a simulator of CAs on hyperbolic tilings (by Dmitry Shintyakov), which may be useful: https://dmishin.github.io/hyperbolic-ca ... /help.html
For that, it might be worth calculating the area of the population, rather than the number of ON cells.

Re: Rules in non uniform tiling.

Posted: May 7th, 2019, 2:12 pm
by Ch91
I know of a fairly popular game on Steam called HyperRogue (https://store.steampowered.com/app/342610/HyperRogue/) that features hyperbolic geometry which also allows for the construction of cellular automata in an alternate game mode. As the game in question allows for multiple forms of hyperbolic and spherical/elliptical tiling (as well as exotic Euclidian topologies like the Bolza surface and n-dimensional crystals, it could be a significant aid to exploring hyperbolic cellular automata as well as topologies that Golly cannot emulate.

The link below contains some of the game community's preliminary research using the game's default tiling, a bitruncated order-3 heptagonal tiling (GP (1,1){7,3}), modified to use a quotient space dubbed the "field quotient"*. While it doesn't seem to have had much attention since its initial posting, they have identified several oscillators and formed a conjecture regarding the viability of spaceships in hyperbolic equivalents of Life-like cellular automata.

https://steamcommunity.com/app/342610/d ... 517788721/

*According to the game's website: "This geometry (the field quotient) is obtained by finding two 3x3 matrices P (step forward and turn back) and R (rotate 360/7 degrees) over a finite field such that PRPRPR=PP=RRRRRRR=Id, and generating all the possible products of these two generators; each orbit of form {W,WR,WR^2,...,WR^6} becomes a single cell, and the elements correspond to possible facing directions on that cell. Only fields of order p (a prime) or p^2 are considered. This construction generates Hurwitz surfaces; in particular, for
p=13 we get one of the surfaces in the first Hurwitz triplet, with systole 5.9039. By default p=43 is used."