Back to Engineering Notes

Game Engineering

The two-pass algorithm that scores repeated letters in Wordz

How BoredGamez prevents one target letter from generating multiple positive clues when a guess contains duplicates.

Author
BoredGamez Engineering
Published
Published July 9, 2026
Reading time
5 minute read

Part 1

Why one-pass scoring fails

Repeated letters create the easiest scoring bug in a five-letter deduction game. If the target contains one E and the guess contains two, checking only whether E exists anywhere in the target can mark both guessed letters as present. That reveals more copies than the answer actually contains.

Wordz avoids that by treating target letters as a limited inventory. A positive clue consumes one copy from that inventory. The evaluator performs this in two passes so exact-position evidence always has priority over present-in-another-position evidence.

Part 2

Exact positions are resolved first

The first pass compares every guess position directly with the target. Exact matches are marked correct. For every non-matching target position, the evaluator records how many unused copies of that letter remain.

The second pass visits the still-unresolved guessed letters. A letter is marked present only when its remaining count is greater than zero, and that count is then reduced. Once the count reaches zero, later copies in the guess are absent.

  • Pass one protects exact-position matches.
  • Pass two consumes only unused target-letter counts.
  • The algorithm handles two or more repeated copies without special cases.

Part 3

Targets, valid guesses, and rewards are separate

Wordz has a curated target bank and a broader accepted-guess dictionary. That distinction lets players use ordinary valid words for information without implying every accepted word will appear as a future answer. Targets are selected from the narrower bank and recent answers are excluded when possible.

A round permits six guesses. The server reward schedule is 8.00x, 5.00x, 3.50x, 2.50x, 1.80x, and 1.30x from the first through sixth attempt. During this review we found and corrected an older interface table that did not match those server values; the guide now publishes the settlement schedule as the source of truth.