You can read report for more detail about functions and implementation: link to report
From year to year, one thing that we can not agree more on is that most people around the world love playing games, especially video games. We realized that playing video games is a part of childhood for most of us, so in the course "Decision Support System", we built this small project called "Game Recommendation System" to find out the most suitable game for them with as high accuracy as possible. In this project, we built 4 basic functions to suggest games for users. The first function is games recommendation based on the user's voting rate. The second function is games recommendation based on the game description by using the content-based filtering technique. The third function is games recommendation based on the user's game taste, which is measured by the played time for each game of the user, by using the collaborative filtering technique. The last one is the combination of the second and the third function to recommend the most suitable games to the specific user. The fourth function is operated by applying the hybrid technique and from that, we consider this function as the one for the "oriented-user" purpose. In addition, we also implemented a web application for the user interface that could help users interact with our recommendation system. Through this project, we knew how the recommendation system works and understood the algorithms behind how to operate the system. Here is the MVC architecture that demonstrates how our system works:
Figure 1: The MVC architecture
- Steamspy: We use dataset that we crawling from Steamspy since the API is free and it have positive rating and negative rating. This dataset we use for TFIDF and Hybrid recommend and we name it
steam_api.csv
- Steam video game hours played: We use the dataset that contain hours that users spend for their game. This dataset we use for SVD and Hybrid recommend and we name it
rating.csv
- user_rating.csv: We use this dataset for SVD and Hybrid recommend for current user. Because
rating.csv
does not contain our project user so we must mergeuser_rating.csv
withrating.csv
for SVD training process.
- Steamspy: this dataset does not contain game description and game image link. So first we combine steam url with id column in this dataset and set this column as
links
. Next we crawling game description(linkhere) and crawling game image (linkhere). Next we removeNaN
value in these both columns andduplicate
in dataset. Finally, we fill NaN ofpublisher
with value indeveloper
at same row and the same fordeveloper
so now we can useprintable
instring library
to remove non-Ascii letters. - Steam video game hours played: We remove game name in this dataset that not in game name of Steamspy and Merge interaction
purchased
andplay
so it just contain user who bought and play that game.
- We use the paper Estimated Rating Based on Hours Played for Video Game Recommendation from [ResearchGate] to compute
Frequency
andRating
. Here is our result, to more detail, you can read report
- TFIDF : We use this algorithm for Content based recommend. In our project, the list of game
GAME HAVE SIMILAR CONTENT
in detail of game pages is the prediction of this algorithm. - SVD :
- When login to our project, we see the TOP GAME BY POSITIVE SCORE column, this column we use SVD to calculate the estimation of the current user with all games in the dataset and then show list games has the highest estimation score.
- Next, when click to game to go to detail page, the IF YOU LIKE THIS GAME YOU MIGHT LIKE THESE column is we use the hybrid with combine TFIDF and SVD so it will calculate estimate score from list game that TFIDF predict and then show games have highest estimation score.
- Create the virtual environment:
python3 -m venv tutorial-env
- Active the Script
- On Windows:
tutorial-env\Scripts\activate.bat
- On MacOS:
tutorial-env\Scripts\activate.bat
- Install all necessary libraries:
pip install -r requirements.txt
- Run the program
python main.py
. After the program runs successfully, access this addresshttp://127.0.0.1:2300/
to get experience with the web application.
- main.py: run
Python Flask Application
- init.py: set up
SQLAlchemy
andPython Flask Application
andregister_blueprint
forview.py
- view.py: contain
address
forPython Flask Application
which are: login page, register page, index page, home page, detail page. - models.py: contain SQL models which are:
User
andRating
.
User
: user hasid
,username
,password
,ratings
.id
must be unique andusername
cannot duplicateRating
: rating hasid
,userid
,gameid
,gamename
,rating
. A rating must have uniqueid
and if a user has alreadyrate
that game, therating
will update
- content_based.py: contain
TFIDF model
and the training dataset issteam_api.csv
. It contain one function:
content_based_recommend
: return list indexs of games that TFIDF predict when inputgame index of game we want predict
andthe number contain based will recommend
- SVD.py: contain
SVD models
and the training dataset is merged byrating.csv
anduser_rating.csv
. It have two function
SVD
: it return list of game when inputuser id
,number game the function will return
,number of games we want to SVD calculate
,database we want SVD use for calculate
Hybrid
: it return list of game when inputuser id
,game index for content_based_recommend
,number that contain based will recommend
,number game the function will return
- templates:
Login System
: base.html, index.html, login.html, register.htmlHome Page
: home.htmlDetail Page
: detail.html
- static: contain
css
,javascripts
,fonts
,slick
Reset dataset
: Deleteusers.db
to reset all account and remove all data inuser_rating.csv
NOT DELETE IT and just remain headers ID,User_ID,Game_id,Game_name,RatingPip install suprise error
orPip install -r requirements.txt
: I haven't has this error yet but my friend solve it by download Microsoft C++ Build Tools