The rectangle strategy is the first level 3 strategy that is not an extension of easier ones. As I explained in Chapter 2, this strategy relies on sets of cells that form rectangular patterns. You implement it with the functions rectangle(), rectangle_pattern(), rectangle_cell(), and rectangle_step() (see Listings 12-1, 12-2, 12-3, and 12-4, respectively).
To program the rectangle strategy, you need to check all possible rectangular patterns of cells and follow the chain around the four boxes that contain the corners of the patterns.
Only the following nine combinations of four boxes are possible: ...