This repo contains a baseline implementation for an expected goals model for the 2D simulation category of the RoboCup.
Over 400 log files from matches between 2019 and 2021 were analyzed producing 2 different datasets:
- 2019+2021 without Anonymous Challenge: contains just under 6000 entries (shots)
- 2021 with Anonymous Challenge: contains just over 6200 entries (shots).
The datasets are separated because the Anonymous Challenge produced more random results and situations, but both have the same features:
- x: x position on the pitch (absolute value)
- y: y position on the pitch (if the shot ocurred on the left side, the value is multiplied by -1)
- distance: distance from the shot position to the goal center
- angle: angle between player, left post and right post
- players_in_between: players inside the triangle with vertices used by the angle described above
- goal: was it a goal?
Implemented used the logistic function, using the 2019+2021 dataset, it is built on the variables x, angle, distance and players_in_between, since those were all statistically signifcant for the model and gave it reasonable predictive power.
- Shooting identification algorithm
- Introduce more variables: counter-attack, came_from_cross, score, time...