Minesweeper Neighbor Mine Count (8-Neighbors)

Compute observed bounded Minesweeper eight-neighbor counts excluding the center, including counts at mine cells; no first-click generation, board inference or solver.

Description

Minesweeper clues count mines in eight neighboring cells.

Minesweeper clues count mines in eight neighboring cells. The center cell is never part of its own count.1

Enter a nonempty rectangular binary mine grid through 32×32. Return a same-size count matrix, including neighbor counts at mined cells.

When to use Minesweeper Neighbor Mine Count (8-Neighbors)

Use Minesweeper Neighbor Mine Count (8-Neighbors) when you need to evaluate the supplied records under the calculation and evidence rules below. No revealing, flood fill, flag verification or mine placement probability is inferred.

Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.

How to use Minesweeper Neighbor Mine Count (8-Neighbors) and understand its results

  1. Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
  2. Enter mineBoard using the field table and calculation rules, then run the tool.
  3. Read neighborMineCounts. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
mineBoardMine boardlist of list of numberRequired

Enter a nonempty rectangular binary mine grid through 32×32. Return a same-size count matrix, including neighbor counts at mined cells.

clue[r,c]=sum(eight valid neighboring mine flags)

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
neighborMineCountsNeighbor mine countslist of list of number
json
{
  "input": {
    "mineBoard": [
      [
        0,
        1,
        0
      ],
      [
        0,
        0,
        0
      ],
      [
        1,
        0,
        1
      ]
    ]
  },
  "output": {
    "neighborMineCounts": [
      [
        1,
        0,
        1
      ],
      [
        2,
        3,
        2
      ],
      [
        0,
        2,
        0
      ]
    ]
  }
}

Limitations and assumptions

No revealing, flood fill, flag verification or mine placement probability is inferred.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Matrices are limited to 128 rows and 128 entries per row. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Random-Walk Carve Percent Target (Procgen): Coverage of walkable map cells is an evidence audit. Repeated visits should count once toward the caller coverage target. For a complementary task, use Battleship Parity Placement Strategy: A Battleship parity screen tests whether selected cells intersect every viable straight ship placement. Single-cell placements need separate deduplication.

References

  1. Minesweeper Neighbor Mine Count (8-Neighbors) — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies