A State of Football, Part II: Inter-Player Dynamics

In my previous post I outlined some of the basics behind considering football as a dynamical system and how we might proceed to synthesize an attractor to study the movement dynamics of a team.

To summarize, a team can be described by a set of variables like its center of mass (i.e. position) and the area it occupies; collectively, these variables are the state of the team and so define the state-space of the team as a dynamical system. An attractor is a point in this state space that the team’s state gets attracted to; that is, does the team tend to move to a certain area of the pitch? or to expand/collapse to a certain area? By mapping out the state-space, we can identify these kinds of behaviours in a team.

However, we ended off realizing that the state-space doesn’t necessarily need to be limited to just team position and area – surely other variables affect the team state? And how many other variables might there be?

To answer these questions we’re going to get into some topological time series analysis. What is a time series?

Well it’s just a series of measurements (be it temperature, stocks or an athlete’s speed) taken over time. From a systems point of view though, we might say a time series is simply a projection of the entire system on 1-dimension; just how a photo compresses information about our 3D world in 2D, a time series compresses information about complex, multidimensional systems in 1D.

But just like how we can decipher 3D information from a photograph, so too can we regain the “image” of that higher dimensional system from just a time series.

To see how this all works, we’ll start by using a system that’s well known so that we know if our process and results make sense; after, we’ll apply those same methods to football data to see what they can uncover.

In this case, the well known system we’ll try to reconstruct is the Lorenz system:

We know it has three dimensions, so it’s easy to create a time-series given the state space – like we said before that’s just projecting from 3D space to 1D. The challenge is this: given a single time series, can we reconstruct the state space?

This may seem hopeless at first; not only are we trying to recover dimensions by going from 1D to 3D, but we don’t even know how many dimensions to recover – we don’t start by knowing the system is in 3D!

So how can we do this? The process is based on the following theorem, proved by Floris Takens in 1981:

Let’s break it down: here M is the state space, φ is the evolution function of the system and y is a time series corresponding to a single dimension of the system. We can reconstruct the state space in Rn by creating the matrix described by Φ; that is, a matrix where the first column is y, the next is y – but shifted by some delay, the third is y shifted by twice the delay, and so on until the (2m+1) column is y shifted by 2m times the delay.

So now we’ve narrowed down the problem of attractor reconstruction to two things: 1) what is m, the embedding dimension i.e. the dimension of the state space? and 2) what is τ, the delay we use to shift the time series?

Finding an Embedding Dimension – False Nearest Neighbour Algorithm

First, to demonstrate the effect of choosing an appropriate embedding dimension, let’s fix τ and track a set of points from a 2-dimensional embedding of the Lorenz x(t) time series to a 3-dimensional embedding:

As we can see, the two points which seem close in 2D are actually not so close in 3D, i.e. they only appeared close because the 3D space was being projected onto a lower dimension – these kinds of neighbouring points are called “false neighbours”.

This is similar to how two points in a photo may seem close, even though we know they are far apart in real life; their true position isn’t adequately represented in a 2D photo because the objects themselves exist in 3D – hence the appearance of “false neighbours”.

Now once the attractor is embedded into 3-dimensions, as is appropriate, the occurrence of false neighbours ceases to exist (or becomes minimal), as no more dimensions are needed to distinguish the trajectories of the attractor.

The algorithm to compute the dimension at which this occurs is called the False Nearest Neighbour (FNN) algorithm, and works as follows:

  1. Consider an embedding X at dimension m
  2. For every point x in X, find the nearest neighbours of x
  3. Note the indices and distances of the neighbours
  4. Create an embedding Y at dimension (m+1)
  5. For each point y in Y corresponding to x in X, use the indices from (3) to find the distances from y to the corresponding neighbours of x in Y
  6. Find the average difference in distances from (3) and (5), D
  7. The average difference, D, is computed for a range of embedding dimensions; once a sufficiently low (near-zero) value of D is found, the corresponding dimension m is taken as the appropriate embedding dimension.

And here’s the result of applying this algorithm to our time series; note that the distance discrepancy of neighbouring points (i.e. occurrence of false neighbours) pretty much stabilizes at m=3, meaning we can take the state-space of our system to be 3D:

Estimating Time Delay – Average Mutual Information

Again, to demonstrate the effect of the time-delay parameter, τ, on the attractor reconstruction, let’s now fix m=3 and steadily increase the value of τ:

Notice how a value of τ that is too small will result in a mapping which lies close to the diagonal of the state space, since the columns in the embedding matrix aren’t “shifted enough”. Similarly, a value of τ that is too large will cause the mapping to ”fold” onto itself thereby possibly introducing artificial dynamics into the embedding.

The question of choosing an appropriate value of τ then depends on finding a delay such that the corresponding delay vectors are maximally independent of each other; as such, the vectors in the observation map will be closest to forming an orthogonal basis for the state space.

To achieve this, we look at the Average Mutual Information (AMI) function of the times series, defined as follows:

AMI( x(t), x(t+τ) ) = i,j [ Pij(τ) * log( Pij(τ) / PiPj ) ]

Here the values of x(t) are binned and Pa , a∈ {i,j} denotes the probability that x(t) is in bin a, and Pij(τ) denotes the probability that x(t+τ) is in both bin i and bin j.

As the AMI is a measure of the mutual dependence between the time-series and lagged versions of the time-series, the index of the first minimum in the AMI implies the smallest lag necessary for the shifted time series to be relatively independent from the original series. Here we can see the AMI function of our x(t) time series:

The first minimum occurs at τ=15, so that’s what we should use to create the embedding matrix for our system.

Creating the Time Delay Embedding

Bringing it all together, using our x(t) time series we want to create a matrix with 3 columns (corresponding to m=3) and each column should shift x(t) by 15 indices:

Embedding Matrix: [ x(t) | x(t+15) | x(t+30) ]

Now let’s compare the original state space we had with the embedded state space we get when plotting this matrix in 3D:

Not perfect… but not bad either. In fact, the reconstructed shape is quite good – it’s a diffeo-morphism. That means its shape is topologically equivalent to the original attractor, so things like the homology (i.e. “holes”) are preserved – remember, those holes correspond to orbits which are quite informative about how a system behaves. In addition, things like the Lyupanov exponent would be preserved, telling us how quickly trajectories in our system diverge.

Bringing it Back to Football

Now let’s apply all this to movement data in football. We’ll look at the distance between a Center Defensive Midfielder (CDM) with the Left Winger (LW) and Right Winger (RW) on the pitch:

It’s quite difficult to pull out relationships between the two pairs; both seem to oscillate in terms of being closer than further or vice-versa. But using the distance time series between both players, we can reconstruct the state space of the dynamics for each pairing:

The first thing of note is how the coupling between the black-red lies very close to the diagonal compared to the black-blue. Recall the columns of the embedding matrix are time-shifted versions of the original distance between players time series – to lie close to the diagonal means there is often little variation in this series, i.e. the two players are more directly coupled. By “directly” here I mean that the players maintain a certain distance, either small or large, and directly shift from a state of being close to being far, or vice-versa.

Comparing that with the coupling between black-blue, we see a much more dynamic relationship. In addition to not being as directly coupled, we can notice there is the orbit in the top right, along with an attractive point in the bottom left. This corresponds to how these two players tend to oscillate their distance on a small scale, at some point they may diverge and be further from each other but they quickly return to their pattern of maintaining a close-medium distance.

All this gives us insight into the tactical relationships players may have – what are their tendencies and how do they behave in relation to each other. Perhaps the team employs a system where the RW maintains a more advanced position with less defensive responsibility compared to the LW. By knowing that the CDM and RW are coupled so directly could provide an opportunity to exploit in the transition of their states; similarly, it could help a team be alert against a dangerous attack down that wing.

What might couplings look like between a team and their opposition? Is the coupling directed, i.e. is there some measure of influence? There are a lot of interesting directions we could take this analysis in and I’m really excited to explore it more.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: