The rule is an optional mixin class (intended to be mixed in
with an Automaton) which allows implementation of generic rules
without reference to dimensionality, topology, neighborhood, or
any combination. Rules, when used, include a populate method, and
a rule method; the rule method is the same Automaton.rule method
(which implements state transitions); the populate method is
called once when the automaton is initialized and can, say,
initialize lookup tables that the rule method relies upon.
Methods
|
|
__init__
populate
rule
|
|
__init__
|
__init__ ( self )
|
|
populate
|
populate ( self )
Initialize information needed to calculate rules, e.g., a
lookup table.
|
|
rule
|
rule ( self, address )
The main state transition function, prepackaged as a Rule.
|
|