Git Product home page Git Product logo

lol_rank_game_predictor's Introduction

fnc

fnc

League of Legends Rank Match Predictor

predict ranked solo-queue matches

Introduction

The system is a fully functioning AI agent to make a prediction of any active ranked solo queue match. Please note that the predictor is only able to predict an active ranked game that is running on your local machine. You can only use it to predict your own game. RIOT does not provide any APIs to retrieve others' active ranked games.

Abstract

Training Data

To build such a system, we've collected 235,487 player accounts of all rank divisions. 7,220 accounts were randomly selected. Roughly 250 accounts were selected for each rank(i.e. DiamondII) so that the data are evenly distributed along 24 ranks. 20 most recent ranked games are collected from each player’s account. The final data set contains 119,184 game instances. All the data were extracted from the APIs provided by RIOT company at https://developer.riotgames.com/apis.

Models

By using neural network and logistic regression, we reached a testing accuracy over 96%.

To Run

There are two things you need to configure before you are able to run the system.

1, Go to https://developer.riotgames.com, use your game account id and pswd to login.

Generate a DEVELOPMENT API KEY once you are logged in.

Copy that API Key, go to directory Config/riot_config.py and put your key there. For example:

ACCESS_KEY = "RGAPI-2cc1fe35-adsa7-4a84-95b6-7dfdfd1d02e91"

The key serves as an access for you to retrieve any history game data and your active game data.

2, Next, go to Live_Game_Prediction.py, configure your own player name.

if __name__ == '__main__':
    player_name = "your player name"
    GamePredict(player_name).predict()

Finally, once you've started a RANKED game on your local machine, run

python3 Live_Game_Prediction.py

The system makes prediction every 60 seconds.

Sample Output

Once there is an active game on your local machine, you can start running the system. The system continuously makes predictions every 60 seconds while the game is in progress. For example, after a couple minutes after the game started, blue team got the first blood, and the winning probability of blue team increased to 55.97% from 48.94%. At the end, the blue team's winning probability was 24%, and indeed, the red team won.

users@MacBook-Pro LOL_Match_Prediction % python3 Live_Game_Prediction.py
Blue team win rate: 48.94%
Red team win rate: 51.06%

Blue team win rate: 55.97%
Red team win rate: 44.03%

Blue team win rate: 66.96%
Red team win rate: 33.040000000000006%

Blue team win rate: 61.260000000000005%
Red team win rate: 38.74%
.
.
.
.
.
Blue team win rate: 16.09%
Red team win rate: 83.91%

Blue team win rate: 19.63%
Red team win rate: 80.36999999999999%

Blue team win rate: 24.279999999999998%
Red team win rate: 75.72%

Files

TODO

Testing

TODO

lol_rank_game_predictor's People

Contributors

jimjimliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

swqsldz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.