Template:Rule

From LifeWiki
Jump to navigation Jump to search
Ambox notice.png The current OCA infobox infrastructure is under discussion; see forum thread https://conwaylife.com/forums/viewtopic.php?p=166744#p166744 for related discussion of what could/should be done with infoboxes
Maze
x=0, y = 0, rule = B3/S12345 ! #C [[ THEME Inverse ]] #C [[ RANDOMIZE2 RANDSEED 1729 THUMBLAUNCH THUMBNAIL THUMBSIZE 2 GRID ZOOM 6 WIDTH 600 HEIGHT 600 LABEL 90 -20 2 "#G" AUTOSTART PAUSE 2 GPS 8 LOOP 256 ]]
LifeViewer-generated pseudorandom soup
Rulestring 12345/3
B3/S12345
Rule integer 31752
Character Explosive
Black/white reversal B0128/S01234678

The rule template is an infobox template for rules for cellular automata. It takes the following parameters:

  • name: (optional) the name of the rule. If not specified, the infobox head will be a rulestring.
  • imgname: (optional) the name of the image (of a typical pattern) to link in the infobox; .png and .gif are appended automatically for the still and animated versions. Should be set if an image (static or animated) for this rule has been uploaded. The File: prefix should not be specified.
  • animated: (optional) should be set to true if an animated image for this rule has been uploaded.
  • hideimg (optional): setting this to true disables and hides the looped animation of an evolving random soup.[note 1]
  • b: the rule's birth (B) conditions.
  • s: the rule's survival (S) conditions.
    • Note the use of comma in Higher-range outer-totalistic cellular automata.
  • f: for BSFKL rules, the rule's forcing (F) conditions.
  • k: for BSFKL rules, the rule's killing (K) conditions.
  • l: for BSFKL rules, the rule's living (L) conditions.
  • c: for Generations rules and Higher-range outer-totalistic cellular automata, the total number of cell states. The parameter may also be specified as g.
  • r: for Higher-range outer-totalistic cellular automata, the range.
  • n: for Higher-range outer-totalistic cellular automata and weighted rules, the neighbourhood type. It should be one of ABCDFGHLMNWX23*+#@.
    • NM for Moore neighbourhood.
    • NN for von Neumann neighbourhood.
    • NC for Circular neighborhood.
    • N2 for L2/Euclidean neighborhood.
    • NB for Checkerboard neighborhood.
    • N# for Hash neighborhood.
    • N+ for Cross neighborhood.
    • NX for Saltire neighborhood.
    • N* for Star neighborhood.
    • NH for Hexagonal neighborhood.
    • NA for Asterisk neighborhood.
    • N3 for Tripod neighborhood.
    • NL for Triangular neighborhood.
    • ND for Aligned Checkerboard neighborhood.
    • NF for Far Corners/Edges neighborhood. Optionally, override r by specifying C<number> and/or E<number>.
    • N@ for custom neighborhood. @ is followed by hexadecimal digits that defines neighborhood.
    • NW for custom weighted neighborhood. W is followed by hexadecimal digits that defines neighborhood.
    • NG for Gaussian-weighted neighborhood.
  • char: the rule's character/behaviour in sufficiently large soups with ~0.5 density. Like Wolfram's classification, the description is not strict. Suggested options:
    • Stable: rules in which patterns tend to stabilize quickly and show little activity.
    • Chaotic: rules in which patterns tend to show complex behavior, but do not generally explode.
    • Explosive: rules in which patterns tend to grow without bound.
  • ruleinteger: the rule's rule integer (if any).
  • Duals:
The following should only be specified for self-complementary rules. (For others, they are an alternating pair of rules, switching over time and space respectively.)

Example

An example can been seen to the right; it was generated with the following invocation:

{{Rule
|name        = Maze
|imgname     = maze
|b           = 3
|s           = 12345
|char        = Explosive
|ruleinteger = 31752
|reversal    = B0128/S01234678
|animated    = true
}}

Notes

  1. See also LifeWiki:Tiki bar#Suggested deprecation of EmbedViewerRule for the discussion related to the current implementation of the random-soup animation in {{EmbedViewerRule}} and possible alternatives.