All published worksheets from http://sagenb.org
load /home/jhyn/Bureau/Sage/CelAut.sage
h = CellularAutomaton1D(2,1,118)
h.print_local_rule()
h.display("(011)^60 000 (011)60", width = 300, time = 200, torus = False)
g = cyclic_automaton(3)
g.display(random_conf((1,2,4),1000), width = 600, time = 200)
def f(a,b,c,d,e,f,g): def maj(a,b,c): if a==b or a==c: return a else: return b if d==0: return maj(a,c,d) else: return maj(d,e,g)
C = CellularAutomaton1D(2,3,f)
C.display(random_conf((1,1),2000),width=400, time=800,scale = 3)