Skip to content

Add board insights to player stats - #143

Merged
adri0 merged 1 commit into
mainfrom
player-insights
Oct 24, 2026
Merged

adri0 merged 1 commit into
mainfrom
player-insights

Conversation

@adri0

@adri0 adri0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

player consolidate now adds insights read from every game's board and claims to each player's stats.yaml, for the player page on scadustats-site (adri0/scadustats-site#76). The new code is in pipeline/player_insights.py, called after consolidate_players in both player consolidate paths.

New PlayerStats fields

Field What it holds
pace median time to their first claim, claims per hour, median and fastest winning time (a game reference)
claim_order the game clock at their 1st, 2nd… 13th claim of each game, with the square (pool and text) and everyone else's median for each claim number
claim_order_by_type the same counting one pool's squares only (their 1st, 2nd… DLC square)
win_types game wins by line, majority and points
first_square games where their side claimed the first square, and wins after it
comebacks wins after trailing by 3+ squares, and the largest deficit with its game
form last five results, longest win streak, current streak
quickest_squares up to 3 squares they claim faster than everyone else's median (3+ claims each)
surest_squares up to 3 squares they claim most often when dealt (dealt 4+ times)

Definitions

  • A claim is a mark still held at the end of the game, as in square stats. Times are the game clock.
  • In 2v2, side results (wins, first square, comebacks, form) count for both teammates. A claim counts for the teammate whose pool the square is in, and for both for a co-op square.

Compatibility

New fields only, with defaults, so a minor release (1.6.0; 1.5.0 is already out without this). The site shows its Insights section only once these fields are present.

Testing

  • 10 new tests in tests/pipeline/test_player_insights.py; all 570 pass, ruff clean.
  • Checked on the site's data. For example, blanxz's line plus majority wins (10 + 19) match their 29 game wins.

🤖 Generated with Claude Code

`player consolidate` now fills in insights read from every game's board and
claims, as new PlayerStats fields (pipeline/player_insights.py):

- pace: median time to their first claim, claims per hour, median and
  fastest winning time (linked to the game)
- claim_order / claim_order_by_type: the game clock at their 1st, 2nd...
  13th claim of each game, overall and per square pool, with the square
  claimed and everyone else's median for comparison
- win_types: game wins by line, majority and points
- first_square: how often they claim a game's first square, and win after it
- comebacks: wins after trailing by 3+ squares, and the largest
- form: last five results, longest and current streak
- quickest_squares / surest_squares: squares they claim faster than everyone
  else, and most often when dealt

A claim is a mark still held at the end of the game. In 2v2, side results
count for both teammates and a claim for the teammate whose pool the square
is in. New fields only, so a minor change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adri0
adri0 merged commit 9ea9b54 into main Oct 24, 2026
1 check passed
@adri0
adri0 deleted the player-insights branch October 24, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant