Created by alain-busser

Created on April 26, 2018

525 Bytes

rule 110 (in Wolfram’s notation) for a one dimensional cellular automaton . Proved to be Turing-complete by Matthew Cook. To run an experiment, just init(); screen()

from kandinsky import *
from random import *
def alive(x,y):
  if x==0 or x==320: return False
  elif get_pixel(x-1,y-1) and not get_pixel(x,y-1) and not get_pixel(x+1,y-1): return True
  else: return get_pixel(x-1,y-1)==get_pixel(x,y-1)==get_pixel(x+1,y-1)
def init():
  for x in range(320): set_pixel(x,0,b)
  for n in range(10):
def screen():
  for y in range(1,240):
    for x in range(320):
      if alive(x,y): set_pixel(x,y,b)