clone

a browser grid puzzle game where you push words around to rewrite the rules of each level

main
miau-is-true / docs / worlds / crossword.md
crossword.md 13.3K source

Crossword (world bible)

  • Pack: mods/worlds/crossword.cjs (pack id crossword, version 1.0.0)
  • World identity (manifest.world, accepted by loadMod today but not validated): glyph ✏️, tagline "Every word can be read across and down.", accent win.
  • Custom tiles: none. No palette, and the only nouns are MIAU, ROCK, FLAG, and WALL, which all have default glyphs in src/main.js.
  • Custom rules: none. Only IS, AND, YOU, PUSH, STOP, WIN, and DEFEAT appear.

Theme

A crossword, or a printer's type case. The board is a grid of words, and a word tile belongs to every line that passes through it: one IS can be read across and down, a noun can close one sentence and open the next, and two letters can share one square. Walls, where they appear, are the crossword's black squares.

Mechanic

Pure grammar. There is nothing to learn in this world except how the parser reads the board:

  1. Crossing. A tile is read on both axes. One IS can serve a horizontal and a vertical sentence at once.
  2. AND on both sides. A subject chain (ROCK AND MIAU IS YOU) and a predicate chain (ROCK IS DEFEAT AND PUSH).
  3. Pinned sentences. A sentence flush against a board edge in the top or bottom row can't be broken, but you can add words in front of it or after it. This is the world's way of saying "you can't remove this, so extend it".
  4. Stacks. Two words in one cell travel together forever. The puzzle is to find a sentence where both halves are welcome.
  5. Nouns as answers. A noun after IS transforms things, and the change is permanent. That lets a single IS be spent twice.

Levels

Verified on the W6 engine (Baba-style precedence, design decision D23) with the committed CLI: node tools/solve.mjs mods/worlds/crossword.cjs (default 2M budget; spend-it-twice declares solverBudget: 4000000 for margin). All 7 levels are SOLVED, the run exits 0 (about 6 minutes), and there are no BYPASS, HANDS-OFF, TRIVIAL, WON-AT-START, SKIPPABLE, or LIMIT flags. No level sets allowBypass.

mustForm is declared only where --level <id> --forbid '<rule>' returned UNSOLVED (an exhaustive proof), never LIMIT.

# id Title Category Teaches Steps Flags mustForm (proof) Intended insight
1 across-and-down Across and down required crossing (one IS, two sentences) 16 none none: FLAG IS WIN is avoidable (see note) FLAG sits over the IS of MIAU IS YOU. Slide WIN in under that IS from the side to read FLAG IS WIN down. Pushing it up from below lifts the IS out of your own sentence.
2 company Company required AND on the subject side, something else is YOU 20 none ROCK IS YOU (UNSOLVED, 36,800 states) MIAU IS YOU is pinned at the top right and the cat is penned. Push ROCK and AND up into the open cells in front: ROCK AND MIAU IS YOU. ROCK MIAU IS YOU without AND does nothing.
3 shove-the-danger Shove the danger required AND on the predicate side 23 none ROCK IS PUSH (UNSOLVED, 121,760) A column of rocks is DEFEAT, and the sentence is pinned in the corner. You can't remove DEFEAT, so append AND PUSH and shove a rock out of the column.
4 carry-the-pair Carry the pair required stacked words, DEFEAT on its own carrier 24 none ROCK IS DEFEAT (UNSOLVED, 527,180) The stacked YOU+DEFEAT can't be split, and a YOU that is also DEFEAT destroys itself. On MIAU the pair is suicide. Build ROCK / IS / YOU+DEFEAT down from the pinned ROCK IS STOP: every rock in the ring around the flag destroys itself, and you walk in.
5 pass-it-on Pass it on required noun as predicate, transformation 24 none ROCK IS FLAG (UNSOLVED, 335,688) The flag is sealed behind walls. Insert ROCK IS in front of the pinned FLAG IS WIN to read ROCK IS FLAG IS WIN. The one FLAG word is the answer to the first clue and the start of the second, and the rock next to you becomes a winning flag.
6 down-to-miau Down to MIAU optional a noun at a crossing (predicate down, subject across) 19 none ROCK IS MIAU (UNSOLVED, 202,232) Build ROCK / IS / MIAU down onto the pinned MIAU IS YOU. The rock in the sealed room becomes a second cat. A black square (wall) above YOU blocks the shorter ROCK IS YOU down.
7 spend-it-twice Spend it twice challenge sequencing, permanence of transformation 35 none WALL IS ROCK (UNSOLVED, 1,905,020) There's one free IS, and WIN and the flag are walled in. Build WALL IS ROCK down from the pinned WALL: every wall turns into a passable rock and stays one. Then take the same IS for a win rule. The solver found ROCK IS WIN across, which also turns the flag into a rock on the way. FLAG IS WIN down from the pinned FLAG works too. WALL IS FLAG is impossible because the only FLAG word is pinned as a subject.

Why level 1 has no mustForm. --forbid 'FLAG IS WIN' solves in 26 steps: push IS down so FLAG IS YOU reads down (the cat stops being YOU, and the flag becomes the player), then build MIAU IS WIN across and walk the flag onto the cat. That's still a crossing route, so it teaches the same lesson, and I left it in.

Rework for W6 (2026-09-23).

  • carry-the-pair originally had FLAG IS WIN+DEFEAT and a self-win on MIAU. Under W6, a YOU that is also DEFEAT is destroyed, so the old route kills the cat. The stack is now YOU+DEFEAT, and the lesson is its opposite: DEFEAT kills its own carrier, so give the pair to the thing you want gone.
  • shove-the-danger originally had a loose STOP decoy. The level itself still worked under W6 (PUSH beats STOP just makes AND PUSH AND STOP a second answer). But three loose words made --forbid 'ROCK IS PUSH' hit LIMIT at 2M, and still needed about 5M to prove. I removed the decoy and narrowed the board to 7 by 7, so the proof takes 121,760 states.
  • pass-it-on was narrowed from 10 by 7 to 8 by 7 with the same layout logic, so its mustForm proof fits the default budget (it took 9.5M before).

Solver routes, for replay:

across-and-down   URRRRRULLLDDRRRR
company           DLUURULDLUDDLUUDDDRR
shove-the-danger  ULURRDDRUULURDRURLDDRUR
carry-the-pair    DRRUULLURRRDRULURRLDRDDR
pass-it-on        DDLUUULUURLDDRULURRDDDDR
down-to-miau      ULLDDLURULULDDDDDDR
spend-it-twice    UUURRRLDDRUULURRLDRDDDRDRUUUULDLUDD

Design notes

  • Pinning is the level-design tool of this world. Without custom rules, the only way to make a sentence unbreakable is geometry. Three words in the top or bottom row that touch a side edge can't be pushed in any direction. The top row can be pushed toward only from below, and never away from the edge. Every "given" sentence in this world is pinned like that. The catch is that players can't see it (friction F-XW2).
  • Pinning traps words too. A word pushed into column 0, the last column, the top row, or the bottom row can only move along that edge from then on. An IS stuck under a pinned word in an edge column can never be taken out. I moved the challenge's FLAG WALL IS STOP row away from the corner for this reason. Otherwise the IS under WALL would have been unrecoverable and the "spend it twice" route would have been impossible.
  • Self-win is the default shortcut in a pure-grammar world. Any loose WIN near a YOU noun's word collapses the level to X IS YOU plus X IS WIN. Levels 2 to 7 keep MIAU pinned so it can't take a loose predicate.
  • Standing on the goal, then writing the rule. In the first draft of carry-the-pair (a WIN+STOP stack), the solver broke the flag's sentence, walked onto the flag, and rebuilt FLAG IS WIN+STOP underneath the cat. STOP doesn't eject an occupant, so that won. The W6 rework replaced the whole stack, so the current level no longer has this route.
  • The solver shows only the shortest route. In down-to-miau, the first draft was won by the unintended ROCK IS YOU down onto the shared YOU. I only saw that by replaying the path. A wall (black square) now blocks that column (friction F-XW10).
  • Softlocks. Every level can be softlocked with YOU still present by pushing a needed word into an edge row or column. That's ordinary Sokoban, and undo recovers from it. The no-YOU states reachable in this world are: breaking MIAU IS YOU (only in across-and-down, where it isn't pinned), walking into a DEFEAT rock (shove-the-danger), and, in carry-the-pair, giving YOU+DEFEAT to MIAU or walking into a rock after only ROCK IS DEFEAT forms. No level requires entering a no-YOU state. The engine rejects every move with no YOU, so undo or restart is the only way out, and the stage's NOTHING IS YOU overlay signals that.
  • Spacing. Given sentences sit in edge rows with at least one blank row between them and the play area wherever the board allows. company puts FLAG IS WIN and WALL IS STOP on the same bottom row, six cells apart, and shove-the-danger and pass-it-on put two given sentences side by side on the bottom row after being narrowed.

