Freeform Strategy

Parallel-Seeded

Starts with an optimal parallel word pair, then uses inline gap filling to build dense clusters incrementally.

A variant of Adjacency-Aware that begins by finding the best pair of words to place side-by-side. The pair is selected by scoring all word pairs at every alignment offset, counting how many valid bigram columns each alignment produces. The highest-scoring pair becomes the grid's initial structure.

The key difference from the base strategy is inline gap filling: after each parallel placement, the algorithm immediately scans for 2-letter fragments and fills them while the surrounding grid is still sparse. This produces a virtuous cycle where early fill words provide crossing points for subsequent user words, and the looser constraints at fill time allow more gaps to be resolved.

This approach produces the fewest 2-letter fragments of the adjacency strategies. On a 156-word list, inline filling reduces fragments by roughly 43% compared to deferred filling, while placing the same number of total fill words.

Strengths

  • Fewest 2-letter fragments among adjacency strategies due to inline gap filling while constraints are still loose
  • The parallel seed creates a strong initial structure that subsequent placements can build around
  • The virtuous cycle of fill-then-cross produces consistently dense grids across word list sizes

Weaknesses

  • !Slightly slower than base Adjacency-Aware due to inline fill scans after each parallel placement
  • !Seed pair quality depends on the word list having at least two words with compatible bigram columns
  • !Same general tradeoffs as Adjacency-Aware: introduces dictionary fill words, higher compute cost than user-word-only strategies

How It Works

  1. 1

    Find the best parallel seed pair

    For every pair of words, try placing them side-by-side (row 0 and row 1) at every column offset where they overlap. Score each alignment by counting valid bigram columns. Select the pair and offset that maximizes valid bigrams.

  2. 2

    Place remaining words with inline fill

    After placing the seed pair, continue with graph-guided ordering. For each word, evaluate both perpendicular and parallel placements. After each parallel placement, immediately scan for 2-letter fragments and fill them from the dictionary. This catches gaps early while surrounding constraints are minimal.

  3. 3

    Final fill pass

    After all user words are placed, a final gap-filling pass catches any remaining 2-letter fragments from the last few placements. The total fill budget (75% of user word count) is shared across inline fills and this final pass.

Pseudocode

function findBestParallelSeed(words, bigrams):
    bestScore = 0
    for each pair (A, B) in words:
        for shift in range:
            validCols = count columns where A[i]+B[i+shift] in bigrams
            if validCols > bestScore:
                bestPair = (A, B, shift)

// Place seed pair, then for each subsequent word:
for word in graphGuidedOrder(remaining):
    best = maxScore(intersections ∪ parallelPlacements)
    place(word, best)
    if best.isParallel:
        // Inline fill: resolve gaps immediately
        gaps = findShortRuns(grid, placed)
        for gap in gaps:
            fill = dictionaryLookup(gap)
            if fill: place(fill, isFill=true)

Complexity

Seed selection: O(W² x L) for all pair/offset combinations. Placement: same as Adjacency-Aware plus O(G x D_L) inline fill per parallel placement. Total observed: 129ms for 9 words, 902ms for 40 words, 5.2s for 156 words.

Benchmark Results

Measured locally on three wordlist scenarios. Each cell is averaged across 3 runs of 16 attempts each. Best= top layout's metric. Compactness = grid area per placed word (lower is denser).

ScenarioBest ×Avg ×PlacedCompactnessTime
Themed (9 words)
Short personal wordlist with low letter overlap, typical of user input.
2018.7514/95128.8ms
Vocabulary (40 words)
Common 5-letter English words with high letter overlap.
9693.568/4011.03901.6ms
Mixed (156 words)
Mixed-length English words (3–8 letters), broad coverage.
306292.75228/1568.65230.4ms

★ Best across all four strategies on this scenario. Reproducible via scripts/benchmark-strategies.ts.

Metric Definitions

Each benchmark run executes 16 randomized attempts of the strategy and returns up to 4 distinct layouts, sorted by quality. This process is repeated 3 times to reduce variance. The metrics below describe how each column is derived from those runs.

Best ×
The highest intersection count from the top-ranked layout across 3 independent runs. An intersection is a grid cell shared by two words (one across, one down). Higher is better.
Avg ×
The mean intersection count across all returned layouts (up to 4 per run), averaged over 3 runs. This includes second- through fourth-best layouts, so it reflects consistency rather than peak performance.
Placed
The most words placed on the grid in any top-ranked layout. For Adjacency-Aware, this includes dictionary fill words from Phase 2, so it can exceed the input word count. Shown as placed/input.
Compactness
Grid bounding-box area (rows times columns) divided by the number of placed words. Lower values indicate denser packing. Note that this measures the full bounding box, which includes empty cells between words. Adjacency-Aware's denominator is inflated by fill words.
2-Letter Frags
The number of 2-letter contiguous letter runs in the best grid that are not covered by any placed word in that direction. These are perpendicular fragments left behind by parallel placements that Phase 2 could not extend into complete dictionary words. Only applicable to adjacency strategies; always 0 for other strategies since they never place words in parallel.
Fill Words
The number of dictionary words added in Phase 2 to extend 2-letter gaps into complete words. These are not from the user's word list. Capped at max(3, 75% of user word count). Only applicable to adjacency strategies.
Time
Wall-clock time for one run (16 randomized attempts), averaged across 3 runs. Measured in single-threaded JavaScript without Web Workers. Includes ordering, candidate enumeration, validation, and (for Adjacency-Aware) Phase 2 gap filling.

