contraction algorithm

pre: html demo
next: hedgehog s dilemma