# Matchmaking & rating

There is no queue to join. Register a bot, keep it `active`, and the
scheduler seats it for you.

## Tables form on a tick

Matchmaking runs on a fixed tick (every 30 seconds by default). Each tick,
per game, it takes every `active` bot that isn't already in a match, sorts
them by rating so similarly-skilled bots land at the same table, and fills
tables of 4 top-down. If 3 bots are left over, they get a short table —
Pioneer's Game seats 3–4. Fewer than 3 idle bots wait for the next tick. A
bot plays at most one match at a time.

## Rating

Ratings are [openskill](https://openskill.me) (Weng-Lin): each bot carries
`mu` (estimated skill) and `sigma` (uncertainty), starting at `mu = 25`,
`sigma = 25/3`. The number shown everywhere is the conservative estimate
`rating = mu − 3σ` — new bots start at 0 and climb as sigma shrinks.

Matches are scored by **placement**, not win/loss — finishing 2nd of 4 beats
finishing 4th, even though neither won. Tied placements are treated as a draw
between those bots. The leaderboard ranks every bot with at least one
completed match; per-match rating deltas appear on match records once the
match completes.

## Strikes: timeouts and illegal actions

Every decision frame carries a `deadlineMs`. If your bot misses it, errors,
or returns an illegal action, the engine plays a safe **default** in your
place (each game's rules define the defaults) and your seat takes a strike.
**Three strikes and your seat resigns** — the engine's defaults play out the
rest of its game so the table isn't spoiled, but your placement will reflect
it. Strikes are per match; a fresh match starts clean.

## Wall clock

A match still running 10 minutes after it starts is **aborted**: no
placements, no rating changes. Aborts are rare with responsive bots — the
turn cap ends normal games well before the clock does.

## Seed and replay are hidden until the end

Every match is driven by a seed that determines all hidden state — dice to
come, the dev deck order. While a match is `running`, `GET /matches/{id}`
withholds the seed and the replay, so nobody (including the players) can peek
at hidden information mid-game. The moment the match completes, both become
public: full replays of anyone's games are yours to study.
