User:Apple Bottom/Incubator/Swedish notation
Swedish notation[note 1] is a system for encoding non-isotropic Life-like cellular automata in a manner that is more intuitive than MAP strings.[1]
Swedish notation assigns a single letter to each of the eight major compass directions, as follows; "vänster" and "höger" are Swedish for "left" and "right":
| l (left) |
n (north) |
r (right) |
| w (west) |
— | e (east) |
| v (vänster) |
s (south) |
h (höger) |
Each possible neighborhood configuration with n < 5 live cells is represented as a group of letters indicating which cells are live (in any order); for n ≥ 5 live cells, the dead cells are represented instead to keep the overall notation shorter and more intuitively understood. For example:
| File:Neighborhood 2a.png | File:Neighborhood 2a rotated.png | File:Neighborhood 3k.png | File:Neighborhood 5a.png | File:Neighborhood 6c.png | File:Neighborhood 7c.png |
| 2(ln) | 2(re) | 3(wnh) | 5(lnw) | 6(lr) | 7(l) |
Different neighborhood configurations with the same number n of live cells are separated with commas and grouped along with the respective birth (Bn) or survival (Sn) condition:
| File:Neighborhood 2a.png | File:Neighborhood 2a rotated.png | File:Neighborhood 3k.png | File:Neighborhood 5a.png | File:Neighborhood 6c.png | File:Neighborhood 7c.png |
| B2(ln,re)3(wnh)5(lnw)7(l) | |||||
As with Hensel notation for isotropic non-totalistic Life-like cellular automata, conditions can be negated by prefixing them with a minus sign. For example, a cellular automaton in which dead cells get born if they have two live neighbors, unless those neighbors happen to be located southeast (h) and north (n) of a cell, would include "B2(-hn)" as part of its rulestring in Swedish notation.
Comparison to MAP strings
Swedish notation rulestrings are, on average, longer than the MAP strings describing the same cellular automata, but can be understood, created and read more easily than MAP strings by humans.
Also see
Notes
- ↑ The name "Swedish notation" refers to the use of "vänster" and "höger" for the backward diagonal compass directions, but is also a pun on "Polish notation".
References
- ↑ Apple Bottom. Re: Thread for basic questions (discussion thread) at the ConwayLife.com forums