# ⚽⚽⚽ Football Manager Optimizer ⚽⚽⚽

### The Game

With *Kicker Manager Interactive* you can prove to your colleagues and friends that you have superior knowledge on soccer. Your task is to put together a team of 22 players from all the active players in the Bundesliga (the German Soccer League) within a given budget. Each individual player has a fixed market value. Once the squad has been formed, 11 players have to be selected for each match day. Depending on their performance on the real Bundesliga match day, these players receive points based on their rating by the *Kicker Magazine*. Players can get extra points, e.g. if they score goals or give assists, but on the other hand bad performances or red cards can also lead to negative points. After every match day, each participant receives the accumulated points of the 11 players she has lined up. The goal is for your team to have more points than the teams of the other participants at the end of the season.

To be able to fix bad player acquisitions, there is a transfer window in the winter break of the season. In this transfer period, a total of four players of the own team can be sold and replaced by new players.

The complete rules can be found here (German).

** NOTE:** Obviously, no one can see into the future, so the actual points players will make are unknown. To get around this, the underlying GAMS model is initialized with data from the past. Specifically, this means that the points scored by each player last season are used to predict performance in the upcoming season. For the winter transfer window, data from the first half of the current season is used to predict expected points for the second half of the season. Users can modify these initial predictions with their own. Good predictions are the key to becoming a successful kicker manager.

### Model Formulation Download

As in the world of mathematical optimization, soccer managers are bound by constraints. For example, your team must consist of 22 players, the number of players per position is given, you can have at most 4 players from the same Bundesliga team in your squad and the accumulated market value of your team must not exceed 42.5 million euros.

A common tactic is to build a squad of 11 or more expensive core players ('*starters*') and fill it up with cheap ones ('*substitutes*'). The task of assembling a good squad can be modeled as a Mixed Integer Program. The key decisions are whether a player $p$ is selected or not (modeled by a binary variable $X_p$) and if a selected player belongs to the so-called starters (modeled by a binary variable $S_p$). The difference between starters and substitutes is that the expected points of starters contribute to the objective with weight 1 while the expected points of the substitutes can be weighted with an individual factor $wsubst$ (usually much smaller than 1), depending on how much importance you give them:

$$ \max \sum_p(pts_p \cdot S_p) + \sum_p(pts_p \cdot (X_p - S_p)) \cdot wsubst $$

The rules of the manager game, such as the number of players to be selected for each position (3 goalkeepers, 5 defenders, 8 midfielders and 6 strikers), can be formulated as constraints: $$ \sum_{p \in \mathcal{P_{goal}}} X_p = 3,\ \ \sum_{p \in \mathcal{P_{def}}} X_p = 6,\ \ \sum_{p \in \mathcal{P_{mid}}} X_p = 8\ \ \sum_{p \in \mathcal{P_{fwd}}} X_p = 5\ $$ where $\mathcal{P_{goal}}, \mathcal{P_{def}}, \mathcal{P_{mid}}, \mathcal{P_{fwd}}$ are sets of all available goalkeepers, defenders, midfielders and forwards.

At this point, we skip on covering the full algebraic model in detail and refer to the source code for further details. This app offers several options that go beyond simply presenting the rules of the game, which will be discussed below as part of the app explanations.

### MIRO App

This MIRO app was developed on short notice within a very limited amount of time in order to be able to provide a first prototype for the next winter transfer period. This reflects a fundamental approach of MIRO: initial prototype applications can be developed with little effort and then successively enhanced. Who knows, maybe this app will also be developed further?

#### Settings

On the input side of this MIRO application there are 3 tabs (beside this text). In the first one, the *settings* tab, most of the options to adapt your team to your personal preferences are available:

- Transfer mode switch

This option was designed specifically for the winter transfer period. If it is activated, you have to provide your current team as part of the input data in the*Current Team*tab. Based on this team, up to 4 transfers will then be suggested for you to make. - Enforce to pick all goalies from one club

It is a common tactic to select all goalkeepers from the same club. In case the starting goalie of the club cannot play, e.g. due to an injury, you have a backup from the same team who will stand in for him. - Activate fixed number of starters

Here you can define how many starters (i.e. fully weighted players in the objective function) you want to have in your team. If you leave this option at $0$, the algorithm will decide. - Minimum points per starter

Only players whose expected points are above the set limit will be considered as starters for your team. - Weight applied to points of substitutes

As explained in the notes on the objective function, substitutes can be assigned a custom weight. The higher this weight, the more importance is given to the substitutes in the objective function (weight of 1 = no difference to starters). - Number of teams to compute

For better decision making, several teams can be computed. Each team differs in at least one starter. When the transfer mode is enabled, different transfers will be suggested for each team (i.e. at least one sold or bought player will be different between two teams).

#### Player Input Data

In this table all Bundesliga players are listed together with their expected points and their market value. This data set forms the basis of the optimization and is where users can enter their prediction for the expected points if it differs from the initial values.

Are you a fan of Robert Lewandowski? Or do you think that Erling Haaland definitely belongs in a decent kicker manager team? In column 'Fix Selection of Player' you can make such decisions in advance by entering a 1. Note that the market value of your team must not exceed the budget of 42.5 million euros.

If you have activated the *Transfer mode switch*, you have to define your current team by entering a 1 in column 'Current Team Membership'. ** NOTE**: If your current team contains players that are not part of the

*player input data*(e.g. because they left the Bundesliga in the meantime), these players must be added to the table!

#### Number of Starters per Position

Here you can define the (minimum and maximum) number of starters per position that your team should have. Reminder: This defines the number of your *core players* which contribute with weight one to the objective function.

The underlying model was inspired by the following paper by Janick Frasch, Dennis Janka, Robert Kircheis, Sebastian Sager: https://mathopt.de/KMS/kickerKnapsack.pdf.

If you are using the transfer mode and your current team contains players that are not part of this table, these players must be added via rightclick + insert row!NOTE: