ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

RockPaperScissors

For discussion of other cellular automata.

RockPaperScissors

Postby cvojan » October 16th, 2018, 5:56 pm

Welcome!

Here, I made a rule that combines 3 different CA's that interact with each other like RPS.
Rock (Red) - CGoL
Paper (Green) - HighLife
Scissors (Blue) - Morley/Move
Universal Constructor (Black) - None

Interactions:

Rock defeats scissors
Scissors defeats Paper
Paper defeats rock
All defeat UC

UC surrounded by Rock turns into Paper, defeating Rock
(etc. for this category)
UC alone turns into Rock


@RULE RockPaperScissors

Rock - B3/S23 (GOL)
Paper - B36/S23 (HighLife)
Scissors - B368/S245 (Morley/Move)

A collection of CA's that interact like "Rock Paper Scissors."

Interactions:

U -> R

R R R   R R R
R U R ->R P R
R R R   R R R

RS -> RR

SP -> SS

PR -> PP

Constructor (U) - Black
Rock (R)- Red
Paper (P) - Green
Scissors (S) - Blue

@TABLE
n_states:5
neighborhood:Moore
symmetries:permute

# WARNING! A rediculously huge variable field has been detected!

var YY={0,1,2,3,4}
var y1={YY}
var y2={y1}
var y3={y1}
var y4={y1}
var y5={y1}
var y6={y1}
var y7={y1}

var ry={0,1,4}
var ry1={ry}
var ry2={ry}
var ry3={ry}
var ry4={ry}
var ry5={ry}
var ry6={ry}
var ry7={ry}

var py={0,1,2}
var py1={py}
var py2={py}
var py3={py}
var py4={py}
var py5={py}
var py6={py}
var py7={py}

var sy={0,1,3}
var sy1={sy}
var sy2={sy}
var sy3={sy}
var sy4={sy}
var sy5={sy}
var sy6={sy}
var sy7={sy}

var oR={0,2}
var R1={0,2}
var R2={0,2}
var R3={0,2}
var R4={0,2}
var R5={0,2}
var R6={0,2}
var R7={0,2}

var oP={0,3}
var P1={0,3}
var P2={0,3}
var P3={0,3}
var P4={0,3}
var P5={0,3}
var P6={0,3}
var P7={0,3}

var oS={0,4}
var S1={0,4}
var S2={0,4}
var S3={0,4}
var S4={0,4}
var S5={0,4}
var S6={0,4}
var S7={0,4}

var U={1}
var R={2}
var P={3}
var S={4}

var a={R}
var b={R}
var c={R}
var d={R}
var e={R}
var f={R}
var g={R}
var h={P}
var i={P}
var j={P}
var k={P}
var l={P}
var m={P}
var n={P}
var o={S}
var p={S}
var q={S}
var r={S}
var s={S}
var t={S}
var u={S}
var v={S}
var z={R}

# Universal Constructor rules

U,0,0,0,0,0,0,0,0,R
U,a,py,py1,py2,py3,py4,py5,0,R
U,i,sy,sy1,sy2,sy3,sy4,sy5,0,P
U,o,ry,ry1,ry2,ry3,ry4,ry5,0,S
U,0,0,0,0,0,0,0,0,R
U,R,a,b,c,d,e,f,g,P
U,P,h,i,j,k,l,m,n,S
U,S,o,p,q,r,s,t,u,R

# The law that every CA follows:

YY,0,0,0,0,0,0,0,0,0

# Rock rules (B3/S23)

0,a,b,c,ry1,ry2,ry3,ry4,ry5,R

R,a,b,ry,ry1,ry2,ry3,ry4,ry5,c
R,a,b,c,ry,ry1,ry2,ry3,ry4,d

R,a,ry,ry1,ry2,ry3,ry4,ry5,ry6,0
R,a,b,c,d,R1,R2,R3,0,0
R,a,b,c,d,e,f,g,2,S

# Paper Rules (B36,S23)

0,i,j,k,py,py1,py2,py3,py4,P
0,i,j,k,l,m,n,py,py1,P

P,i,j,py,py1,py2,py3,py4,py5,k
P,i,j,k,py,py1,py2,py3,py4,l

P,i,py,py1,py2,py3,py4,py4,py5,0
P,i,j,k,l,P1,P2,P3,P4,0

# Scissors Rules (B368/S245)

0,o,p,q,sy,sy1,sy2,sy3,sy4,S
0,o,p,q,r,s,t,sy,sy1,S
0,o,p,q,r,s,t,u,v,S

S,o,p,sy,sy1,sy2,sy3,sy4,sy5,q
S,o,p,q,r,sy,sy1,sy2,sy3,s
S,o,p,q,r,s,sy,sy1,sy2,t

S,S1,sy,sy1,sy2,sy3,sy4,sy5,sy6,0
S,o,p,q,sy,sy1,sy2,sy3,sy4,0
S,o,p,q,r,s,t,S1,S2,0

# Battle rules

R,h,y1,y2,y3,y4,y5,y6,y7,P
P,o,y1,y2,y3,y4,y5,y6,y7,S
S,a,y1,y2,y3,y4,y5,y6,y7,R

@COLORS

1  0   0   0
2  255 0   0
3  0  255  0
4  0   0 255


Paper LWSS vs Rock LWSS
x = 27, y = 4, rule = RockPaperScissors
.4C18.2B$C3.C17.2B.2B$4.C18.4B$C2.C20.2B!
User avatar
cvojan
 
Posts: 20
Joined: October 7th, 2018, 7:07 pm

Return to Other Cellular Automata

Who is online

Users browsing this forum: No registered users and 2 guests