Battleship Parity Placement Strategy
Enumerate straight ship placements in declared currently available cells and audit actual parity search coverage; length-one ships need not be covered, no hidden-ship probability or optimal shot guarantee.
Description
A Battleship parity screen tests whether selected cells intersect every viable straight ship placement.
A Battleship parity screen tests whether selected cells intersect every viable straight ship placement. Single-cell placements need separate deduplication.1
Enter a nonempty binary availability grid through 32×32 with 1 available, ship length 1–32 and parity 0/1. Enumerate horizontal/vertical all-available placements, counting length 1 once. Return selected cells, viable/covered counts and complete-coverage flag requiring at least one placement.
When to use Battleship Parity Placement Strategy
Use Battleship Parity Placement Strategy when you need to evaluate the supplied records under the calculation and evidence rules below. No ship inventory, hit evidence, probability ranking or firing action is supplied.
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 Battleship Parity Placement Strategy and understand its results
- Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
- Enter availableCellBoard, shipLength, selectedSearchParity using the field table and calculation rules, then run the tool.
- Read paritySearchCells, viableShipPlacementCount, coveredViablePlacementCount, allViablePlacementsCovered. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- 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 field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| availableCellBoard | Available cell board | list of list of number | Required |
| shipLength | Ship length | number | Required |
| selectedSearchParity | Selected search parity | number | Required |
Enter a nonempty binary availability grid through 32×32 with 1 available, ship length 1–32 and parity 0/1. Enumerate horizontal/vertical all-available placements, counting length 1 once. Return selected cells, viable/covered counts and complete-coverage flag requiring at least one placement.
coveredPlacement=any available cell of selected parity within placement Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| paritySearchCells | Parity search cells | list of list of number |
| viableShipPlacementCount | Viable ship placement count | number |
| coveredViablePlacementCount | Covered viable placement count | number |
| allViablePlacementsCovered | All viable placements covered | boolean |
{
"input": {
"availableCellBoard": [
[
1,
1,
1
],
[
1,
1,
1
]
],
"shipLength": 3,
"selectedSearchParity": 0
},
"output": {
"paritySearchCells": [
[
0,
0
],
[
0,
2
],
[
1,
1
]
],
"viableShipPlacementCount": 2,
"coveredViablePlacementCount": 2,
"allViablePlacementsCovered": true
}
} Limitations and assumptions
No ship inventory, hit evidence, probability ranking or firing action is supplied.
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. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use Minesweeper Neighbor Mine Count (8-Neighbors): Minesweeper clues count mines in eight neighboring cells. The center cell is never part of its own count. For a complementary task, 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.
References
-
Battleship Parity Placement Strategy — tool.io
Similar or alternative tools
- Minesweeper Neighbor Mine Count (8-Neighbors)
Minesweeper clues count mines in eight neighboring cells. The center cell is never part of its own count.
- 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.