# One can set up a much shorter rule table than the one used by allowing for rotations and reflections such as the Margolus table below, but one has to bear in mind that this actually requires a similar number of decisions to the longer von Neumann tabek that follows it which was used in our simulation, when the eightfold duplication in the one below is programmed in. # Diffusion Limited Aggregation, in a Margolus neighborhood CA n_states:3 neighborhood:Margolus symmetries:rotate4reflect # In the Margolus nhood, the transition a,b,c,d : e,f,g,h means: # a b --> e f # c d g h # 0: vacuum # 1: gas particle # 2: stuck particle # HPP gas rules: 1,0,0,0 : 0,0,0,1 # a diagonally-travelling particle keeps going 1,1,0,0 : 0,0,1,1 # two particles pass through each other 0,1,1,0 : 1,0,0,1 # two particles collide head-on 1,1,1,0 : 0,1,1,1 # three particles pass through each other # plus aggregation rules: (these seem to suffice) 1,0,2,0 : 2,0,2,0 1,0,2,2 : 2,0,2,2 #Now here is the von Neumann neighbourhood table actually programmed into CA2D, which also allows for differing colours on the different gas states. 1,2,4,8 are traveling NSEW numbers with two active bits 3,5,6, etc. contain two particles. Numbers over 15 are boundary cells being hit in various ways. 34 is the crystal. #___________________________________________________________ # HPP Lattice gas # # J. Hardy, O. de Pazzis, and Y. Pomeau (1973) J. Math. Phys. 14, 470. # # The earliest lattice gas model. Later made obsolete by the FHP gas on # a hexagonal lattice, which has better physical properties. # # States following http://pages.cs.wisc.edu/~wylie/doc/PhD_thesis.pdf # # Each cell can contain up to 4 particles, each moving in one of the four directions. # Outgoing directions SENW map onto 4 bits, so W=0001=1, SEW=1101=13, etc. # Next state is simply the collected inputs, in most cases. # The exceptions are 5 (EW) and 10 (NS) which get swapped (bounce on collision). # # To make the gas useful in Golly's infinite area, I've added reflecting boundary # states, 16-31. These work in the same way as gas particles (collecting inputs) # but reverse their direction. Contact: Tim Hutton # # Sink boundary: (or you can vent to the outside but this way is neater) # 32 # Source boundary: (haven't really worked out how to use this well yet) # 33 # # The HPP gas can also be run using the Margolus-neighborhood emulator in # Golly (see e.g. Other-Rules/Margolus/BBM.rle) but this CA is neater. n_states:35 neighborhood:vonNeumann symmetries:none # a = any of the gas states and frozen var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34} var aa={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34} var ab={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34} var ac={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34} # a = any of the gas states var ad={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} var ae={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} var af={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} # b = any of the reflecting boundary states var b={16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31} # s = has an outgoing south particle var s={8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31,33} # Ns = doesn't have an outgoing south particle var Ns={0,1,2,3,4,5,6,7,16,17,18,19,20,21,22,23,32,34} # e = has an outgoing east particle var e={4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31,33} # Ne = doesn't have an outgoing east particle var Ne={0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27,32,34} # n = has an outgoing north particle var n={2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31,33} # Nn = doesn't have an outgoing north particle var Nn={0,1,4,5,8,9,12,13,16,17,20,21,24,25,28,29,32,34} # w = has an outgoing west particle var w={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33} # Nw = doesn't have an outgoing north particle var Nw={0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34} # State 34 remains alive 34,a,aa,ab,ac,34 # Diffusion-limited aggregation ad,s,ae,af,34,34 ad,s,ae,34,af,34 ad,s,34,ae,af,34 ad,ae,w,af,34,34 ad,ae,w,34,af,34 ad,34,w,ae,af,34 ad,ae,af,n,34,34 ad,ae,34,n,af,34 ad,34,ae,n,af,34 ad,ae,af,34,e,34 ad,ae,34,af,e,34 ad,34,ae,af,e,34 # straightforward transport (no interactions) except 5 and 10 which are swapped a,Ns,Nw,Nn,Ne,0 a,Ns,w,Nn,Ne,1 a,Ns,Nw,n,Ne,2 a,Ns,w,n,Ne,3 a,Ns,Nw,Nn,e,4 a,Ns,w,Nn,e,10 a,Ns,Nw,n,e,6 a,Ns,w,n,e,7 a,s,Nw,Nn,Ne,8 a,s,w,Nn,Ne,9 a,s,Nw,n,Ne,5 a,s,w,n,Ne,11 a,s,Nw,Nn,e,12 a,s,w,Nn,e,13 a,s,Nw,n,e,14 a,s,w,n,e,15 # reflecting boundaries: b,Ns,Nw,Nn,Ne,16 b,Ns,Nw,Nn,e,17 b,s,Nw,Nn,Ne,18 b,s,Nw,Nn,e,19 b,Ns,w,Nn,Ne,20 b,Ns,w,Nn,e,21 b,s,w,Nn,Ne,22 b,s,w,Nn,e,23 b,Ns,Nw,n,Ne,24 b,Ns,Nw,n,e,25 b,s,Nw,n,Ne,26 b,s,Nw,n,e,27 b,Ns,w,n,Ne,28 b,Ns,w,n,e,29 b,s,w,n,Ne,30 b,s,w,n,e,31