A rule consists of a series of commands. A command contains a command name and some arguments. Each argument may be a number literal or another command.
List of commands:
set (state) (condition): Sets the current cell to a state if the condition is true.
local (state): Returns true if the current cell has a certain state.
neighbor (state) (number): Returns true if the current cell has a certain number of neighboring cells with the given state.
and (condition) (condition): Returns true if both conditions are true.
or (condition) (condition): Returns true if either condition is true.
not (condition): Returns true if the condition is false.