[Expert Game using the Equation Strategy] [Expert Game using the Mio Equation Strategy]

The PGMS Equation Strategy

The PGMS Equation Strategy represents the information available on the board as a set of integer linear equations. Associated with an unknown tile  t is a variable  x t that has the value one if the tile hides a mine, or zero otherwise.

An equation is generated for each known tile with an adjacent unknown tile. Each equation has the form  c = t S x t where  S is a set of unknown tiles, and  c is a constant indicating the number of mines hidden among  S . To simplify notation, the equation is written as  c S .

Since the total number of hidden mines is known, an additional equation simply equates this number with the sum of all of the unknown tiles. For performance reasons, this equation is used only when there are eight or less unknown mines, or when guessing.

Every time a tile  t is determined safe or a mine, the board changes are propagated to all the equations containing  t and a new equation for the unknown neighbors of  t is added. To determine whether tiles are safe or a mine, the Equation Strategy iteratively applies the following rules until none are applicable:

The Equations Strategy must guess when presented with a board to which none of the rules apply. The Equation Strategy inspects each equation when guessing. For each tile  t it computes the value  P t as follows. Given an equation  c S , define its single equation probability to be  c / S . The value P t is largest single equation probability among all equations that contain  t . The Equation Strategy picks the tile  t that minimizes  P t and then applies the rules listed above. A random choice is made when there is more than one tile that minimizes  P t .

The Mio inspired modification to the Equation Strategy adds one more rule. Let  c 0 S 0 ,   c 1 S 1 , and  c 2 S 2 be three equations such  c 0 + c 1 < c 2 . The combined equation is  c 2 - c 1 - c 0 S 2 S 1 S 0 - S 1 S 0 S 2 - S 1 S 0 . If  c 2 - c 1 - c 0 = S 2 S 1 S 0 , all the tiles in  S 2 S 1 S 0 are a mine and all the tiles in  S 1 S 0 S 2 S 1 S 0 are safe. This rule is useful only when  S 0 and  S 2 share a tile, and  S 1 and  S 2 share a different tile.