Parser and rule behaviour found while building

All repros use the text-grid notation from the pack (m r f w are things, uppercase are words, A+B is a stack). They were first run on src/engine.js as of 2026-09-23 and re-checked on the W6 engine (D23). Items marked resolved by W6 no longer hold, but are kept because they explain the older friction entries.

  1. Crossing works as expected. A horizontal and a vertical sentence can share one IS, and each produces its own span (state.sentences has one h and one v). Repro: . FLAG . / MIAU IS YOU / . WIN . gives FLAG IS WIN; MIAU IS YOU.
  2. A noun does double duty in one line. MIAU IS ROCK IS WIN gives MIAU IS ROCK and ROCK IS WIN, because scanning restarts at every noun. This is what pass-it-on is built on.
  3. Resolved by W6. AND was greedy and never backtracked. Before W6, ROCK AND+IS FLAG gave no rule. Under W6, a stacked cell contributes one word per sentence path and every valid alternative is enumerated, so it now gives ROCK IS FLAG. MIAU AND+ROCK IS YOU still gives only ROCK IS YOU, now by design (the stacked ROCK starts its own sentence, and MIAU AND IS isn't valid).
  4. Stacks can't form or split during play. Words are always PUSH, so a word can never be moved into a cell that holds another word, and a stack always moves as one piece. Every stack is placed by the author and stays for the whole level. carry-the-pair relies on this. The only exception is SINK, which destroys every word in the cell.
  5. A stack still yields two same-length spans (unchanged by W6). FLAG IS WIN+DEFEAT gives spans FLAG IS WIN and FLAG IS DEFEAT on the same axis. Neither contains the other, so the renderer draws two bars over the same cells (F-XW3).
  6. Words in front of or after a sentence are ignored. YOU MIAU IS WIN parses as MIAU IS WIN, and MIAU IS YOU ROCK as MIAU IS YOU. This is expected, but it means a level can be won at start by an unnoticed adjacency.
  7. Resolved by W6. X IS X didn't protect. Under W6, ROCK IS ROCK blocks ROCK IS FLAG (checked: the rock stays a rock).
  8. Resolved by W6. Conflicting transformations followed object order. Under W6, spatial reading order decides: with ROCK IS FLAG in the row above ROCK IS WALL, the rock becomes a FLAG, and swapping the rows gives a WALL. That's now visible on the board.
  9. Transformation chains still advance one link per turn (unchanged by W6). With ROCK IS FLAG and FLAG IS WALL, a rock is a FLAG after reset and becomes a WALL on the next accepted move. The level loads in an intermediate state (F-XW6 b).
  10. A transformation predicate in an AND chain can remove your own YOU (unchanged). MIAU IS YOU AND ROCK turns the cat into a rock at reset, which leaves nothing as YOU, even though the board reads MIAU IS YOU.
  11. Resolved by W6. STOP beat PUSH. Under W6, ROCK IS STOP AND PUSH is pushable. The old shove-the-danger decoy relied on the old order and has been removed.
  12. Resolved by W6, and now a lesson. DEFEAT didn't affect its own carrier. Under W6, ROCK IS YOU+DEFEAT destroys every rock at once, even a lone rock, and MIAU IS YOU AND WIN+DEFEAT is destroyed, not won (defeat resolves before win). The new carry-the-pair is built on self-destruction.
  13. SINK destroys words for good (unchanged). Pushing a word into a cell with a SINK thing removes the word and the thing.
  14. Moving onto a thing on the same turn that makes it WIN wins (unchanged by W6). Repro: MIAU IS YOU / FLAG IS . / . . f+WIN+STOP / . . m, step up. The cat pushes the WIN+STOP stack off the flag into FLAG IS _ and enters the flag cell on the same move. STOP is checked before the move, and WIN after it, so the move wins.

Friction filed

F-XW1 to F-XW13 (first pass) and F-XW14 to F-XW16 (the W6 rework) in friction.md. The most severe are F-XW2 (pinned sentences are invisible), F-XW3 (stacks are hard to read), and F-XW8 (solver capacity limits how big a challenge level can be).