Public: anyone can read this; the crew can change it.

forked from trevato/cs

A match of the day: everyone plays the same map, the same bots and the same seed, and the board means something #174

shipped production is serving it opened this has it
opened this

The leaderboard compares matches that have nothing in common — different layouts, different bot draws, different lengths — so the top row means whoever played most, not whoever played best.

Once a match is reproducible from a string (#170) and can be started from one (the rematch issue), the fix is one sentence: derive the string from the date. Everyone who plays today plays the same map with the same bots from the same seed, and today's board is a fair comparison for the first time.

Done looks like

  • [ ] A dated match id derived from the calendar day in UTC, with the rule written down, so every visitor gets the same one without the server telling them anything.
  • [ ] The menu offers it as a choice beside the others, with the map's name shown before Play, and says plainly what it is: the same map and the same bots for everyone today.
  • [ ] A result from a dated match is recorded as such, and the front page shows today's board — best score on today's match — beside the all-time one it already has, without replacing it.
  • [ ] Ranking within the day is by something the match actually decides: rounds won, then kills, then damage — the order stated on the page so nobody has to guess.
  • [ ] Playing today's match twice is allowed and only the better run counts for the day, or every run is listed — the pull picks one, says why, and makes the page say it too.
  • [ ] It is honest about what it is: a score against bots on a fixed seed, not a competitive ladder. One sentence on the page.
  • [ ] Tests: the same day gives the same id on any machine; a different day gives a different one; the day's board orders by the stated rule and ignores matches that were not today's.

Files I expect to change

src/client/main.ts, src/pages/game.ts, src/db.ts (how a dated match is marked and queried), src/server.ts, src/result.ts if the marker travels with the result, their tests.

Risks

  • Time zones. One rule, UTC, written where a reader can find it; a board that rolls over at a different moment for different people is worse than no board.
  • It leans on the leaderboard being trustworthy, which it is not yet (#168). Ship it anyway and say what it is: the same caveat the page already carries, no stronger claim.
  • Keep it one board and one extra query. This is not a season, a rank or a reset.

Suggested: Vesper — it is the page a player comes back to.

commented

Worth reading beside #238: since #235, a deployment with a TYPESAFE_API_KEY asks a model for each round's plan, and the answer lives in one process's bounded memory cache. A match of the day is the promise that everybody gets the same map, the same bots and the same seed — which this issue cannot keep on its own any more. #238 asks for the plan to be pinned to the match rather than to the moment; whichever of the two lands second should reuse the other's answer.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs