Project Computing
Colouring problem visualization
Last updated: 13 Nov 2011

This page contains a simple Javscript visualisation of a very simple colouring problem with either:

Each cell is an independent automaton. I was curious to see it in action after reading an account of a more general problem in Peter Miller's book The Smart Swarm, in which he describes an experiment by Michael Kearns, An Experimental Study of the Coloring Problem on Human Subject Networks which used humans to solve a more general colouring problem.

So, this very simple simulation implements the basic idea of each cell trying to find a solution using only information about its immediate neighbours. The "flip" button will randomly change some cells whilst the simulation is running; it is interesting to see how this can "short circuit" some slowly-evolving solutions.

In grid mode only, setting the "Try for unused, rather than just least worst colour on swap" checkbox means that when a cell detects it is the same colour as one or more of its neighbours, it prefers to assign an unused colour to itself, rather than changing to a colour used by one of its neighbours.

Each cell cycles independently, with an average time between cycles of 150 ms. In the circle arrangement, a cell flips if it is the same colour as just one of its randomly selected neighbours. In the grid arrangement, a cell flips if it is the same colour as any of its neighbours.

Kent Fitch, Project Computing

Use grid pattern (otherwise circle)
Try for unused, rather than just least worst colour on swap
cycles:
1 2 3 10% 20% 30%

Project Computing Pty Ltd ACN: 008 590 967 contact@projectComputing.com