Skip to content

About

Read three colour grid examples and paint the missing answer. Build the book by contributing a visual riddle of your own.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Grid Riddles

A community-built book of visual reasoning riddles. Each riddle shows three pairs of colour grids. Infer the transformation and paint the output for a fourth grid.

The book opens with three starter riddles and has thirty slots for contributions. Each pull request adds a single original riddle. The desk checker applies the declared rule to all four inputs, tests the worked examples for simple shortcuts, and compares them with the current book.

Play locally

Requires Node 22 and a static HTTP server. There are no dependencies and the site ships as plain HTML, CSS, JavaScript and JSON. Generate the data index and serve the folder:

npm run registry
npm run serve

Open http://localhost:8080/ and choose a riddle. Pick a colour and select a square to paint it. On the keyboard, tab into the answer grid, move with the arrows, then press Space or type a digit to paint. Use Check answer when the grid is ready. Add #q001 to the page URL to open the first riddle directly.

Use npm run registry -- --no-history in a checkout without repository history. The deployment workflow generates the index and reads bylines from commit history. The rule is hidden during play, and both contributions and derived answers are public data.

Add a riddle

  1. Open the Grid Riddles desk and select an available slot. Read its limits in desk/items/<id>.json.
  2. Follow the format guide and write the one file named by the item's slot_path.
  3. Run npm run check -- riddles/q004.json, substituting your slot. Look for ACCEPTED:.
  4. Follow the contribution rules to open a pull request titled with the item ID. Use the public lease_ref on the Lease line if the desk supplied one.

Verification and deployment

npm test runs the checker, independent oracle, workflow, gate, registry, and player tests. The gate and registry history integration tests use throwaway repositories. Set GRID_RIDDLES_NO_GIT=1 to omit those integration tests in a no-git environment.

The pull-request workflow reads the contribution as data and runs the gate, checker, item limits and duplicate checks from the base checkout. The deployment workflow builds a Pages artifact on pushes to main. It reads contributor credit from the newest adding commit for each riddle, including desk bylines.

For the creator, set Pages to GitHub Actions, set default workflow permissions to read-only, and require desk-check on the default branch. Allow outside pull requests to run the read-only check and prevent force pushes and deletion. The desk's App needs its authorized branch and merge access. The Pages job skips private repositories.

Code is licensed under Apache 2.0. Riddles are licensed under CC BY 4.0. See NOTICE for attribution and SECURITY.md for private reporting.

About

Read three colour grid examples and paint the missing answer. Build the book by contributing a visual riddle of your own.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages