GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - E2J1/STAT-499----Senior-project: Research-driven ML project using Football Manager 2024 simulations to predict long-term football player success through automated data extraction, multi-run validation, and predictive modeling.

BranchesTags
Open more actions menu

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
media
media
 
 
Correlation.ipynb
Correlation.ipynb
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
STAT 499 FINAL REPORT.pdf
STAT 499 FINAL REPORT.pdf
 
 
final_DT_With_Age.ipynb
final_DT_With_Age.ipynb
 
 
final_DT_Without_Age.ipynb
final_DT_Without_Age.ipynb
 
 
final_LR_With_Age.ipynb
final_LR_With_Age.ipynb
 
 
final_LR_Without_Age.ipynb
final_LR_Without_Age.ipynb
 
 
final_RF_With_Age.ipynb
final_RF_With_Age.ipynb
 
 
final_RF_Without_Age.ipynb
final_RF_Without_Age.ipynb
 
 
final_SVC_With_Age.ipynb
final_SVC_With_Age.ipynb
 
 
final_SVC_Without_Age.ipynb
final_SVC_Without_Age.ipynb
 
 
final_XGBoost_With_Age.ipynb
final_XGBoost_With_Age.ipynb
 
 
final_XGBoost_Without_Age.ipynb
final_XGBoost_Without_Age.ipynb
 
 
final_clusters_Without_Age.ipynb
final_clusters_Without_Age.ipynb
 
 
pyautogui.ipynb
pyautogui.ipynb
 
 
shortlist script.ipynb
shortlist script.ipynb
 
 
year_10_data_extraction_script.ipynb
year_10_data_extraction_script.ipynb
 
 

Repository files navigation

โšฝ Predicting Football Player Success Using Machine Learning on Football Manager 2024

A research-driven machine learning project that uses Football Manager 2024 as a controlled simulation environment to predict long-term football player success.

Football Manager 2024 Project Banner


๐Ÿ“Œ Project Overview

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

๐Ÿ‘ค Author

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


๐ŸŽฏ Research Objective

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?


๐Ÿง  Why This Project Is Different

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.


โš™๏ธ End-to-End Research Pipeline

End-to-End Data Extraction Pipeline for FM24

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 Labeling & Experimental Design

โœ… Success Labeling Framework

Success was not defined using a random threshold.

Instead, the project uses a dual-benchmark approach:

  1. Real-world benchmark: Top 25% market value from Transfermarkt.
  2. FM benchmark: Mapped to the top 10% of FM Year-10 market values.
  3. Multi-simulation validation: A player is labeled successful only if they reach the top 10% threshold in at least 2 out of 3 simulations.

Majority Vote Success Labeling Framework

This ensures that the success label reflects consistent long-term performance rather than a lucky single simulation outcome.


๐Ÿ“Š Success Distribution

Only 3.3% of players were labeled as successful.

Distribution of Success Labels

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

๐Ÿ”ฌ Model Configuration Matrix

The study uses a controlled four-way experimental design to isolate the effect of age and hidden attributes.

Model Configurations Matrix

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:

  1. Does age provide genuine predictive value?
  2. How much predictive power comes from hidden FM attributes such as CA and PA?

โš™๏ธ Automated Research Pipeline

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.

๐ŸŽฅ Demo Videos

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.


1๏ธโƒฃ PyAutoGUI Automation Demo

Shows how PyAutoGUI was used to automate the FM24 interface and reduce manual data extraction.

PyAutoGUI Automation Demo


2๏ธโƒฃ Shortlist Extraction Demo

Shows how player shortlists were generated and exported from FM24 as part of the automated extraction workflow.

Shortlist Extraction Demo


3๏ธโƒฃ Data Merge for Shortlist Pipeline

Shows the data engineering step used to merge, organize, and prepare extracted shortlist files for analysis.

Data Merge for Shortlist Demo


๐Ÿ“Š Dataset Overview

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

๐ŸŒ Included Leagues

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.


๐Ÿ›  Methodology

1๏ธโƒฃ Data Collection

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

