Code Monkey home page Code Monkey logo

dota2-probattle's Introduction

Hi there 👋

🔭 I'm currently working on Flink.

Zhanghao Chen's GitHub Stats

dota2-probattle's People

Contributors

tl021 avatar x-czh avatar zjzijielu avatar

Watchers

 avatar  avatar

dota2-probattle's Issues

Implement CRUD

The goal for this week is to implement CRUD for Matches and provide some query searches for the initial demo.

Insert

User should be able to insert a match into the DB.

1. Add by Match ID

User input: match_id (64 bit int)

Backend route: '/addMatchByMatchID', methods=['POST']

Backend return: a msg string

2. Add by Account ID

Insert recent matches of a player. It may take a while.

User input: account_id (64 bit int)

Backend route: '/addMatchByAccountID', methods=['POST']

Backend return: a msg string

Update

User input: a tuple (match_id, start_time); match_id is a 64 bit int, start_time should be a date

Backend route: '/updateMatch', methods=['POST']

Backend return: a msg string

Delete

User should be able to delete a match from the DB.

User input: match_id (64 bit int)

Backend route: '/deleteMatch', methods=['POST']

Backend return: a msg string

Query

Search Match

1. Search by Match ID

User input: match_id (64 bit int)

Backend route: '/searchMatchByMatchID', methods=['POST']

Backend return: a dict: {'match_id: <match_id>, 'date': }

2. Search by Account ID

User input: account_id (64 bit int)

Backend route: '/searchMatchByAccountID', methods=['POST']

Backend return: a list of matches [{'match_id: <match_id>, 'date': }, ...]

Opponents’ most commonly used heroes

ProBattle scrapes the recent battle histories of the opponents and suggest which heroes to ban during pick/ban phase based on the query results.

User input: account_id

Backend route: '/debuffOpponentHero', methods=['POST']

Backend return: a list of tuples (hero_name, num_matches, win_rate) ordered by num_matches then win_rate

Recommendation of items

From the most recent battle histories of specific hero, ProBattle recommends items with the highest win-rate against the opponents’ team.

User input: hero_name, 5 opponent hero_name

Send to backend: a list of six hero name (the first one is your own hero name)

Backend route: '/debuffOpponentItem', methods=['POST']

Backend return: a list of item_name ordered by weighted win rate

Implement Advanced Functions

To be finished by 11/25.

AF1-Winning Chance Prediction

Our application can predict the winning chance against the opponents’ lineup using machine learning algorithms. More concretely, each hero can be mapped to a vector in a vector space using word2vec, the lineup of a team can thereby be represented with a composition of hero vectors. We can then train a machine learning model on history match data, which takes the representation vectors of the two lineups in the match as input and output the relative win percentage.

Input to backend: ten hero ids (first 5 called radiant_hero{i}, where {i} refers to number 1..5, last 5 called dire_hero{i}, where {i} refers to number 1..5)

Backend route: '/winPredict', methods=['POST']

Backend return: a single floating number of win_rate

ML model is pretrained using Kaggle dataset. The backend uses the saved model for instant inference.

AF2-Recommendation of Hero Counters (Augmentation with NoSQL)

Counter picks of opponents’ heroes can be conveniently stored in a graph DB, where the nodes are heroes, and the edges represent the relative win percentage between the two heroes. We can precompute the relative win percentage between each pair of heroes, and cache the results in a graph DB to accelerate the query time. The content in the graph DB can be updated periodically with recent match data.

Input to backend: one single hero id

Backend route: '/counterPickHero', methods=['POST']

Backend return: An example: [["Witch Doctor", 0.75], ["Jakiro", 0.6666666666666666], ["Drow Ranger", 0.6666666666666666], ["Shadow Shaman", 0.6666666666666666], ["Lina", 0.6]]. If there's no data, will return [0].

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.