tta13 / 2D-soccer-simulation-xG

The xG model for 2D Soccer Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2D Soccer Simulation xG

This repo contains a baseline implementation for an expected goals model for the 2D simulation category of the RoboCup.

Dataset

Over 400 log files from matches between 2019 and 2021 were analyzed producing 2 different datasets:

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?

Model

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.

What can improve?

  • Shooting identification algorithm
  • Introduce more variables: counter-attack, came_from_cross, score, time...

About

The xG model for 2D Soccer Simulation


Languages

Language:Jupyter Notebook 94.5%Language:Python 5.5%