A champion recommendation system for the online game League of Legends. For details on the algorithm, please see this post. The most recent version of this algorithm is implemented here.
The core of the code is broken down into four pieces: collectStaticData.py, getTierIds.py, getGameData.py, and champAnalysis.py. Each piece is detailed below.
This code uses the Riot-Watcher Python wrapper for Riot's API. You will also need an API key from Riot Games which can be acquired here.
- collectStaticData.py - downloads champion images and builds a dictionary that map champion ids to names.
- getTierIds.py - iterates through player ids and sorts them based on the ranked tier of the player.
- getGameData.py - collects game data from the players that were identified in getTierIds.
- champAnalysis.py - generates and rates recommendations from the game data.
- The last section of champAnalysis.py is for the general analysis of game data. Feel free to comment and ignore this section.
- sqlSave.py converts the saved game data from json to a sql database.
- ipLogSummary.py reads a text file of ip addresses and counts the number of times each unique address made a request.