All projects · Euroleague Basketball

Standings prediction

From probability to certainty.

Client
Euroleague Basketball
Year
2023
Industry
Professional sport / Basketball
Role
PM · Development · R&D
Service
Data science and custom software development
Scope
18 teams · 34 rounds · 9 games per round
  • Data science
  • AI
  • Machine learning
  • Algorithms
  • CRISP-DM
  • Sport
Will this team qualify? AI gives an estimated probability; the mathematical axiom gives the guaranteed worst position.

Summary

Cyberdelia built an engine for Euroleague that calculates, round by round, the worst possible position for every team if it loses all its remaining games. A mathematical answer, not an estimate.

The challenge

Euroleague needed to know, as early as possible, whether a team had already secured qualification for the next phase, and to be able to communicate it with complete reliability.

The problem is combinatorial. Each round has 9 games, meaning 512 possible combinations of results, and chaining several rounds makes the number of scenarios grow exponentially. On top of that, tie-breakers depend on the points scored in each game, a figure that wasn’t available in the source used.

Project journey, from the 2021 proof of concept to comparing approaches in 2023.

The journey

The project started in 2021 as a machine-learning proof of concept and, after the review with Euroleague in January 2023, evolved into exploring and comparing several approaches. Two of them define the case: a predictive AI model and a deterministic engine based on a mathematical axiom. Each answers a different question, and together they give Euroleague the full picture.

Approach 1 · AI prediction

The first approach answers the question “what is the probability that a team qualifies?”. It followed the CRISP-DM methodology, in iterative cycles running from business and data understanding to modelling, evaluation and deployment.

The dataset was built from real data from Euroleague’s statistics API: more than 60 variables per game, such as 2- and 3-point shots, rebounds, assists, turnovers, efficiency rating or home/away. Logistic regression and random forest models were trained on it.

The result is a useful estimate for analysis, but a probability doesn’t allow anyone to officially state that a team has qualified.

AI approach: the CRISP-DM data cycle.

Approach 2 · The mathematical axiom

The second approach changes the question: “if this team loses every remaining game, what is the lowest position it can finish in?”. The answer isn’t an estimate, it’s a certainty, and therefore it can be communicated.

Solving it meant taming the combinatorial explosion. Four design decisions made it feasible:

  • Only scenarios in which the analysed team loses are kept, cutting the 512 combinations per round to a maximum of 256.
  • The engine works with an adjustable window of two positions above and below, because distant teams don’t change the result.
  • The horizon is parameterised, 8 rounds by default.
  • Repeated standings are discarded to save computing time.
Taming the combinatorial explosion: 9 games, 512 outcomes, 256 scenarios, ±2 rivals, no duplicate standings → guaranteed worst position.
Architecture: incremental API ingestion, MySQL, recalculation and presentation in spreadsheet and web.

The solution

The application is made of two independent, autonomous pieces. The first connects incrementally to Euroleague’s statistics API, stores the data in MySQL and recalculates standings only when something changes, with a daily cron run. The second presents the pre-calculated results in a spreadsheet and a web application.

The algorithm, round by round

The algorithm takes the season, the current round and the team being analysed. For each round it gets the current standings, identifies the teams tied with the analysed one, generates every combination for the next round and builds a table for each scenario. From each it records the team’s worst position and, at the end, returns the worst possible position at the close of the regular season.

Since points per game weren’t available, ties are always resolved against the analysed team. The position returned is therefore a guaranteed pessimistic bound.

The algorithm, round by round.
Reading the result: Olympiacos, round 28, won’t drop below 6th.

Results

With real data from round 28 of the 2022-2023 season, the system determined that Olympiacos would not drop below 6th place even if it lost all its remaining games.

TeamWorst possible positionStatus
Olympiacos Piraeus6th
Real Madrid8th
FC Barcelona8th
Fenerbahçe Beko Istanbul10th
AS Monaco11th
Partizan Mozzart Bet Belgrade11th
Cazoo Baskonia Vitoria-Gasteiz11th
Zalgiris Kaunas12th
Anadolu Efes Istanbul15th
  • Place guaranteed
  • Depends on other results
  • No guarantee

For each team, the tool details the round-by-round evolution: scenarios generated, worst position without ties, number of ties, teams involved and pessimistic final position. Euroleague got an immediate read of who has a guaranteed spot and who still depends on other results.

Why it worked

The value wasn’t in the most sophisticated model, but in framing the right question for the client. AI brings context and trend; the axiom brings the certainty an official announcement requires. Exploring and comparing both paths let Euroleague use each one for what it’s good at.

The deterministic solution relies on simple, explainable engineering decisions, so the result is transparent and auditable: anyone in the organisation can understand why a team is green. The intellectual property of the solution remained with Euroleague.

Stack

  • .NET
  • C#
  • Python
  • MySQL
  • API estadística Euroleague

Got a similar project?

Let’s talk aboutyour product.

→ hey@cyberdelia.es