Bases: zasim.cagen.bases.Computation
Infer a ‘Gödel numbering’ from the used Neighbourhood and create a computation that corresponds to the rule’th possible combination of values for the neighbourhood cells.
This works with any number of dimensions.
Create the computation.
Supply None as the rule to get a random one.
This list stores a list of dictionaries that for each combination of values for the neighbourhood cells stores the ‘result_value’, too.
Get the rule’th cellular automaton for the given neighbourhood.
First, find out, how many possible combinations there are. That’s simply the nuber of cells in the neighbourhood as the exponent of the number of possible_values. Then, normalise the neighbourhood cells by sorting their positions first by X, then by Y axis. Finally, create code, that sums up all the values and looks up the target value from the rule lookup array.
Bases: zasim.cagen.bases.Computation
This base class counts the amount of nonzero neighbours excluding the center cell and offers the result as a local variable called nonzerocount of type int.
The name of the central neighbour will be provided as self.central_name.
Bases: zasim.cagen.computations.CountBasedComputationBase
This computation base is useful for any gameoflifelike step function in which the number of ones in the neighbourhood of a cell are counted to decide wether to change a 0 into a 1 or the other way around.
Parameters: 

