An Web steam game recommender by collaborative filtering method based on 7699 user experiences on up-to-date 920000 steam games. Steam games
Authors: Jingjie Zhnag (jjzhang369@gmail.com)
.
|--- data # folder for scaped steam game informations; sample data files are provided for demo/test purposes.
| |--- steam_user_id.txt # public information shared steam user ids.
| |--- steam_owened_games.txt # in src folder, run `python main.py -su` to get this users information file.
| |--- steam_app_details.txt # in src folder, run `python main.py -sg` to get this games information file.
|--- src # Scripts
| |--- main.py
| |--- user_owned_games.py
| |--- game_details.py
| |--- recommendation.py
| |--- config.yaml # configuration file. Set you database information here.
|--- templates
| |--- recommendation.html # Templates for the website.
|--- run_web_app.py # run the web recommendation engine
|--- requirements.txt
└--- README.md
- Install the requirements using
pip install -r requirements.txt
. - Make sure to use the Python 3 version (we recommend using Anaconda python distribution).
- It is recommended to use virtual environment to have a clean package setup.
Clone this repo to your computer (it comes with smaller sample inputs for test/debug purposes).
Building this STEAM games recommender involves five steps.
Each step is created as an indepndent command and all tasks are grouped in the main.py
file
for simplicity.
In the ./src
folder:
- Run
python main.py -h
to see what commands (task) are available. - Run
python main.py COMMAND [ARGS]
to run each task.
In the ./src
folder:
- Run
python main.py -sg
orpython main.py --scapegames
to scape all the STEAM games informations. The games informations are stored indata/steam_app_details.txt
.
Steam provides API calls to provide information about Steam users who agreed to share their owned games.
- Run
python main.py -su
orpython main.py --scapeusers
to scape the STEAM public shared user informations. The user informations are stored indata/steam_owned_games.txt
.
Check the STEAM APIs: Steam Web API Documentation Valve developer community
Make sure you have MySQL installed beforehand**
- In MySQL, create a database named steam. You can change the database name in the
config.yaml
if you like. - Setup the username and password for the database in
config.yaml
.
In the ./src
folder:
- Run
python main.py -tg
orpython main.py --tablegames
to create and save the steam game informations in a table game_steam_app in the database steam. - Run
python main.py -tu
orpython main.py --tableusers
to create and save the steam public shared user informations in a table game_steam_user in the database steam.
Four recommendation approaches are introduced in this recommendation system:
- Popularity based: Recommend the games based on the number of people played. This data is scaped from Steam statistics API.
- Conntent based : Recommend the games based on the similarity between games descriptions.
- Collaborative filtering - item based
- Collaborative filtering - Alternative Least Square model based.
In the ./src
folder:
- Run
python main.py -r
orpython main.py --recommendation
to build the recommendation similarity matrix and save to the steam database.
Run: python run_web_app.py
The steam game recommendation engine can be found on http://127.0.0.1:5000/
. The main application looks like this: