Grid Inventory Rectangle Fit Check
Enumerate actual empty axis-aligned rectangular inventory placements, with optional unique quarter-turn orientation and occupied cells; no repacking, T-shaped items or generic dimension-only fit alias.
Description
Grid inventory placement requires a complete empty rectangle.
Grid inventory placement requires a complete empty rectangle. Rotation adds a separate orientation when dimensions differ.1
Enter a nonempty binary occupied grid through 32×32, item height/width 1–32 and rotation flag. Enumerate unrotated positions then rotated positions if enabled and unequal; scan row then column. Return row, column, height, width records.
When to use Grid Inventory Rectangle Fit Check
Use Grid Inventory Rectangle Fit Check when you need to evaluate the supplied records under the calculation and evidence rules below. No repacking, irregular item shape or best-placement objective is solved.
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 Grid Inventory Rectangle Fit Check 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 occupiedCellBoard, itemHeightCells, itemWidthCells, allowQuarterTurnRotation using the field table and calculation rules, then run the tool.
- Read fittingPlacementsRowColumnHeightWidth, anyPlacementFits. 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 |
|---|---|---|---|
| occupiedCellBoard | Occupied cell board | list of list of number | Required |
| itemHeightCells | Item height cells | number | Required |
| itemWidthCells | Item width cells | number | Required |
| allowQuarterTurnRotation | Allow quarter turn rotation | boolean | Required |
Enter a nonempty binary occupied grid through 32×32, item height/width 1–32 and rotation flag. Enumerate unrotated positions then rotated positions if enabled and unequal; scan row then column. Return row, column, height, width records.
placement fits iff every rectangle cell is0 Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| fittingPlacementsRowColumnHeightWidth | Fitting placements row column height width | list of list of number |
| anyPlacementFits | Any placement fits | boolean |
{
"input": {
"occupiedCellBoard": [
[
0,
1
],
[
0,
0
]
],
"itemHeightCells": 1,
"itemWidthCells": 2,
"allowQuarterTurnRotation": true
},
"output": {
"fittingPlacementsRowColumnHeightWidth": [
[
1,
0,
1,
2
],
[
0,
0,
2,
1
]
],
"anyPlacementFits": true
}
} Limitations and assumptions
No repacking, irregular item shape or best-placement objective is solved.
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 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
-
Grid Inventory Rectangle Fit Check — tool.io
Similar or alternative tools
- 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.
- Battleship Parity Placement Strategy
A Battleship parity screen tests whether selected cells intersect every viable straight ship placement. Single-cell placements need separate deduplication.