Part I

Modeling UEFA Euro 2020

Squeezing Complexity into One Formula

Dmitry Zinoviev
The Pragmatic Programmers
5 min readJul 8, 2021

--

Photo by Robert Anderson on Unsplash

“Goooooooaaaaaaaal!” Are you watching UEFA Euro 2020, the oddest UEFA championship of the century? The soccer fest that was supposed to happen in 2020 but happened in 2021 but is still called “2020”?

It’s okay if you’re not. You may still want to enjoy the rest of the story that suggests a way to model the championship in Python and then simulate it.

The article has two parts. In the first part, I will show you how to produce a compact and simple model of a soccer game. In the second part, I will translate the model into a simulatable Python program.

Championship Stages

Photo by Janosch Diggelmann on Unsplash

The UEFA Euro championship consists of two stages: group stage and knock-out stage. At the group stage, 24 European national teams are randomly assigned to six 4-team groups. Each group in a team plays one game with the other three teams. The best two teams advance to the knock-out stage to the round of 16.

A team gets three points for winning, one point for a draw, and zero points for losing. Let it not concern us how the scores are…

--

--

Dmitry Zinoviev
The Pragmatic Programmers

Dmitry is a prof of Computer Science at Suffolk U. He is loves C and Python programming, complex networks, computational soc science, and digital humanities.