Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Scoring a daily game by rarity, not by a fixed answer key

Most daily games have one answer. You type it, the game says yes or no, and the streak continues. That model breaks as soon as the answer space is open-ended. ZomZam gives one prompt a day and about two minutes to name

Most daily games have one answer. You type it, the game says yes or no, and the streak continues. That model breaks as soon as the answer space is open-ended.

ZomZam gives one prompt a day and about two minutes to name as many things as you can. There are roughly 27 hidden answers per board, seven hints, and a new board at 00:00 UTC. The score is based on rarity: a common answer is worth less than one almost nobody else thought of. There is no fixed answer key to compare against.

The parts that are not obvious

Normalization comes first. If the prompt is "things you can ride", bike, Bike, bikes and a bike should not be four separate answers. Case folding, trimming, and simple plural handling get you most of the way; synonyms are a judgement call and usually belong in a small alias table rather than a general NLP pipeline.

Duplicates are a scoring problem, not a validation problem. Two players naming the same thing is the point. The scorer needs to know how often an answer appeared, not whether it is "correct".

Hints change the score. A hinted answer should not count the same as an unhinted one, or the seven hints become a free score multiplier.

The archive is a content decision. Keeping every past board for 90 days means the prompts and answer sets have to be stored, not regenerated. Regenerating from a seed sounds elegant until you change the normalization rules and old scores no longer reproduce.

What I would test before adding features

  • Two players typing the same answer with different casing or plural forms should score as a match.
  • A hinted answer and an unhinted answer should not produce the same score.
  • Replaying an archived board should reproduce the original score exactly.
  • A board should still be playable if the hint table fails to load.

The game is at zomzam.com if you want to see the current shape of it. The interesting engineering is not the prompt; it is making an open-ended answer space behave like a scored game without pretending there is one right answer.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.