This notebook contains general instructions on how to run the scripts to build, evaluate, and explain prediction models for team victory in the Dota 2 game.
For more details on how we collected the data and extracted the model features, please check our Dota 2 paper accepted at the 16th AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (AIIDE 2020):
The used dataset is available in the following zenodo repository:
The following dependencies are required to run the scripts on your local machine (you do not need to locally install them if you are running the scripts on cloud services like Google Colab):
-
Python 3.7
-
Git 2.20.1.windows.1
-
pip install numpy
-
pip install pandas
-
pip install scikit-learn
-
pip install xgboost
-
pip install matplotlib
-
pip install shap
The following directories contains the scripts to build the prediction models.
-
prediction-models: contains the scripts to read the model features, build and evaluate prediction models using three algorithms: XGBoost, Random Forest, and Logistic Regression. Note that, for each algorithm, there are 3 different scripts, one for each data group we adopted in our study: regular matches, time blowout matches, and score blowout matches.
-
prediction-models-explanation-SHAP: contains the scripts to apply the SHAP values technique to explain victory predictions for Dota 2 matches.
In order to run the scripts within the prediction-models and the prediction-models-explanation-SHAP directories, you will need to first download the dataset (model features), which is available here.
The features are available in the model_pre_match_features.zip file. Please download this zip file and extract its contents.
If you desire to run the scripts on Google Colab, you will need to upload all the three feature files to your Google Colab session (the detailed instructions on how to upload the files are in the prediction-models and prediction-models-explanation-SHAP directories).
For detailed instructions on how to the scripts, please look at the prediction-models and the prediction-models-explanation-SHAP directories, as they contain the necessary information regarding the scripts.
Be aware that the scripts in the prediction-models directory (to build and evaluate the predicion models) and in the prediction-models-explanation-SHAP directory (to build and explain the XGBoost model) should be run in Google Colab by default. The few changes necessary to run the scripts on a local machine are explained in the specific notebooks with the instructions.
If you have any question or suggestion, please contact the repository owner at markosviggiato[at]gmail.com