How Our Puzzle Algorithms, Profanity Filter & PDF Engine Work
Transparency matters for teachers trusting classroom printables and independent publishers uploading print manuscripts to Amazon KDP. Below is a clear engineering overview of every algorithm powering WordPuzzleGenerator.com—all running 100% locally in your browser with zero external server dependencies.
1. Word Search Placement & Intersection Scoring
Words are normalized (preserving Spanish Ñ while stripping accents for grid
tiles and keeping full diacritics in the printed Word Bank), deduplicated, and sorted
longest-first. Each candidate position across the active difficulty’s allowed compass
vectors is scored by organic letter overlaps plus seeded Mulberry32 randomness. Choosing
from top-scoring candidates produces compact, authentic word crossings while still letting
teachers click Shuffle Grid for fresh layouts.
- Kids Easy: Left-to-right
(0, +1)and top-to-bottom(+1, 0)only. - Medium: Adds forward diagonals
(+1, +1)and(-1, +1). - Hard: Enables all 8 compass vectors including reverse horizontal, reverse vertical, and reverse diagonals.
2. Eight-Direction Profanity Filter on Filler Tiles
Once empty squares are filled with random alphabet characters, our scanner walks every row, column, and diagonal (both forward and backward) checking against a curated classroom blocklist of vulgarities, slurs, and profanity (3 to 8 letters). Whenever a match spans at least one unlocked filler cell, the filter swaps a filler letter from a safe consonant pool and re-verifies local intersections—never mutating any locked cell belonging to your target vocabulary words.
3. Intersecting Crossword Layout & Canonical Numbering
Our Crossword Maker ranks input terms by length and shared-letter frequency, evaluates multiple seed orderings, and applies multi-pass perpendicular insertion. Strict crossword adjacency invariants reject placements where parallel neighbors would accidentally touch or where end-cap cells are occupied. Finally, coordinates are trimmed to a tight bounding rectangle and numbered in standard top-to-bottom, left-to-right newspaper reading order.
4. Non-Identity Scrambles & Derangement Cryptograms
In the Word Scramble Maker, every token with at least two distinct letters undergoes Fisher-Yates shuffling paired with a deterministic rotation guarantee so scrambled words never accidentally equal their unscrambled original. In the Cryptogram Maker, Sattolo’s cyclic permutation algorithm builds a mathematical derangement over all 26 letters so no letter can ever substitute for itself.
5. Vector jsPDF Output & Amazon KDP Margin Specifications
Rather than screenshotting low-resolution web pages, PDF downloads compile direct vector drawing primitives via jsPDF. Every letter, grid border, answer capsule, and clue column scales cleanly to 300+ DPI commercial print presses. Our KDP Puzzle Book Maker implements mirrored odd/even inside gutter margins (0.60"–0.625") aligned with Amazon KDP’s paperback no-bleed interior margin table, along with compact 4-per-page solution spreads.
6. Open Classroom Word-List Dataset & Verification
All curated Wave 1 classroom vocabulary banks are published transparently as a clean, machine-readable JSON file you can inspect or reuse directly: /data/word-lists.json . Every core puzzle algorithm is continuously validated by automated unit tests checking directionality, profanity elimination, crossword intersections, non-identity scrambles, and cryptogram derangements.