Maailmantutkija

Kasvatuskirja uteliaalle mielelle

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)

Rule 1: At Most 6 Cells

All needed generators already implemented (withBlackCount).

Rule 2: Symmetric (Vertical OR Horizontal)

Positive:

Round-Specific Negative:

Rule 3: Connected (One Blob)

Positive:

Round-Specific Negative:

Rule 4: Border Only

Positive:

Round-Specific Negative:

Rule 5: No Isolated

Positive:

Round-Specific Negative:

Rule 6: All in One Half

Positive:

Round-Specific Negative:

Rule 7: One Per Row/Column

Positive:

Round-Specific Negative:

Rule 8: Fits in 4×4

Positive:

Round-Specific Negative:

Rule 9: Has 2×2 Square

Positive:

Round-Specific Negative:

Rule 10: Has Cell with 4 Neighbors

Positive:

Round-Specific Negative:


Summary Statistics

Implementation Notes

Many distributions can share helper functions:

Suggested implementation order:

  1. Helper utilities (random placement, neighbor counting)
  2. Simple spatial constraints (allInOneHalf, fitsInNxM)
  3. Component generators (connected blobs, squiggles, trees)
  4. Shape generators (polyominoes, L/T shapes, plus shapes)
  5. Pattern generators (checkerboard, spiral, striped)
  6. Complex combinations (component + density variations)