Skip to content

mas-4/teamup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team Up

This script programmatically comes up with the best teams based on a yaml file of players and skill levels. It was originally developed to come up with teams for Christmas Trivia. It is adaptable to nearly anything.

Yaml format

The format of the yaml file must be a list of dictionaries:

- name: <name>
  skill: <int>
- name: <name>
  skill: <int>
- name: <name>
  skill: <int>

I have been rating based on 1-10 but the solution should work based on any skill rating system, so long as it is an integer.

Command line arguments

There are three required arguments:

-p --players    Path to the players yaml file
-k --numteams   The number of teams to process the players into
-n --teamsize   The size of each team to process the players into

Please note, the number of players must be evenly divisable by k and n. I will eventually code a robuster solution.

Output

The program creates new team assignments based on the pool of combinations generator style. Each assignment is tested for variance. Variance is defined as the difference between the maximum team aggregate skill level and the minimum team aggregate skill level. The program will output each new best case as it finds smaller levels of variance.

Notes

From my own anecdotal and thoroughly unscientific observations, it seems like there is a very high correlation between the size of the groups and the optimal team up variance. This seems obvious. But I don't know enough math to prove it. I simply recommend less, and bigger, teams.

My observation was that, on the same 20 players, I could get (with v = <variance>, and (k, n)):

  • v = 8 with (10, 2) after ten or so minutes
  • v = 5 with (5, 4)
  • v = 1 with (4, 5) quickly
  • v = 0 with (2, 10) almost immediately. In fact, the program quit, which doesn't make sense to me.

Acknowledgements

This solution is arrived at based on the following resources:

About

A Python script to sort players into best teams based on skill level

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages