

The solver operates by maintaining this set of possible candidates while changes are made to the board and using them to recommend cells most likely to contain an animal (highlighted green) and keep track of cells which are known to contain an animal (highlighted gold). For example, the pattern of animal 1 has a width of 3 and a height of 2. For example, the candidate for animal 2 would have a position of (2 1) (4 1) and (3 2).įor each animal selected in a game, the solver first generates a set of all possible candidates by ensuring that its bounding box would fit within the game board.

This pattern can then be combined with its location to specify the tiles occupied by a candidate. In the above example, animal 1 would have a pattern of (1 2), (2 2), (2 3) and (3 3). The pattern of tiles that are occupied by an animal is stored as an array of offsets from the top left corner of its bounding box. First, the board is defined as an array of cells where the top left cell is (0 0).
