Code for working with a particular kind of logic puzzle; see README.