Skip to content

OFCT-Devs/team-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

team-generator: A team maker for an optimal gameplay

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.

Prerequisites

The current project is known to compile with g++ 10.2.0 under Ubuntu 20.04.

Compile

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

Run

  1. In the directory team-generator, open the terminal and run the following command. This will initialize the environment.
sh init.sh
  1. Make a file user.csv under the directory team-generator. This file contains number of teams, number of people in each team, and user informations.
touch user.csv
  1. Modify the file using gedit, LibreOffice Calc, or anything else you are used to. The resulting user.csv should be formatted as below.
  • M is the number of people in each team, and N 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
  1. Now run build.sh. If you followed the above instructions correctly, you will get a new file out.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,

License

Check LICENSE. Also, or-tools/Makefile is modified from the original; all occurences of c++17 is changed to c++20.

About

Team generator (that might be) used in OFCT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published