Answers and clues

Crosswords ↓

One entry per line, as clue : answer. Spaces in an answer are left out of the grid; other characters, such as a hyphen, take a cell.

Crosswords

Crosswords appear here.

Target picture

Optional. The crossword is pushed towards the picture's shape: its opaque pixels if it is partly transparent, otherwise its pixels at least as dark as the threshold.

Settings

Penalty weights

How this works

The first answer goes across the middle of an empty grid. Then, one at a time, a random unplaced answer is tried through every matching letter, keeping only placements that create no stray words. Each is scored and one is drawn, lower scores being more likely. This greedy layout is retried if some answer cannot be placed.

Refinement repeats a move: take out a few answers (never one whose removal would split the crossword) and put them back greedily. The new layout replaces the old with probability 1 / (1 + enew − old), so better scores are usually kept.

The score is the sum of seven weighted terms, all lower-is-better:

  • Area: the square root of rows × columns.
  • Width / height: how far the shape is from the desired ratio, squared.
  • Across / down: how far the word counts are from the desired ratio, cubed.
  • Connections: minus the sum of squared crossing counts, so well-connected answers score lower.
  • Cycles: minus the number of chordless 4- and 6-cycles of crossing answers.
  • Picture: for every cell of the crossword's silhouette off the picture, and every picture cell off the silhouette, its distance to the other shape, to the fourth power.
  • Roundness: the variance of the concave hull's distances from its centre, squared.

The seed fixes every random choice, so the same answers and settings always give the same crosswords.

The generator is also available to scripts and agents: see the API description.