Comparative Performance

All four strategies measured side-by-side on the same word lists and hardware. Rows highlighted in blue indicate the strategy being viewed.

Themed (9 words)Short personal wordlist with low letter overlap, typical of user input.

StrategyBest ×Avg ×PlacedCompactFragsFillTime
Adjacency-Aware161512/9603125.9ms
Parallel-Seeded2018.7514/9525128.8ms
Densest Crossings98.259/911.56001.3ms
Longest First889/98.56001.2ms
Balanced98.259/915.89001.4ms

Vocabulary (40 words)Common 5-letter English words with high letter overlap.

StrategyBest ×Avg ×PlacedCompactFragsFillTime
Adjacency-Aware9990.2569/407.711029781.9ms
Parallel-Seeded9693.568/4011.031128901.6ms
Densest Crossings4140.540/4019.20017.6ms
Longest First4240.2540/4015.950014.8ms
Balanced4140.540/4015.60019.6ms

Mixed (156 words)Mixed-length English words (3–8 letters), broad coverage.

StrategyBest ×Avg ×PlacedCompactFragsFillTime
Adjacency-Aware312300.5228/1567.0135725129.8ms
Parallel-Seeded306292.75228/1568.624725230.4ms
Densest Crossings157156.25153/1561000317.6ms
Longest First158153.25151/15610.330078.6ms
Balanced161157.25156/15612.3800306.8ms

Analysis

The four strategies share the same underlying greedy placement algorithm but differ in word ordering and, in the case of Adjacency-Aware, in which placements are considered valid. This means performance differences stem from two factors: the cost of computing the ordering, and the size of the candidate set evaluated per word.

Graph-guided, Balanced, and Longest First operate exclusively on the user's word list. Their placement pass considers only perpendicular intersection candidates (positions where a new word crosses an existing word at a shared letter). Longest First skips the graph-build step entirely, making it the fastest strategy in every scenario. Graph-guided and Balanced are similar in cost because they both compute the compatibility graph; Balanced adds a minor constant factor for its hybrid seed selection.

Adjacency-Aware adds two sources of overhead. First, each word's candidate set is larger because parallel placements (same direction, offset by one row or column) are enumerated alongside perpendicular intersections. For a word of length L placed beside an existing word of length P, this adds up to 2 × (L + P - 1) additional candidates per pair. Second, every candidate undergoes perpendicular-run validation against the dictionary, which requires walking the grid in the perpendicular direction at each cell. Phase 2 (gap filling) adds a third cost: scanning for 2-letter fragments and searching dictionary buckets for valid extensions.

The practical impact scales with word count. On a 9-word themed list, the adjacency strategies run in roughly 126-129ms versus 1.2ms for Longest First (approximately 100x slower). On 156 words, the gap narrows to roughly 65x (5.1-5.2s versus 79ms). The overhead comes from dictionary validation of perpendicular runs, parallel candidate enumeration, and gap filling.

An important caveat applies when comparing intersection counts across strategy types. The adjacency strategies' reported intersections include crossings involving dictionary fill words. For the mixed-large scenario, Adjacency-Aware places 228 total words (156 user + 72 fill) and reports 312 intersections, while Densest Crossings places 153 user words and reports 157 intersections. Some portion of the intersection difference is attributable to the additional fill words, not to more efficient placement of the original word list.

The 2-letter fragment count reveals an inherent tradeoff of parallel placement. Every pair of words placed side-by-side creates perpendicular 2-letter runs that must either be extended into dictionary words or left as fragments. Inline gap filling (used by both adjacency strategies) mitigates this by resolving gaps immediately after each parallel placement, while surrounding constraints are still loose. Parallel-Seeded reduces fragments by roughly 43% compared to deferred filling on large word lists, producing 24 fragments versus 35 for base Adjacency-Aware on the mixed-large scenario. The remaining fragments are structurally unfillable due to constraints accumulated during grid construction.

The compactness metric (grid area divided by placed words) also requires careful interpretation. Adjacency-Aware tends to produce grids with lower compactness values, which suggests denser packing. However, the fill words extend existing perpendicular runs rather than expanding the grid boundary, so they reduce compactness partly by inflating the denominator without proportionally increasing the numerator. Among the user-word-only strategies, Longest First tends to produce the most compact grids, likely because long anchor words create a tighter bounding box relative to the words they accommodate.

Each strategy was run 3 times with 16 randomized attempts per run. Adjacency-aware loads the full crossword dictionary (~42K words, filtered to 3-8 letters with score >= 60) for perpendicular validation and gap filling; other strategies use only the scenario's word list. Note that adjacency-aware's "placed" count includes dictionary fill words from Phase 2, so its intersection counts are not directly comparable to other strategies, which only place words from the input list.

When to Use This

  • You want the densest possible grid with minimal 2-letter fragments
  • Your word list has at least two words that share common bigram patterns when placed side-by-side
  • You're willing to accept slightly longer generation time for better fragment resolution

Try it

Open the creator with this strategy pre-selected.

Try Parallel-Seeded

Other Strategies