Skip to main content
This guide turns one game into a table with one row per state sample of live round time: side-level features at that moment and the round winner as the label. Run it over many games to get a training set for an in-round win probability model. Cost per game: 1 unit for /rounds plus 5 per round for /states (a 24-round map is about 121 units).

Fetch

steamid stays a string, so pandas keeps it exact.

Drop non-players

Coaches can appear in raw state: they sit in a team slot but are never alive. Keep only the game roster.

Bomb site positions

The API has no site coordinates, but every sample has the player’s map callout in place. The mean position of the samples standing in BombsiteA / BombsiteB is a usable site centre for this map.

Per-side features at each sample

Round context and the label

X now has one row per sample with columns such as ct_alive, t_alive, ct_hp, t_hp, ct_equip, t_min_d_site, ct_flashed, ct_defusing, planted, t_since_plant, t_round and the label ct_win.

Things to get right

  • Split by game, not by row. Samples of the same round are highly correlated; put whole games (better: whole matches) in either train or test.
  • No leakage from round results. winner_side, reason, end_tick, duration_s and n_kills describe the outcome. Use them only for the label, never as features. plant_tick and bomb_site are safe only through planted and t_since_plant as above, which are known at the sample.
  • The last sample of each round is the round end tick, where the outcome is already decided. Consider dropping samples at tick == end_tick.
  • Overtime and missing rounds. round_no continues in overtime; check game["missing_rounds"].
  • Pauses. t_round is not corrected for pauses; see Time.
  • Finer resolution. For every tick, use the ticks parquet (Files) with the same logic, assigning rounds by the freeze_end_tick / end_tick windows.