Given mmr(Match Making Rating) of each players, this program generates a team that is optimal in the sense that the difference between the maximum and the minimum of sum of each team is the smallest.
The current project is known to compile with g++ 10.2.0
under Ubuntu 20.04
.
Open the terminal and clone the repository. If you don't have git installed, just download the code from the github repo.
git clone https://github.com/OFCT-Devs/team-generator.git
cd team-generator/or-tools
make test_cc
- In the directory
team-generator
, open the terminal and run the following command. This will initialize the environment.
sh init.sh
- Make a file
user.csv
under the directoryteam-generator
. This file contains number of teams, number of people in each team, and user informations.
touch user.csv
- Modify the file using
gedit
,LibreOffice Calc
, or anything else you are used to. The resultinguser.csv
should be formatted as below.
M
is the number of people in each team, andN
is the number of teams.user(n)_name
is the user's name.user(n)_mmr
denotes the user's mmr, or some kind of user's ability, which should be an integer.
M,N
user1_name,user1_mmr
user2_name,user2_mmr
...
userMN_name,userMN_mmr
- Now run
build.sh
. If you followed the above instructions correctly, you will get a new fileout.csv
, which is formatted as below.
team 1,,team 2,, ... ,,team N,,
usera1_name,usera1_mmr,userb1_name,userb1_mmr, ... ,userN1_name,userN1_mmr,
usera2_name,usera2_mmr,userb2_name,userb2_mmr, ... ,userN2_name,userN2_mmr,
...
useraM_name,useraM_mmr,userbM_name,userbM_mmr, ... ,userNM_name,userNM_mmr,
,team 1 sum,,team 2 sum,, ... ,,team N sum,
Check LICENSE
.
Also, or-tools/Makefile
is modified from the original; all occurences of c++17
is changed to c++20
.