PlayPendium
WordChess · Food for Thought

How a computer picks a word

Before the AI plays, it must find its move inside a haystack of a hundred and fifty thousand words, and then stop looking.

01 · The haystack

A space too large to see

Give a person a full set of WordChess tiles and the instruction "play a good word," and they narrow the problem without noticing they have done so. The computer enjoys no such intuition. On a 25×25 board, holding a full hundred-tile set of its own, it may attempt almost any of 148,941 dictionary words, and each word can be laid down at thousands of legal coordinates and orientations. Worse, a placement is only legal if every new letter it introduces also completes a real word where it crosses what is already on the board. Multiply the words by the placements by that crossing constraint and you have a search space no player, silicon or otherwise, can enumerate and rank in full.

This is the reason serious word-game engines, Quackle, the open-source reference implementation, among them, never brute-force the dictionary.4 Steven Gordon's 1994 GADDAG structure, and the DAWG before it, let a program grow words outward from tiles already on the board and check crossings as it goes, so that illegal branches die early instead of being scored and discarded.1 The task is not "list every word." It is "generate only the moves that could possibly be legal, and do it fast."

02 · The clock

Good enough beats perfect

Even a lean generator returns more candidate moves than can be deeply evaluated, so the second problem is time. Brian Sheppard's Maven, the first program to outplay top human opposition, faced exactly this and answered it in two stages: a fast heuristic sorts the raw plays into rough order of quality, and only a shortlist of the most promising is studied carefully by simulating the game forward many times to see which candidate actually performs best.2 Other games know the same idea by other names, the backgammon rollout and the Go program's playout; in Maven it is called simulation.

WordChess works in the same spirit under a stricter constraint: a fixed search-time budget per move. When the budget runs out, the AI commits to the best word it has found so far. This is not a compromise the engineers regret; it is the whole design. A player who thinks forever is not a better opponent, only a slower one. The clock forces the machine to do what people do instinctively, settle for a move that is clearly good rather than provably best.

Knowing the dictionary is the easy part. Knowing when to stop searching it is the hard one.

03 · Honest difficulty

Weakness you can trust

The lazy way to make a game AI easier is to make it stupid at random, to have it fumble a move it plainly saw. Players notice, and they resent it. The designer Sid Meier is often cited for cutting alliance features from Civilization because the computer could exploit them almost as well as a player; the effect, in Meier's words as quoted by one account of AI-opponent design, would "leave gamers with a sense that they couldn't win because the computer was cheating."3 Difficulty that reads as dishonesty poisons the game, which is why the research literature on dynamic difficulty adjustment concerns itself with tuning what the AI is capable of rather than what it is allowed to see.5

WordChess tunes its four tiers along axes a human would recognize, never by feeding the AI hidden information. The tiers differ in how long they may search, how deep into the rare dictionary their vocabulary reaches, and which word-length bands they favor. An easy opponent plays plausibly weak words, real, sensible, short, not garbage. A grandmaster shares the whole obscure lexicon with the hard tier, and has the most time to mine it. The player loses to something that looks like a better vocabulary and sharper reading, because that is exactly what it is.

Four tiers, tuned by limits, measured from this project's design and build notes
TierVocabulary reachSearch budgetWord-length lean
EasyCommon onlyShortestShort
NormalCommon + mid + half of rareShortMixed
HardFullLongLonger
GrandmasterFullLongestUnbounded
04 · An opponent, not a calculator

What makes it feel human

A calculator returns the same answer every time; an opponent surprises you. WordChess adds a deliberate randomized step to selection, so that near-equal moves are not always resolved the same way and the AI does not replay the same word every time. Combined with per-tier vocabulary ceilings, the effect is variety, the sense that someone is sitting across the board making choices, some of which you could have made too.

That is the quiet art of it. A believable opponent needs restraint as much as strength: the willingness to play a merely good word, to leave points on the table, to be beatable in a way that feels earned. The machine's hardest engineering problem was searching the haystack. Its subtlest was learning when to stop searching, what to know, and how much to hold back.

Sources & notes
  1. Wikipedia, "GADDAG", the move-generation data structure introduced by Steven A. Gordon (1994) that grows words from placed tiles and validates crossings during generation. en.wikipedia.org/wiki/GADDAG
  2. Brian Sheppard, "World-Championship-Caliber Scrabble," Artificial Intelligence 134 (2002): 241–275, describes Maven, the first program to outperform the strongest human players against human opposition, with its selective move generation and its simulations of likely game scenarios. doi.org/10.1016/S0004-3702(01)00166-7. Overview of the program: en.wikipedia.org/wiki/Maven_(Scrabble)
  3. Vina Nguyen, "How to Design a Worthy Opponent: AI in Game Development", on believable difficulty, deliberately handicapping the AI, and the resentment bred by opponents that appear to cheat (source of the quoted Sid Meier / Civilization account). vinawrites.com
  4. Quackle (Jason Katz-Brown, John O'Laughlin, et al.), an open-source Scrabble engine bundling a GADDAG move generator, evaluator, and simulator for any lexicon or board. Source: github.com/quackle/quackle; project page: people.csail.mit.edu/jasonkb/quackle
  5. M. Zohaib, "Dynamic Difficulty Adjustment (DDA) in Computer Games: A Review," Advances in Human-Computer Interaction (2018), survey of tuning challenge by adjusting AI capability rather than cheating. onlinelibrary.wiley.com/doi/10.1155/2018/5681652
  6. WordChess-specific facts, the four difficulty tiers, the time/vocabulary/word-length levers, the randomized selection, and the opening-book collapse ("MY" fifteen times), are measured from this project's design and build notes.
Was this worth reading?
Play WordChess
PlayPendium · About · Contact · Privacy · Terms · Cookies · Accessibility · Copyright · Browse all games · Classic arcade games · © 2026