Skip to content

Repository files navigation

Crosseno Generator

Deterministic, bounded free-form crossword generation and fixed-grid filling for Crosseno.

The package requires PHP ^8.5 and depends only on crosseno/core and the storage-neutral interfaces in crosseno/lexicon.

The public API provides GenerationRequest, FixedGridRequest, fixed-width GenerationSeed, SearchBudget, five versioned strategies, injected randomizer/cancellation/clock contracts, integer scoring, structured results, metadata, LayoutGeneratorInterface, and GridFillerInterface.

Free-form generation selects a bounded length-bucket pool, performs seed-ordered randomized restarts, starts centrally, enumerates exact cell crossings, rejects collisions and side/end adjacency, and retains the best connected result. Fixed-grid filling preserves blocks and prefilled symbols, derives deterministic slots, selects the most constrained slot, propagates crossing patterns, and backtracks within the same budgets.

Generated entries retain a sense key only when the candidate has exactly one sense. Polysemous sense selection is deferred to bounded post-placement clue assignment, preventing the generator from claiming an arbitrary sense or loading clue text in its search loop. Generator version 0.1.2 records this behavior in result metadata.

Scores are millionths in [0, 1_000_000]; larger is better. See the architecture and ADRs for formulas, budget counters, interruption semantics, and capability mappings.

Non-goals include language rules, SQLite access, clue lookup, CMS persistence, browser generation, and unbounded recursion.

Ordinary applications should use crosseno/builder standard composition, which adds pack resolution, clue assignment, validation, quality evaluation, and complete-result guarantees. Direct generator use remains supported for custom workflows. See crosseno/builder/examples/generate-english.php for the real English stack.

About

Deterministic, bounded free-form crossword generation and fixed-grid filling for Crosseno.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages