def test_run_nondeterministic_weave(self): # implement nazim fatès density classifier compu = cagen.DualRuleCellularAutomaton(184, 232, 0.1) sf = cagen.automatic_stepfunc(computation=compu, histogram=True, needs_random_generator=True) sf.gen_code() simu = CagenSimulator(sf) for i in range(50): simu.step_inline()
def test_compare_nondeterministic_weave(self): compu = cagen.DualRuleCellularAutomaton(184, 232, 1) sf = cagen.automatic_stepfunc(size=(100,), computation=compu, needs_random_generator=True, histogram=True) sf.gen_code() simu = CagenSimulator(sf) br = cagen.BinRule(rule=184, config=simu.get_config()) for i in range(50): simu.step_inline() br.step_inline() assert_arrays_equal(simu.get_config(), br.get_config())