2๏ธโƒฃ Data Consolidation

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

3๏ธโƒฃ Success Label Creation

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.


4๏ธโƒฃ Model Training

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

5๏ธโƒฃ Interpretability

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.


๐Ÿ† Key Results

Best Overall Model

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.


Best Realistic Model

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.


๐Ÿ” Key Findings

1๏ธโƒฃ Hidden Attributes Dominate in Full Mode

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.


2๏ธโƒฃ Observable Attributes Still Carry Predictive Signal

Even without hidden attributes, the Realistic Mode models performed strongly.

Important visible predictors included:

Mental Attributes

  • Anticipation
  • Decisions
  • Determination
  • Composure
  • Concentration
  • Bravery

Physical Attributes

  • Strength
  • Balance
  • Pace
  • Stamina
  • Natural Fitness

Technical Attributes

  • First Touch
  • Technique
  • Passing

3๏ธโƒฃ Age Provides Genuine Predictive Value

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.


4๏ธโƒฃ Ensemble Models Performed Best

XGBoost and Random Forest consistently outperformed simpler models because they can capture nonlinear interactions between player attributes.


5๏ธโƒฃ Player Success Is Predictable but Probabilistic

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.


๐Ÿงฉ Discovery & Latent Structure Analysis

In addition to supervised modeling, the project includes exploratory cluster analysis to investigate whether successful players form natural groups in the data.


CA-PA Cluster Success Visualization

CA-PA Clusters Colored by Cluster and Success

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.


Transfer Value Cluster Visualization

Clusters Based on Total Score and Transfer Value

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.


๐Ÿ“˜ Data Dictionary

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

๐Ÿงฐ Technology Stack

Simulation & Automation

  • Football Manager 2024
  • PyAutoGUI
  • HTML export workflow

Data Processing

  • Python
  • pandas
  • NumPy
  • glob
  • HTML parsing

Machine Learning

  • Logistic Regression
  • Decision Tree
  • Random Forest
  • Support Vector Classifier
  • XGBoost
  • SMOTE
  • Optuna

Model Interpretation

  • SHAP
  • Permutation Importance
  • Feature Importance
  • Coefficient Analysis

Visualization

  • Matplotlib
  • Seaborn
  • PCA
  • t-SNE

๐Ÿ“ Repository Structure

โ”œโ”€โ”€ 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

๐Ÿš€ Getting Started

Installation

pip install pandas numpy scikit-learn xgboost imbalanced-learn
pip install shap optuna matplotlib seaborn pyautogui

Important Note

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.


๐Ÿ” Reproducing the Study

Step 1: Extract Year-0 Player Data

Use the PyAutoGUI automation scripts to extract player data from FM24.

Step 2: Generate Shortlists

Players are saved into batches and exported as HTML files.

Step 3: Run 10-Year Simulations

Simulate ten in-game years from the same Year-0 starting point.

Step 4: Extract Year-10 Data

Reload the saved shortlists and export updated Year-10 player information.

Step 5: Repeat Across Three Runs

Repeat the full 10-year simulation process three times to reduce randomness.

Step 6: Build Success Labels

Apply the majority-vote success labeling rule.

Step 7: Train and Evaluate Models

Train supervised models under the four experimental configurations.


โš ๏ธ Limitations

  • 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.

๐Ÿ”ฎ Future Work

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

๐Ÿ“„ Full Report

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

๐Ÿ™ Acknowledgments

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.

๐Ÿ“ง Contact

Author: Ebrahim Juma Shakak Alsawan
LinkedIn: Ebrahim Alsawan


Football Manager 2024 as a simulation sandbox for long-term sports analytics research.

About

Research-driven ML project using Football Manager 2024 simulations to predict long-term football player success through automated data extraction, multi-run validation, and predictive modeling.

Topics

class-imbalanceclustering-algorithmdata-sciencefm24football-analyticsfootball-managermachine-learningoptunapredictive-modelingpyautoguipythonrandom-forestshapsimulation-modelingsmotesports-analyticsxgboost

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.