Rating state
Each Singles or Doubles state contains rating r, rating deviation RD, and volatility sigma. Lower RD means a more certain estimate; sigma controls how readily the model allows the underlying ability to vary.
mu = (r - 1500) / 173.7178
phi = RD / 173.7178
SamScore calculates on the Glicko-2 scale above, then converts back. Displayed SAM is the resulting rating rounded to one decimal place.
Expectation and update
g(phi_j) = 1 / sqrt(1 + 3 * phi_j^2 / pi^2)
E = 1 / (1 + exp(-g(phi_j) * (mu - mu_j)))
v = 1 / (g(phi_j)^2 * E * (1 - E))
Delta = v * g(phi_j) * (s - E)
phi* = sqrt(phi^2 + sigma'^2)
phi' = 1 / sqrt(1 / phi*^2 + 1 / v)
mu' = mu + phi'^2 * g(phi_j) * (s - E)
Here mu and phi are the player's transformed rating and deviation; the j values describe the opponent; E is expected outcome; s is 1 for a win, 0 for a loss, or 0.5 for a tie; v is estimated variance; and Delta is the estimated improvement. The new volatility sigma' is solved by the Glicko-2 iterative procedure using system constant tau = 0.5.
Opponent strength changes E, while opponent deviation changes g and therefore how much evidence the result carries. SamScore does not currently run a separate clock-based inactivity inflation pass; uncertainty evolves when rated matches are processed.
Doubles is a SamScore product choice
r_team = sum(r_i) / n
RD_team = sqrt(sum(RD_i^2)) / n
sigma_team = sum(sigma_i) / n
For a team of n players, SamScore builds this aggregate opponent state. Each player is then updated independently against the opposing aggregate, so a Doubles match produces four player updates. This team representation is SamScore-specific rather than a universal Glicko-2 rule.
Confidence and Monthly replay
confidence = round(100 * clamp(1 - (RD - 30) / (350 - 30), 0, 1))
The mapping rounds to a whole percentage and clamps values to 0-100. It has no 90% cap. The practical plateau near 91% emerges because phi* = sqrt(phi^2 + sigma'^2) injects volatility uncertainty before each update, preventing RD from simply shrinking to zero. All-time updates use the stored state. Monthly replay anchors each player to the exact All-time rating and volatility immediately before that player's first eligible match, replaces RD with 350, and replays only current-month events in deterministic timestamp order. The replay is read-only.
Worked Singles example
Two equally rated players begin at 1500.0 with RD 80 and volatility 0.06. After player A wins, the real rating engine moves player A to 1517.3, a change of +17.3. The values are generated by the same function used to record a match.