The Double Word Square as Puzzle, Program, and Computational Poem

The Double Word Square as Puzzle, Program, and Computational Poem

The image presents a six-by-six double word square generated through squareword_gen, an open-source word-square experiment created by developer Nathan Parker, known on GitHub as ngparker. Parker describes the project as an attempt to generate valid N by N arrangements in which every horizontal row and every vertical column forms a word from a selected dictionary. The program was inspired by the Squareword game and by an algorithm credited in the project documentation to the developer known as @annalee. Parker released the project publicly under an MIT license, allowing its code and methods to be studied, modified, and reused.

The square shown in the image contains the following six words across:

GROOMS
NEURON
OPTIMA
MEAGER
ENGINE
STENTS

Reading the same letter grid downward produces six different words:

GNOMES
REPENT
OUTAGE
ORIGIN
MOMENT
SNARES

The repository’s sample output lists the second group—GNOMES, REPENT, OUTAGE, ORIGIN, MOMENT, and SNARES—as a “double-word-square” with unique words. The image presents that generated structure visually, using the transposed direction as its horizontal reading. Because transposing a valid word square preserves its intersections, either group can be displayed as the rows while the other appears in the columns.

This structure differs from an ordinary word square. In a traditional word square, the words read across are repeated identically down the corresponding columns. A double word square instead contains two separate sets of words. Here, the six horizontal words and six vertical words are all different, producing twelve valid words without repetition. The heading in the image emphasizes this achievement: “12 words, none repeated.”

Each letter therefore performs two simultaneous functions. The initial G in GROOMS also begins GNOMES. The R in the second position of GROOMS becomes the opening letter of REPENT. The first O contributes to OUTAGE, the second O to ORIGIN, M to MOMENT, and S to SNARES. Every subsequent row continues the same system of interdependence.

No letter belongs solely to one word. Every letter is shared by a horizontal and a vertical construction. Changing a single character would affect two words at once, and correcting one damaged word could destroy another. This makes the square a tightly interlocked linguistic object rather than a simple list of vocabulary.

Writing through constraint

The primary creative technique demonstrated by the square is constraint-based composition. Instead of beginning with a sentence, theme, or narrative, the generator begins with rules:

the grid must contain six rows and six columns;
every row must contain six letters;
every row must be a valid dictionary word;
every column must also be a valid dictionary word;
the across and down sets must differ;
all twelve words must be unique.

The severe restriction does not eliminate creativity. It changes where creativity occurs. The important acts become searching, selecting, testing, rejecting, and arranging. The completed square is the visible survivor of a much larger field of combinations that failed to satisfy the rules.

Parker’s program uses word lists filtered by length and frequency. The repository includes a Scrabble-derived dictionary and a word-frequency dataset, and the program allows the user to choose the word length, the number of high-frequency words considered, and whether only unique double squares should be printed.

Internally, the program organizes words into a trie, a branching data structure that stores valid letter sequences. It then builds squares recursively. At each new row, the program considers which letters can continue the unfinished vertical words. Combinations that cannot possibly produce valid columns are abandoned before the entire square is completed. The program therefore does not blindly assemble every imaginable six-word set. It narrows the search by following only prefixes that remain capable of becoming dictionary words.

After constructing a possible square, the code checks whether its columns differ from its rows and whether every word across and down is unique. The software explicitly classifies results as single or double word squares and as unique or non-unique.

The resulting work occupies a productive boundary between human and machine authorship. The machine performs the enormous search, but the program does not operate without human decisions. A person determines the dictionary, frequency limit, word length, formal restrictions, and acceptance criteria. A person also decides which generated object deserves to be displayed, interpreted, or transformed into poetry.

The computer discovers that the letters are structurally compatible. The human reader discovers what the words might mean together.

Leave a comment

About the Author: Sarah B. Royal

Sarah B. Royal’s writing defies convention. Her poetry and prose traverse the boundaries between structure and spontaneity, often weaving together philosophical inquiry, cultural reflection, and personal narrative. With a background in experimental literature, she is known for crafting works that challenge readers to engage intellectually and emotionally.

Her acclaimed palindrome performance play, 777 – A Story of Idol Worship and Murder, showcases her fascination with mirrored storytelling and thematic symmetry. In o x ∞ = ♥: The Poet and The Mathematician, Royal explores the intersection of poetic intuition and mathematical logic, revealing a unique voice that is both analytical and lyrical.

Royal’s collections—such as Lost in the Lost and Found, Haiku For You, Lantern and Tanka Too, and the WoPoLi Chapbook Series—highlight her commitment to neurodivergent expression and poetic experimentation. Whether through childhood verse or contemporary fusion poetry, her work invites readers into a world where language is both a tool and a playground.

Sarah B. Royal continues to expand the possibilities of poetic form, offering readers a deeply personal yet universally resonant experience. Her writing is a testament to the power of creative risk, intellectual depth, and emotional authenticity.

Design a site like this with WordPress.com
Get started