Better Minesweeper Docs
Features

Probability Overlay

See exactly how likely a tile is to be a mine using a real-time, background constraint-solver.

How to Use

ActionMethod
Toggle overlayPress P (default hotkey)
Activate via menuMenu bar toggle
Auto-startEnable show_live_probabilities in settings

When active, each covered tile displays a percentage from 0% (guaranteed safe) to 100% (guaranteed mine). Tiles with no data (disconnected from revealed tiles) show no label.

How It Works

The overlay uses a border probability solver that analyzes the constraint relationships between revealed numbers and adjacent covered tiles:

  1. Constraint extraction — each revealed number creates a constraint: "exactly N mines among my covered neighbors."
  2. Component decomposition — the frontier is split into independent groups of tiles that share no constraints, so each group can be solved separately.
  3. Enumeration — for each component, the solver enumerates all valid configurations consistent with the constraints, counting how often each tile is a mine.
  4. Global combination — results are combined with the remaining mine count to produce global probabilities, including an off-edge probability for tiles not touching any number.
C++ acceleration: When the C++ solver (border_probability_cpp) is available, it runs significantly faster than the Python fallback. Both produce identical results.

Performance

  • The solver runs on a background daemon thread and posts results back to the UI via QTimer.singleShot(0, ...), so the game never freezes.
  • Board-state caching prevents redundant solves — the overlay only recalculates when the board actually changes.
  • A generation counter tracks board changes. If a new change arrives before the solver finishes, the stale result is discarded and a fresh solve begins immediately.
  • On very large boards (50×50+), the solver may take noticeably longer. The overlay will appear as soon as results are ready.

Cluster Highlight

A separate overlay that highlights the frontier cluster (connected constraint group) under your cursor. Toggle with Alt+Shift+C.

This shows which tiles are mathematically linked — solving one affects the probabilities of the others in the same cluster, but not tiles in different clusters.

Impact on Stats

Assisted run: Activating the probability overlay during a game marks that run as assisted. Assisted runs are still recorded in all-time stats but are excluded from personal best records.

If you want to use the overlay for practice without affecting your stats, you can enable pause_alltime_recording in settings to stop recording entirely.

Flags & the Solver

Flagged tiles are treated as confirmed mines by the solver — they are subtracted from each number's constraint. This means:

  • Correctly flagged mines improve solving accuracy.
  • Incorrectly flagged tiles will produce wrong probabilities.
  • The solver does not verify whether your flags are correct.