Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 57 additions & 57 deletions notebooks/07_squad_optimisation/optimize_squad_all_limits_arena.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1402,10 +1402,10 @@
"output_type": "stream",
"text": [
"Selected score input:\n",
" File: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260825_110735_+0200_sofascore_overall_rating_odds_lineup_20260825_121320_+0200.csv\n",
" Retrieval timestamp: 20260825_110735_+0200\n",
" File: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260827_124042_+0200_sofascore_overall_rating_odds_lineup_20260827_124757_+0200.csv\n",
" Retrieval timestamp: 20260827_124042_+0200\n",
" Method: sofascore_overall_rating_odds_lineup\n",
" Metric-creation timestamp: 20260825_121320_+0200\n"
" Metric-creation timestamp: 20260827_124757_+0200\n"
]
},
{
Expand Down Expand Up @@ -1434,7 +1434,7 @@
" 16434029 SC Freiburg SC Freiburg (5) SV Werder Bremen SV Werder Bremen (10)\n",
" 16434039 FC Augsburg FC Augsburg (13) FC Schalke 04 FC Schalke 04 (8)\n",
"\n",
"Validated 469 player rows once before formation solving.\n",
"Validated 468 player rows once before formation solving.\n",
"Detected market-value unit: euros; internal optimization unit: euros.\n",
"Solving formation 4-4-2 ...\n",
" Status: Optimal\n",
Expand Down Expand Up @@ -1492,88 +1492,88 @@
" <th>0</th>\n",
" <td>4-4-2</td>\n",
" <td>Optimal</td>\n",
" <td>170.5025</td>\n",
" <td>€144,911,804</td>\n",
" <td>164.322127</td>\n",
" <td>€149,469,775</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>4-2-4</td>\n",
" <td>Optimal</td>\n",
" <td>166.07502</td>\n",
" <td>€148,233,738</td>\n",
" <td>159.784339</td>\n",
" <td>€147,092,336</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3-4-3</td>\n",
" <td>Optimal</td>\n",
" <td>170.5025</td>\n",
" <td>€146,394,057</td>\n",
" <td>162.953419</td>\n",
" <td>€148,339,960</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4-3-3</td>\n",
" <td>Optimal</td>\n",
" <td>169.649688</td>\n",
" <td>€149,503,459</td>\n",
" <td>163.21241</td>\n",
" <td>€149,871,175</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5-3-2</td>\n",
" <td>Optimal</td>\n",
" <td>169.814048</td>\n",
" <td>€149,964,323</td>\n",
" <td>163.994477</td>\n",
" <td>€148,755,806</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>3-5-2</td>\n",
" <td>Optimal</td>\n",
" <td>171.148234</td>\n",
" <td>€143,718,582</td>\n",
" <td>164.063136</td>\n",
" <td>€147,938,560</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>5-4-1</td>\n",
" <td>Optimal</td>\n",
" <td>170.355363</td>\n",
" <td>€147,885,767</td>\n",
" <td>164.628601</td>\n",
" <td>€145,992,472</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>4-5-1</td>\n",
" <td>Optimal</td>\n",
" <td>170.463699</td>\n",
" <td>€147,694,799</td>\n",
" <td>165.354379</td>\n",
" <td>€149,925,126</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>3-6-1</td>\n",
" <td>Optimal</td>\n",
" <td>170.620366</td>\n",
" <td>€149,212,083</td>\n",
" <td>164.766404</td>\n",
" <td>€149,621,689</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>5-2-3</td>\n",
" <td>Optimal</td>\n",
" <td>166.915294</td>\n",
" <td>€149,354,702</td>\n",
" <td>161.203579</td>\n",
" <td>€149,013,901</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Formation Solver Status Total Score (captain doubled) Total Squad Value\n",
"0 4-4-2 Optimal 170.5025 €144,911,804\n",
"1 4-2-4 Optimal 166.07502 €148,233,738\n",
"2 3-4-3 Optimal 170.5025 €146,394,057\n",
"3 4-3-3 Optimal 169.649688 €149,503,459\n",
"4 5-3-2 Optimal 169.814048 €149,964,323\n",
"5 3-5-2 Optimal 171.148234 €143,718,582\n",
"6 5-4-1 Optimal 170.355363 €147,885,767\n",
"7 4-5-1 Optimal 170.463699 €147,694,799\n",
"8 3-6-1 Optimal 170.620366 €149,212,083\n",
"9 5-2-3 Optimal 166.915294 €149,354,702"
"0 4-4-2 Optimal 164.322127 €149,469,775\n",
"1 4-2-4 Optimal 159.784339 €147,092,336\n",
"2 3-4-3 Optimal 162.953419 €148,339,960\n",
"3 4-3-3 Optimal 163.21241 €149,871,175\n",
"4 5-3-2 Optimal 163.994477 €148,755,806\n",
"5 3-5-2 Optimal 164.063136 €147,938,560\n",
"6 5-4-1 Optimal 164.628601 €145,992,472\n",
"7 4-5-1 Optimal 165.354379 €149,925,126\n",
"8 3-6-1 Optimal 164.766404 €149,621,689\n",
"9 5-2-3 Optimal 161.203579 €149,013,901"
]
},
"metadata": {},
Expand All @@ -1586,39 +1586,39 @@
"Independent post-solve verification passed.\n",
"\n",
"=== Input ===\n",
"Score input file: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260825_110735_+0200_sofascore_overall_rating_odds_lineup_20260825_121320_+0200.csv\n",
"Retrieval timestamp: 20260825_110735_+0200\n",
"Score input file: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260827_124042_+0200_sofascore_overall_rating_odds_lineup_20260827_124757_+0200.csv\n",
"Retrieval timestamp: 20260827_124042_+0200\n",
"Score method: sofascore_overall_rating_odds_lineup\n",
"Metric-creation timestamp: 20260825_121320_+0200\n",
"Metric-creation timestamp: 20260827_124757_+0200\n",
"Requested matchday: 1\n",
"Match JSON source used: SofaScore\n",
"Match JSON path: C:\\kickbase project\\outputs\\sofascore\\match_ids\\match_ids_1.json\n",
"Detected/used market-value unit: euros -> integer euros\n",
"\n",
"=== Optimization result ===\n",
"Chosen formation: 3-5-2\n",
"Chosen formation: 4-5-1\n",
"Solver status: Optimal\n",
"Total score (captain doubled): 171.148234\n",
"Recommended captain: Phillip Tietz\n",
"Total squad value: €143,718,582\n",
"Remaining budget: €6,281,418\n",
"Total score (captain doubled): 165.354379\n",
"Recommended captain: Dominik Kohr\n",
"Total squad value: €149,925,126\n",
"Remaining budget: €74,874\n",
"\n",
"=== Selected players ===\n",
" Full Name Position Club In-Game Value Score Captain\n",
" Manuel Neuer GK FC Bayern München 13565866.0 16.507984 \n",
" Julian Ryerson DEF Borussia Dortmund 26027952.0 17.286749 \n",
"Zeno Van den Bosch DEF 1. FC Union Berlin 13456741.0 11.138947 \n",
" Otávio DEF Eintracht Frankfurt 9374748.0 9.632982 \n",
" Ezechiel Banzuzi MID RB Leipzig 8349668.0 15.312951 \n",
" Malik Tillman MID Bayer 04 Leverkusen 13303012.0 14.082281 \n",
" Han-Noah Massengo MID FC Augsburg 9899475.0 11.946075 \n",
" Patrick Wimmer MID TSG Hoffenheim 7364887.0 11.405367 \n",
" Ísak Jóhannesson MID 1. FC Köln 9418752.0 10.980463 \n",
" Phillip Tietz FOR 1. FSV Mainz 05 13658389.0 19.802807 Yes\n",
" Igor Matanović FOR SC Freiburg 19299092.0 13.248821 \n",
" Full Name Position Club In-Game Value Score Captain\n",
" Manuel Neuer GK FC Bayern München 13764324.0 16.719669 \n",
" Dominik Kohr DEF 1. FSV Mainz 05 10652629.0 17.215913 Yes\n",
" Miguel Gutiérrez DEF Bayer 04 Leverkusen 21033862.0 13.791336 \n",
" Zeno Van den Bosch DEF 1. FC Union Berlin 13151299.0 10.973146 \n",
" Otávio DEF Eintracht Frankfurt 10044435.0 9.787575 \n",
"Konstantinos Karetsas MID Borussia Dortmund 24574032.0 17.098594 \n",
" Ezechiel Banzuzi MID RB Leipzig 9051349.0 15.130818 \n",
" Han-Noah Massengo MID FC Augsburg 10113144.0 11.731293 \n",
" Patrick Wimmer MID TSG Hoffenheim 8149700.0 11.405367 \n",
" Ísak Jóhannesson MID 1. FC Köln 9815158.0 10.980463 \n",
" Igor Matanović FOR SC Freiburg 19575194.0 13.304292 \n",
"\n",
"=== Output ===\n",
"Optimized squad CSV: C:\\kickbase project\\outputs\\optimized_squad\\optimized_squad_sofascore_overall_rating_odds_lineup_20260825_110735_+0200_20260825_121320_+0200_20260825_130825_+0200.csv\n"
"Optimized squad CSV: C:\\kickbase project\\outputs\\optimized_squad\\optimized_squad_sofascore_overall_rating_odds_lineup_20260827_124042_+0200_20260827_124757_+0200_20260827_131319_+0200.csv\n"
]
}
],
Expand Down Expand Up @@ -1768,14 +1768,14 @@
"name": "stdin",
"output_type": "stream",
"text": [
"Select this lineup for All Limits Arena? [y/n]: y\n"
"Select this lineup for All Limits Arena? [y/n]: n\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Selected lineup saved to: C:\\kickbase project\\outputs\\selected_lineups\\all-limits-arena.json\n"
"Lineup was not selected; the existing selection is unchanged.\n"
]
}
],
Expand Down
76 changes: 45 additions & 31 deletions notebooks/07_squad_optimisation/optimize_squad_insider_arena.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1397,10 +1397,10 @@
"output_type": "stream",
"text": [
"Selected score input:\n",
" File: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260825_110735_+0200_sofascore_overall_rating_odds_lineup_20260825_121320_+0200.csv\n",
" Retrieval timestamp: 20260825_110735_+0200\n",
" File: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260827_124042_+0200_sofascore_overall_rating_odds_lineup_20260827_124757_+0200.csv\n",
" Retrieval timestamp: 20260827_124042_+0200\n",
" Method: sofascore_overall_rating_odds_lineup\n",
" Metric-creation timestamp: 20260825_121320_+0200\n"
" Metric-creation timestamp: 20260827_124757_+0200\n"
]
},
{
Expand Down Expand Up @@ -1429,7 +1429,7 @@
" 16434029 SC Freiburg SC Freiburg (5) SV Werder Bremen SV Werder Bremen (10)\n",
" 16434039 FC Augsburg FC Augsburg (13) FC Schalke 04 FC Schalke 04 (8)\n",
"\n",
"Validated 469 player rows once before formation solving.\n",
"Validated 468 player rows once before formation solving.\n",
"Detected market-value unit: euros; internal optimization unit: euros.\n",
"Solving formation 2-2-1 ...\n",
" Status: Optimal\n",
Expand Down Expand Up @@ -1473,32 +1473,32 @@
" <th>0</th>\n",
" <td>2-2-1</td>\n",
" <td>Optimal</td>\n",
" <td>119.196726</td>\n",
" <td>€177,668,096</td>\n",
" <td>118.132982</td>\n",
" <td>€163,815,383</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2-1-2</td>\n",
" <td>Optimal</td>\n",
" <td>119.573845</td>\n",
" <td>€170,724,854</td>\n",
" <td>116.191979</td>\n",
" <td>€154,215,577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1-2-2</td>\n",
" <td>Optimal</td>\n",
" <td>119.38569</td>\n",
" <td>€168,759,799</td>\n",
" <td>117.285143</td>\n",
" <td>€178,724,207</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Formation Solver Status Total Score (captain doubled) Total Squad Value\n",
"0 2-2-1 Optimal 119.196726 €177,668,096\n",
"1 2-1-2 Optimal 119.573845 €170,724,854\n",
"2 1-2-2 Optimal 119.38569 €168,759,799"
"0 2-2-1 Optimal 118.132982 €163,815,383\n",
"1 2-1-2 Optimal 116.191979 €154,215,577\n",
"2 1-2-2 Optimal 117.285143 €178,724,207"
]
},
"metadata": {},
Expand All @@ -1511,34 +1511,34 @@
"Independent post-solve verification passed.\n",
"\n",
"=== Input ===\n",
"Score input file: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260825_110735_+0200_sofascore_overall_rating_odds_lineup_20260825_121320_+0200.csv\n",
"Retrieval timestamp: 20260825_110735_+0200\n",
"Score input file: C:\\kickbase project\\outputs\\expected_points\\expected_points_20260827_124042_+0200_sofascore_overall_rating_odds_lineup_20260827_124757_+0200.csv\n",
"Retrieval timestamp: 20260827_124042_+0200\n",
"Score method: sofascore_overall_rating_odds_lineup\n",
"Metric-creation timestamp: 20260825_121320_+0200\n",
"Metric-creation timestamp: 20260827_124757_+0200\n",
"Requested matchday: 1\n",
"Match JSON source used: SofaScore\n",
"Match JSON path: C:\\kickbase project\\outputs\\sofascore\\match_ids\\match_ids_1.json\n",
"Detected/used market-value unit: euros -> integer euros\n",
"\n",
"=== Optimization result ===\n",
"Chosen formation: 2-1-2\n",
"Chosen formation: 2-2-1\n",
"Solver status: Optimal\n",
"Total score (captain doubled): 119.573845\n",
"Recommended captain: Phillip Tietz\n",
"Total squad value: €170,724,854\n",
"Remaining budget: €9,275,146\n",
"Total score (captain doubled): 118.132982\n",
"Recommended captain: Nadiem Amiri\n",
"Total squad value: €163,815,383\n",
"Remaining budget: €16,184,617\n",
"\n",
"=== Selected players ===\n",
" Full Name Position Club In-Game Value Score Captain\n",
" Mark Flekken GK Bayer 04 Leverkusen 15527801.0 14.490463 \n",
"Julian Ryerson DEF Borussia Dortmund 26027952.0 17.286749 \n",
" Willi Orban DEF RB Leipzig 31396500.0 16.361783 \n",
" Michael Olise MID FC Bayern München 64815120.0 18.580415 \n",
" Phillip Tietz FOR 1. FSV Mainz 05 13658389.0 19.802807 Yes\n",
"Igor Matanović FOR SC Freiburg 19299092.0 13.248821 \n",
" Manuel Neuer GK FC Bayern München 13764324.0 16.719669 \n",
"Julian Ryerson DEF Borussia Dortmund 26105247.0 17.286749 \n",
" Willi Orban DEF RB Leipzig 31442247.0 16.167175 \n",
" Nadiem Amiri MID 1. FSV Mainz 05 33932022.0 19.563537 Yes\n",
" Aleix García MID Bayer 04 Leverkusen 38996349.0 15.528023 \n",
"Igor Matanović FOR SC Freiburg 19575194.0 13.304292 \n",
"\n",
"=== Output ===\n",
"Optimized squad CSV: C:\\kickbase project\\outputs\\optimized_squad\\optimized_squad_sofascore_overall_rating_odds_lineup_20260825_110735_+0200_20260825_121320_+0200_20260825_123428_+0200.csv\n"
"Optimized squad CSV: C:\\kickbase project\\outputs\\optimized_squad\\optimized_squad_sofascore_overall_rating_odds_lineup_20260827_124042_+0200_20260827_124757_+0200_20260827_131159_+0200.csv\n"
]
}
],
Expand Down Expand Up @@ -1688,14 +1688,28 @@
"name": "stdin",
"output_type": "stream",
"text": [
"Select this lineup for Kickbase.insider Arena? [y/n]: n\n"
"Select this lineup for Kickbase.insider Arena? [y/n]: y\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Lineup was not selected; the existing selection is unchanged.\n"
"Current selected lineup for Kickbase.insider Arena: expected points=118.351453, players=[Mark Flekken, Julian Ryerson, Willi Orban, Michael Olise, Phillip Tietz, Igor Matanović]\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Replace the current selected lineup? [y/n]: y\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Selected lineup saved to: C:\\kickbase project\\outputs\\selected_lineups\\kickbase.insider-arena.json\n"
]
}
],
Expand Down Expand Up @@ -1729,7 +1743,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Pruned 2 expired timestamped output(s).\n"
"Pruned 1 expired timestamped output(s).\n"
]
}
],
Expand Down
Loading
Loading