Skip to content

dasuppan/fair-teams-matcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fair Teams Matcher

A small program for matching teams based on players skill. The problem of partitioning players into k teams while keeping the skill evenly distributed is a NP-complete problem and is also known as the Partition problem. This program implements the Karmarkar-Karp algorithm which utilizes the Largest differencing method and approximates good results. A nice read that helped me understand it was this PDF. The teams are partly-randomized if some players have an equal skill score otherwise this algorithm does not do any randomization. This application was initially made for Minecraft Hungergames but can be used for any team-based game/sport/etc.

Usage

  1. Create a file which contains players, one player for one line, in the format of NAME,SKILLLEVEL as seen in the file res/players.csv. It does not necessarily need to be a .csv although I found it to be easy to work with.

  2. Compile the Kotlin-File Main.kt and run it with two arguments, namely

  • the file path of the created .csv-file and
  • the number of teams you want to generate.
  1. Have fun!

About

A small program for matching teams based on players skill

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages