Skip to content

Refactor Stats Tracking#3697

Draft
sauravbanna wants to merge 82 commits into
masterfrom
sauravbanna/stats_refactor
Draft

Refactor Stats Tracking#3697
sauravbanna wants to merge 82 commits into
masterfrom
sauravbanna/stats_refactor

Conversation

@sauravbanna
Copy link
Copy Markdown
Contributor

@sauravbanna sauravbanna commented May 13, 2026

Description

This PR refactors the current stats tracking system to be a bit cleaner and better structured. We currently have everything living in thunderscope/log, which doesn't make much sense.

Changes are:

  1. Move all stats tracking related code to software/evaluation
  2. Introduce a unified interface in log_interface.py for all events to standardise converting to and from formats
  3. Fix bugs in possession_tracker.py causing it to not accurately track possessions
  4. Expand referee tracker to better log boundaries of games when running multiple games, ignore non-gameplay game states to reduce event noise, and clean up repeated logs of the same event

Testing Done

Tracking works across many long-running gameplay simulations, verified manually. Data was also used in ML pipeline with no continuity errors detected.

Resolved Issues

Length Justification and Key Files to Review

Unfortunately, GitHub apparently doesn't render a file as "renamed" / "changed" if too many lines are modified, showing it as "added" / "deleted" instead. This makes the diff looks worse than it is, but I can't seem to find a way around it.

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

sauravbanna and others added 30 commits March 28, 2026 13:10
…erbots/Software into sauravbanna/refactor_trackers_to_log
…erbots/Software into sauravbanna/refactor_trackers_to_log
…erbots/Software into sauravbanna/refactor_trackers_to_log
…into sauravbanna/refactor_trackers_to_log
…erbots/Software into sauravbanna/verbose_log_schema
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.

3 participants