A research-driven machine learning project that uses Football Manager 2024 as a controlled simulation environment to predict long-term football player success.
This project was completed as part of the Senior Project (STAT 499) for the B.Sc. in Statistics and Data Science program at the University of Bahrain.
The project investigates whether early-career football player attributes can be used to predict long-term success after ten simulated seasons in Football Manager 2024 (FM24).
Unlike typical machine learning projects that start from a ready-made CSV file, this project builds a complete research pipeline:
- Automated data extraction from FM24
- Three independent 10-year simulations
- Longitudinal player tracking
- Market-value-based success labeling
- Class imbalance handling
- Predictive modeling
- Interpretability analysis
- Exploratory cluster analysis
Ebrahim Juma Shakak Alsawan
ID: 202009241
B.Sc. Statistics and Data Science
University of Bahrain
Supervisor: Ms. Aseel Masoud Ebrahim Alhermi
Department: Mathematics
Date: December 2025
The main objective of this project is to predict the future success of young football players aged 15โ23 using early-career attributes extracted from Football Manager 2024.
The project aims to answer:
Can machine learning extract reliable patterns from early-career football data to predict long-term player success?
Most student machine learning projects follow a simple workflow:
Dataset โ Preprocessing โ Model โ Evaluation
This project follows a full research-engineering workflow:
FM24 Simulation Environment
โ Automated Data Extraction
โ Multi-Year Career Simulation
โ Data Consolidation
โ Success Labeling
โ Machine Learning Modeling
โ Interpretability
โ Cluster Discovery
This makes the project not only a predictive modeling task, but also a complete synthetic longitudinal research framework.
This pipeline shows how FM24 data was extracted, transformed into reusable shortlists, simulated across three independent 10-year runs, and finally consolidated into a unified machine learning dataset.
Success was not defined using a random threshold.
Instead, the project uses a dual-benchmark approach:
- Real-world benchmark: Top 25% market value from Transfermarkt.
- FM benchmark: Mapped to the top 10% of FM Year-10 market values.
- Multi-simulation validation: A player is labeled successful only if they reach the top 10% threshold in at least 2 out of 3 simulations.
This ensures that the success label reflects consistent long-term performance rather than a lucky single simulation outcome.
Only 3.3% of players were labeled as successful.
This creates an extreme class imbalance problem, which makes the prediction task much harder and more realistic.
Because of this imbalance, simple accuracy is not enough. The project uses more appropriate metrics such as:
- Balanced Accuracy
- F1-Score
- Matthews Correlation Coefficient (MCC)
- ROC-AUC
- Precision-Recall analysis
The study uses a controlled four-way experimental design to isolate the effect of age and hidden attributes.
The four configurations are:
| Configuration | Description |
|---|---|
| No-Age + Realistic Mode | Uses only visible attributes and excludes age |
| No-Age + Full Mode | Includes hidden attributes CA/PA but excludes age |
| With-Age + Realistic Mode | Uses visible attributes and includes age |
| With-Age + Full Mode | Includes visible attributes, hidden attributes, and age |
This design helps answer two important questions:
- Does age provide genuine predictive value?
- How much predictive power comes from hidden FM attributes such as CA and PA?
A major contribution of this project is the automated data extraction and simulation pipeline.
Football Manager does not provide a simple full-database export tool, so automation was required to collect the dataset at scale.
GitHub does not always preview MP4 files directly in the README.
If a video does not open or play in the browser, download it from the repository and watch it locally.
Shows how PyAutoGUI was used to automate the FM24 interface and reduce manual data extraction.
Shows how player shortlists were generated and exported from FM24 as part of the automated extraction workflow.
Shows the data engineering step used to merge, organize, and prepare extracted shortlist files for analysis.
| Component | Description |
|---|---|
| Source | Football Manager 2024 simulation data + Transfermarkt benchmark |
| Initial Player Pool | Approximately 88,000 players after league filtering |
| Final Dataset | 43,094 players |
| Age Range | 15โ23 years old |
| Simulation Length | 10 in-game years |
| Simulation Runs | 3 independent runs |
| Attributes | Technical, mental, physical, hidden, demographic, and market-value features |
| Target Variable | success_label |
| Positive Class Rate | Approximately 3.3% successful players |
The dataset was filtered to players from top football leagues, including:
- Argentina
- Belgium
- Brazil
- Croatia
- Denmark
- England
- France
- Germany
- Italy
- Japan
- Mexico
- Netherlands
- Poland
- Portugal
- Spain
- United States
This filtering made the simulation computationally feasible while keeping the player pool competitive and diverse.
Player data was extracted directly from FM24 using an automated PyAutoGUI pipeline.
The process involved:
- Extracting Year-0 player attributes
- Saving players into shortlists
- Exporting HTML files
- Converting shortlists into reusable formats
- Simulating 10 years forward
- Extracting Year-10 player data
- Repeating the process across three independent simulations
The exported HTML files were merged into structured datasets using Python.
The pipeline handled:
- HTML parsing
- Batch merging
- Duplicate removal
- UID-based player matching
- Year-0 and Year-10 alignment
- Simulation run consolidation
A player was labeled successful if:
Player reaches Top 10% Year-10 FM market value
in at least 2 out of 3 independent simulations
This majority-vote strategy reduces noise caused by randomness in injuries, transfers, and career development.
The following supervised machine learning models were evaluated:
- Logistic Regression
- Decision Tree
- Random Forest
- Support Vector Classifier
- XGBoost
The project used:
- SMOTE for imbalance handling
- Optuna for hyperparameter optimization
- Train-validation-test split
- Threshold optimization
- Multi-metric evaluation
Model interpretability was analyzed using:
- SHAP values
- Feature importance
- Coefficient analysis
- Permutation importance
This helped identify which early-career attributes contributed most strongly to long-term success.
XGBoost โ Full Mode, With Age
| Metric | Score |
|---|---|
| Balanced Accuracy | 89.99% |
| F1-Score | 0.465 |
| Precision | 0.164 |
| Recall | 96.77% |
| ROC-AUC | 0.954 |
| MCC | 0.448 |
This represents the strongest theoretical performance because the model has access to hidden FM attributes such as CA and PA.
Random Forest โ Realistic Mode, With Age
| Metric | Score |
|---|---|
| Balanced Accuracy | 87.31% |
| F1-Score | 0.382 |
| Precision | 0.155 |
| Recall | 91.71% |
| ROC-AUC | 0.923 |
| MCC | 0.376 |
This result is more relevant to real-world scouting because it uses only observable player attributes.
When Current Ability (CA) and Potential Ability (PA) are included, they become the strongest predictors of long-term success.
This is expected because they represent internal FM ratings that directly summarize player quality and potential.
Even without hidden attributes, the Realistic Mode models performed strongly.
Important visible predictors included:
- Anticipation
- Decisions
- Determination
- Composure
- Concentration
- Bravery
- Strength
- Balance
- Pace
- Stamina
- Natural Fitness
- First Touch
- Technique
- Passing
Age was statistically related to long-term success.
Observed success rates:
| Age Group | Success Rate |
|---|---|
| Young players โค20 | 1.12% |
| Peak development group 21โ23 | 7.42% |
With-Age models also improved balanced accuracy by approximately 4โ7 percentage points, confirming that age adds meaningful predictive value.
XGBoost and Random Forest consistently outperformed simpler models because they can capture nonlinear interactions between player attributes.
The project does not claim that machine learning can perfectly predict football careers.
Instead, it shows that FM24 can be used as a controlled environment to identify patterns associated with higher probability of long-term success.
In addition to supervised modeling, the project includes exploratory cluster analysis to investigate whether successful players form natural groups in the data.
This visualization shows how players separate in Current Ability and Potential Ability space.
It highlights that success is concentrated in specific regions, especially among players with higher CA and PA values.
This visualization explores the relationship between player quality, market value, and cluster membership.
It supports the idea that the simulation contains meaningful latent structure rather than random player development patterns.
The project includes a detailed data dictionary covering player attributes, hidden attributes, demographic variables, and simulation outputs.
Attribute groups include:
- Technical attributes
- Mental attributes
- Physical attributes
- Goalkeeping attributes
- Hidden player attributes
- Hidden personality attributes
- Market value variables
- Simulation output variables
- Target labels
- Football Manager 2024
- PyAutoGUI
- HTML export workflow
- Python
- pandas
- NumPy
- glob
- HTML parsing
- Logistic Regression
- Decision Tree
- Random Forest
- Support Vector Classifier
- XGBoost
- SMOTE
- Optuna
- SHAP
- Permutation Importance
- Feature Importance
- Coefficient Analysis
- Matplotlib
- Seaborn
- PCA
- t-SNE
โโโ media/
โ โโโ fm_pipeline_diagram.png
โ โโโ majority_vote_framework.png
โ โโโ success_distribution.png
โ โโโ model_configurations.png
โ โโโ demo_pyautogui_thumbnail.png
โ โโโ shortlist_extraction_thumbnail.png
โ โโโ data_merge_thumbnail.png
โ โโโ ca_pa_cluster_success.png
โ โโโ transfer_value_clusters.png
โ โโโ 1_DEMO_Pyautogui.mp4
โ โโโ 3_shortlist_extraction.mp4
โ โโโ 2_data_merge_for_the_shortlist.mp4
โ
โโโ notebooks/
โ โโโ pyautogui.ipynb
โ โโโ shortlist script.ipynb
โ โโโ year_10_data_extraction_script.ipynb
โ โโโ Correlation.ipynb
โ โโโ final_LR_With_Age.ipynb
โ โโโ final_LR_Without_Age.ipynb
โ โโโ final_RF_With_Age.ipynb
โ โโโ final_RF_Without_Age.ipynb
โ โโโ final_DT_With_Age.ipynb
โ โโโ final_DT_Without_Age.ipynb
โ โโโ final_SVC_With_Age.ipynb
โ โโโ final_SVC_Without_Age.ipynb
โ โโโ final_XGBoost_With_Age.ipynb
โ โโโ final_XGBoost_Without_Age.ipynb
โ โโโ final_clusters_Without_Age.ipynb
โ
โโโ STAT 499 FINAL REPORT.pdf
โโโ LICENSE
โโโ README.md
pip install pandas numpy scikit-learn xgboost imbalanced-learn pip install shap optuna matplotlib seaborn pyautogui
A legitimate copy of Football Manager 2024 is required to reproduce the full data extraction and simulation process.
Raw FM database files are not shared due to licensing restrictions.
Use the PyAutoGUI automation scripts to extract player data from FM24.
Players are saved into batches and exported as HTML files.
Simulate ten in-game years from the same Year-0 starting point.
Reload the saved shortlists and export updated Year-10 player information.
Repeat the full 10-year simulation process three times to reduce randomness.
Apply the majority-vote success labeling rule.
Train supervised models under the four experimental configurations.
- FM24 is a simulation and cannot fully represent real-world player development.
- Market value is a useful proxy but not a perfect measure of football success.
- Only Year-0 and Year-10 snapshots were collected, with no mid-career tracking.
- Dataset is limited to players aged 15โ23 from selected top leagues.
- Hidden FM attributes such as CA and PA are not available to real-world scouts.
Potential improvements include:
- Extracting Year-1 and Year-5 data for time-series modeling
- Expanding the dataset to lower leagues and broader age groups
- Incorporating contextual variables such as injuries, playing time, coaching quality, and transfers
- Testing deep learning models such as LSTM or Transformer-based approaches
- Validating the framework across other FM versions
- Comparing FM-based predictions with real-world career outcomes
The complete academic report is included in this repository:
STAT 499 FINAL REPORT.pdf
It contains:
- Full methodology
- Literature review
- Experimental design
- Model evaluation
- Feature importance analysis
- Statistical validation
- Cluster analysis
- Appendices
Special thanks to:
- Ms. Aseel Masoud Ebrahim Alhermi for her supervision, patience, and continuous guidance.
- Department of Mathematics, University of Bahrain for supporting this research project.
- My family and friends for their encouragement throughout my university journey.
- Sports Interactive for developing Football Manager 2024.
- Transfermarkt for providing real-world market value reference data.
Author: Ebrahim Juma Shakak Alsawan
LinkedIn: Ebrahim Alsawan
Football Manager 2024 as a simulation sandbox for long-term sports analytics research.






