Я нашел это из файла Cellular Automata Mathematica, что такое шаблон и альтернативы?
Что означает Pattern в этом блоке кода:
CellularAutomaton[{ { 0, Blank[], 3} -> 0,
{ Blank[], 2, 3} -> 3,
{ 1, 1, 3 } -> 4,
{ Blank[], 1, 4} -> 4,
{ Alternatives[1, 2] << 1 or 2 >>, 3, Blank[]} -> 5,
{ Pattern[$CellContext`p, Alternatives[0, 1]], 4, Blank[]} -> 7 - $CellContext`p,
{ 7, 2, 6} -> 3,
{ 7, Blank[], Blank[]} -> 7,
{ Blank[], 7, Pattern[$CellContext`p, Alternatives[1, 2]]} -> $CellContext`p,
{ Blank[], Pattern[$CellContext`p, Alternatives[5, 6]], Blank[]} -> 7 - $CellContext`p,
{ Alternatives[5, 6], Pattern[$CellContext`p, Alternatives[1, 2]], Blank[]} -> 7 - $CellContext`p,
{ Alternatives[5, 6], 0, 0} -> 1,
{ Blank[], Pattern[$CellContext`p, Alternatives[1, 2]], Blank[]} -> $CellContext`p,
{ Blank[], Blank[], Blank[]} -> 0}, {