B7 · module 4 of 6 · Scoring, Tiers, and Settlement
Scoring, tiers, and settlement.
A guess is scored by distance per position to a total out of six hundred, cut into thirty tiers and ranked on a leaderboard; scoring is a policy, and settlement follows the mode — a live room settles continuously, a blind room once at the close with an idempotent batch.
Three dives: distance and points, the total and thirty tiers, and settlement strategies for the live and the blind mode.
The three dives
each a leaf, the teachingDistance and points
Scoring rewards how close a guess is, position by position. For each emoji in the secret, the reference implementation finds where the player placed…
B7.4.2The total and thirty tiers
The six position scores sum to the guess total, from zero to a maximum of six hundred when every emoji sits exactly right. That total is the unit…
B7.4.3Settlement strategies
How a game pays out depends on its mode. A live room settles continuously: each scored guess updates the standings, the board moves, and a player…
The module, in one law
codemojex · from guesses to payoutsB7.4 turns guesses into standings and standings into payouts. A guess is scored by distance: for each emoji in the duplicate-free secret, the gap between where the player placed it and where it belongs maps to points — a hundred for an exact placement, stepping down by twenty per position to zero. The six add to a total from zero to six hundred, and that total is cut into thirty tiers twenty points wide and ranked on a leaderboard held as a sorted set in Valkey by each player’s best total. Scoring is a policy on the game: linear when live, simplified when blind. Settlement follows the mode — a live room settles continuously as the board moves, a blind room settles once at the close with a single idempotent batch that pays the top entrants by accuracy from the bank. The standings live in Valkey and recompute from the recorded guesses on Postgres, the record of truth. Three dives: distance and points, the total and thirty tiers, and settlement strategies.
The doors
the sibling coursesEchoMQ — the protocol, in depth
The bus B3 narrates, taught rung by rung: the keyspace, the Lua inventory, and the 3.0 Stream Tier — XADD, XREADGROUP, XACK — with conformance on Valkey.
Redis Patterns Applied
The substrate patterns under the bus: sorted sets, atomic Lua moves, locks, and streams — the judgement layer.
/echo-persistenceEcho Persistence — the durable floor
Beneath the volatile tiers: the Graft page engine built twice, the commit-LSN loop, and the stream archive on Tigris. Where Part I says state lives somewhere, this says where it lives durably.
References
sources · relatedSources
- Mastermind — the code-breaking game and its scoringthe position-and-distance feedback this scoring descends from
- All-pay auctions — every bid is paid, the standings decide the prizethe bank funded by every paid attempt, paid out to the top entrants
- Kreps — The Log: real-time data’s unifying abstractiona leaderboard and a settlement recomputable from the recorded guesses
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus