General purpose 2D cellular automaton