[Expert Game using the Equation Strategy] [Expert Game using the Mio 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=\sum _{t\in 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\circeq 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:

- If $0\circeq S$, all tiles in $S$ are safe.
- If $c\circeq S$ and $c=\left|S\right|$, all tiles in $S$ are a mine.
- If ${c}_{0}\circeq {S}_{0}$ and ${c}_{1}\circeq {S}_{1}$ are two equations such that ${S}_{0}$ is a proper subset of ${S}_{1}$, the equation ${c}_{1}-{c}_{0}\circeq {S}_{1}\setminus {S}_{0}$ is added.
- Let ${c}_{0}\circeq {S}_{0}$ and ${c}_{1}\circeq {S}_{1}$ be two equations such ${c}_{0}<{c}_{1}$. The difference between the two equations is ${c}_{1}-{c}_{0}\circeq \left({S}_{1}\setminus {S}_{0}\right)-\left({S}_{0}\setminus {S}_{1}\right)$. If ${c}_{1}-{c}_{0}=\left|{S}_{1}\setminus {S}_{0}\right|$, all the tiles in $\left({S}_{1}\setminus {S}_{0}\right)$ are a mine and all the tiles in $\left({S}_{0}\setminus {S}_{1}\right)$ are safe. This rule is useful only when ${S}_{0}$ and ${S}_{1}$ share a tile.

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\left(t\right)$ as follows. Given an equation $c\circeq S$, define its single equation probability to be $c/\left|S\right|$. The value $P\left(t\right)$ is largest single equation probability among all equations that contain $t$. The Equation Strategy picks the tile $t$ that minimizes $P\left(t\right)$ and then applies the rules listed above. A random choice is made when there is more than one tile that minimizes $P\left(t\right)$.

The Mio inspired modification to the Equation Strategy adds one more rule. Let ${c}_{0}\circeq {S}_{0}$, ${c}_{1}\circeq {S}_{1}$, and ${c}_{2}\circeq {S}_{2}$ be three equations such ${c}_{0}+{c}_{1}<{c}_{2}$. The combined equation is ${c}_{2}-{c}_{1}-{c}_{0}\circeq \left({S}_{2}\setminus \left({S}_{1}\cup {S}_{0}\right)\right)-\left(\left({S}_{1}\cup {S}_{0}\right)\setminus {S}_{2}\right)-\left({S}_{1}\cap {S}_{0}\right)$. If ${c}_{2}-{c}_{1}-{c}_{0}=\left|{S}_{2}\setminus \left({S}_{1}\cup {S}_{0}\right)\right|$, all the tiles in $\left({S}_{2}\setminus \left({S}_{1}\cup {S}_{0}\right)\right)$ are a mine and all the tiles in $\left(\left({S}_{1}\cup {S}_{0}\right)\setminus {S}_{2}\right)\cup \left({S}_{1}\cap {S}_{0}\right)$ 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.