Try inputting 10 League of Legends summoner names in, separated by commas. If you are not familiar with League of Legends, here is a sample input you can do:
mimai, nanawo, zestbed, purehoney, bosnia, chasoll, vilhatarn, lower slower, jagasaki, rodagra1
These are the teams that my algorithm divides these players into (blue and red). It tries to create a balanced match so that both teams have an equal chance of winning.
React Webapp that divides summoners into even teams, deployed with AWS Amplify & Heroku. Frontend using Material-UI. Backend using Node, Express, MongoDB/Mongoose. Calls Riot-API. Uses Redux to keep states for players.
This repository serves as the backend for the project. You can find the frontend repo here: https://github.com/tianhaoyao/teamO-frontend
The backend is currently being hosted here: https://team-sort.herokuapp.com/
Try the app out here: https://teem0.herokuapp.com/
If the above link does not work: https://main.d2ppo6en99m27e.amplifyapp.com/
- Grabs a variety of stats using Riot API to calculate a score for each player (see below)
- Sorts players via that score and preferred roles
- Player is cached into database to ease load on API
Player Score = rank + (lp * multiplier) + bonus
Rank | Base Score | LP Multiplier |
---|---|---|
Iron I | 650 | 1 |
... | ||
Gold I | 2200 | 1.5 |
... | ||
Platinum I | 2850 | 1.5 |
... | ||
Diamond I | 3600 | 1.7 |
Master+ | 3900 | lp^1.07 |
Bonus = csBonus + kdaBonus + kpBonus + goldBonus + dmgBonus
Note: bonuses might be negative if stat is below threshold
The more CS/minute you have, the higher score this awards. Junglers and Support unaffected.
The higher KDA, the higher score. More applicable for Jungle and Support.
Compares your Kill Participation score to your team. The higher KP compared to your team yields a better score. Junglers and Support are affected more, Top lane is affected less.
Compares your gold earned relative to your team. The higher share the higher score. Support unaffected.
Compares your damage done to enemy team relative to your team. The higher share the higher score. Jungler affected less, and Support even less.
Models constraint satisfaction problems (CSP).
- Place the 2 best players of each role in their preferred role and insert them on different teams
- Remaining players are fillers, and are sorted based on skill level
- Fillers are given a random open position (prioritizing the current score of both teams, whichever is less)
- From top lane downwards, the players are swapped between the two teams. If the score difference decreases, the players remain in their new teams. Otherwise, keep the original arrangement.
- MongoDB cache to ease API usage
Tesseract OCR implementation- it has been tested that Tesseract cannot read the design of League client properly, scrapping this idea until another OCR service can- Expand this project onto other games (e.g. Soccer)
$ git clone https://github.com/tianhaoyao/teamO.git
$ cd teamO
$ yarn install
$ yarn start
RiotGames API key required in .env file: REACT_APP_TEAMO_API_KEY= MongoDB Access also required: MONGO_USER= MONGO_USER_PASSWORD=