updateStates
function calls a function to update each node according to type,
which uses the color of the links into the node to determine the color of those exiting it.
Red means zero or false; green means one or true.
Mouse over a node to see its category.