zasim.elementarytools - Tools for manipulating Elementary Step Functions

This module offers methods and user interaction widgets/windows for handling the table-like step functions of elementary cellular automatons.

  • A bit of functionality to generate a rule number from arbitrary step functions by running them on a pre-generated target and finding out how it behaved.
  • ...
zasim.elementarytools.digits_and_values_to_rule_nr(digits_and_values, base=2)[source]
zasim.elementarytools.minimize_rule_number(neighbourhood, number, base=2)[source]
zasim.elementarytools.minimize_rule_values(neighbourhood, digits_and_values)[source]
zasim.elementarytools.flip_all(neighbourhood, results, base=2)[source]
zasim.elementarytools.permutation_to_index_map(neighbourhood, permutation, base=2)[source]

Figure out from the given neighbourhood and the permutation what position in the old array each entry in the new array is supposed to come from to realize the permutations.

Attr neighbourhood:
 The neighbourhood object to use.
Attr permutations:
 A dictionary that says what cell to take the value from for any given cell.
zasim.elementarytools.apply_index_map_values(digits_and_values, index_map)[source]
zasim.elementarytools.apply_index_map(results, index_map)[source]
zasim.elementarytools.flip_offset_to_permutation(neighbourhood, permute_func)[source]

Apply the permute_func, which takes in the offset and returns a new offset to the neighbourhood offsets and return a permutation dictionary that maps each name of a cell to the name of the cell its data is supposed to come from.

zasim.elementarytools.mirror_by_axis(neighbourhood, axis=[0], base=2)[source]
zasim.elementarytools.flip_v(neighbourhood, results, cache={}, base=2)[source]
zasim.elementarytools.flip_h(neighbourhood, results, cache={}, base=2)[source]
zasim.elementarytools.rotate_clockwise(neighbourhood, results, cache={}, base=2)[source]

Previous topic

zasim.gui.animation - Animation to show during long-running tasks

This Page