This document lists all the distribution generator functions that need to be implemented in grids-distributions.js based on the updated grids-rules.js.
Already Implemented (from previous version)
withBlackCount(count)anySymmetry()fullySymmetric()fitsIn3x3()fitsIn4x4()onePerRowAndColumn()almostOnePerRowColumn()max3Neighbors()
Rule 1: At Most 6 Cells
All needed generators already implemented (withBlackCount).
Rule 2: Symmetric (Vertical OR Horizontal)
Positive:
anySymmetry()✓ (already implemented)fullySymmetric()✓ (already implemented)
Round-Specific Negative:
almostSymmetric()- symmetric except for 1-2 cellsleftRightEqual()- left 3 columns equal to right 3 columns (not mirrored)topBottomEqual()- top 3 rows equal to bottom 3 rows (not mirrored)copy3X3()- some 3×3 region copied to another locationleftRightMirror()- only left/right mirror (not vertical axis)topBottomMirror()- only top/bottom mirror (not horizontal axis)180degreeRotInv()- 180-degree rotational invariance (not vertical/horizontal symmetry)
Rule 3: Connected (One Blob)
Positive:
connectedLongSquiggle()- long meandering connected pathconnectedManyBlacks(count)- large connected blob with specified counttwoBlobsConViaPath()- two blobs connected by thin pathtree()- tree-like structure (branching, no cycles)thinkBlob()- compact thick connected blob
Round-Specific Negative:
twoLargeComponents()- two separate large blobs (8-12 cells each)threeMediumComponents()- three separate medium blobs (5-8 cells each)fourSquiggles()- four separate squiggle shapesfiveSquiggles()- five separate small squigglesmany2-4()- many small components of size 2-4
Rule 4: Border Only
Positive:
borderUniRand()- uniform random on border cellsthreeEdgesRand()- random placement on 3 edgestwoEdgesRand()- random placement on 2 edgescorner2x2sRand()- random cells in corner 2×2 regions
Round-Specific Negative:
noDeadCenter()- everywhere except center 2×2on3VerticalStripes()- only on columns 0-1, 2-3, 4-5on2HorizontalStripes()- only on rows 0-2 and 3-5noCenter2Columns()- not on center 2 columnsnoCenter2Rows()- not on center 2 rowscorner2x2s()- only in corner 2×2 regionsnoBorders()- only interior (no border cells)
Rule 5: No Isolated
Positive:
many2-4s()- many components of size 2-4, no isolatedtwoLargeComponents()- (reuse from rule 3)threeMediumComponents()- (reuse from rule 3)fourSquiqqles()- four separate squiggles (note: typo variant)many3s()- many components of size exactly 3longSquiqqle()- single long meandering path (note: typo variant)
Round-Specific Negative:
many1-4s()- mix of sizes 1-4 including isolatedmany1-2s()- mix of sizes 1-2 including isolatedmany1-3s()- mix of sizes 1-3 including isolatedfourSquiqqlesOne1()- four squiggles plus one isolated cellisolatedDots(count)- specified number of isolated single cells
Rule 6: All in One Half
Positive:
allInOneHalf()- all blacks in one half (top/bottom/left/right)allInOneThird()- all in one third (e.g., rows 0-1)allInOneCol()- all in single columnallInOneRow()- all in single rowallInOneHalfMiddleRemoved()- in one half but not on middle row/col of that halfallInOneHalfEdgeRemoved()- in one half but not on edgeallInCorner3x3()- all in one corner 3×3allInEdge2x3s()- all in edge 2×3 regionsallInOneHalfBordersOnly()- in one half, only on borders
Round-Specific Negative:
noCenter2RorC()- not in center 2 rows or center 2 columnsnoEdge2RorC()- not in edge 2 rows or edge 2 columnsallInTwoThirds()- fits in two thirdsallInCorner2x2s()- distributed in corner 2×2 regionsallInThreeRorC()- all in any 3 rows or any 3 columnsallInMiddle2RorC()- all in middle 2 rows or middle 2 columnsallInMiddle4x4()- all in center 4×4
Rule 7: One Per Row/Column
Positive:
onePerRowAndColumn()✓ (already implemented)
Round-Specific Negative:
almostOnePerRowColumn()✓ (already implemented)onePerRowColumnOneMissing()- one per row/col but one row/col emptyonePerRowColumnOneExtra()- one per row/col but one row/col has 2
Rule 8: Fits in 4×4
Positive:
fitsIn4x4()✓ (already implemented)fitsIn3x3()✓ (already implemented)fitsIn3x4()- fits in 3×4 windowfitsIn2x4()- fits in 2×4 windowfitsIn2x3()- fits in 2×3 windowtwoCompsIn4x4()- two components both in same 4×4pentominoIn4x4()- pentomino shape (5 cells) with extras in 4×4randomTetris()- tetris-like shapes in 4×4sextominoIn4x4()- 6-cell polyomino with extras in 4×4
Round-Specific Negative:
fitsIn2x5()- fits in 2×5 window (not 4×4)fitsIn3x5()- fits in 3×5 windowfitsIn4x5()- fits in 4×5 windowsextominoNot4x4()- 6-cell shape that doesn’t fit in 4×4septominoNot4x4()- 7-cell shape that doesn’t fit in 4×4fitsInTwo2x2s()- fits in two disjoint 2×2 regionsfitsInTwo2x3s()- fits in two disjoint 2×3 regionsfitsInTwo2x4s()- fits in two disjoint 2×4 regionsfitsIn2x6()- fits in 2×6 window (full row/column strip)
Rule 9: Has 2×2 Square
Positive:
has2x2Plus10-15()- 2×2 square plus 10-15 extra cellshas2x2Plus15-20()- 2×2 square plus 15-20 extra cellshas2x2Plus20-25()- 2×2 square plus 20-25 extra cellshas3x3Square()- 3×3 filled square (implies 2×2)has4x4Square()- 4×4 filled squaremultiple2x2s()- multiple 2×2 squareshas2x3RectPlus()- 2×3 rectangle plus extrashas3x2RectPlus()- 3×2 rectangle plus extrashasTshape()- T-shaped pattern (implies 2×2)
Round-Specific Negative:
has2x1Plus()- 2×1 domino shapes with extras (no 2×2)has1x2Plus()- 1×2 domino shapes with extras (no 2×2)hasLshape()- L-shaped patterns (3 cells)hasPlusShape()- plus/cross shapes (5 cells, no 2×2)hasDiagonal3()- diagonal patterns of length 3hasDiagonal4()- diagonal patterns of length 4denseCheckerboard()- dense checkerboard patterndenseStripedPattern()- dense striped patterndenseSpiralPattern()- dense spiral patterndenseZigzag()- dense zigzag pattern
Rule 10: Has Cell with 4 Neighbors
Positive:
plusShapePlus10-15()- plus shape (5 cells) plus 10-15 extrasplusShapePlus15-20()- plus shape plus 15-20 extrasplusShapePlus20-25()- plus shape plus 20-25 extrasmultiplePlusShapes()- multiple plus shapeshas3x3Square()- (reuse from rule 9)has4x4Square()- (reuse from rule 9)crossShapePlus()- cross/X shape with center having 4 neighborsdenseBlob4Neighbors()- dense blob with multiple cells having 4 neighborslargeBlobMany4Neighbors()- large blob with many cells having 4 neighbors
Round-Specific Negative:
max3Neighbors()✓ (already implemented)denseMax3Neighbors()- dense pattern where max is 3 neighborslongSnake()- long meandering path (max 2 neighbors)treeMax3()- tree structure (max 3 neighbors)checkerboardDense()- dense checkerboard (max 2 neighbors)spiralNoCenter()- spiral pattern without filled centerborderThickNoCenter()- thick border but hollow centermultipleDisjointBlobs()- multiple separate blobslShapesMany()- many L-shaped patternstShapesMany()- many T-shaped patterns (3 neighbors at junction)
Summary Statistics
- Total unique distribution types: 113
- Already implemented: ~8
- Need to implement: ~105
Implementation Notes
Many distributions can share helper functions:
- Random placement within regions
- Component generation (squiggles, blobs, trees)
- Symmetry operations
- Polyomino generation
- Neighbor counting utilities
- Boundary detection
Suggested implementation order:
- Helper utilities (random placement, neighbor counting)
- Simple spatial constraints (allInOneHalf, fitsInNxM)
- Component generators (connected blobs, squiggles, trees)
- Shape generators (polyominoes, L/T shapes, plus shapes)
- Pattern generators (checkerboard, spiral, striped)
- Complex combinations (component + density variations)