Some implementations for FlatNPuzzle.initialize.