A basic, random team generator for tennis groups
Project description
Tennis Team Generator
This is a pretty basic generator that takes a list of players, and generates teams that try and make for a fairly even distribution of player skills on both sides of the net. It aims for the best groups.
Each player is described in a a json file, and their rating includes their USTA rating, as well as a "Micro NTRP", that is an assessment, in 0.1 or 0.01 increments of that actual level of play, to be more precise than the NTRP. Someone has to make a judgement there of course, usually the group captain.
The project uses a sequence of 'random' selections, and then trows out those that fail some criteria.
To be frank, the algorithm isn't that great, but until I can figure out how to make a better one, this one does the trick for me. It often requires that I run it several times, and I need to manually review the results. Lots of room for improvement!!
Number of Courts
The number of courts is configurable, so anywhere from 2-4 courts works.
Number of players
You need enough players to keep the courts even, so 16 for 4 courts, etc. This does not handle singles.
Distribution of Men and Women.
Generally, we want even numbers of men and women, but the algorithm does compensate if there are uneven counts. For example, if there are 4 courts, and we have 10men and 6 women, we can do 3 courts of mixed doubles, and one court of men's singles each round. The same applies if we have 10women and 6 men -- one court of women's singles per round.
Quality Metics
I have some quality metrics that "weight" the requirement of how close the players are that play together,
I.E. Can a 4.5 play with a 3.0? That is a spread of 1.5 on one side of the court
Also, the weight of the combined rating of players across the net
If a 4.5 and 4.0 are on one side, and a 3.5 and 4.0 on the other, that is 8.5 versus 7.5, for a spread of 1.0
Maximum spread
We can limit the maximum spread on each court side so that we avoid a 4.5 playing with a 3.0, for example.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file teamgen-0.0.2.tar.gz
.
File metadata
- Download URL: teamgen-0.0.2.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a3c7eff90bbeaf6a24533f5efe425042007878d0ff47fa9697ef17f685d3580 |
|
MD5 | 5aba275bcd28c38b005487ded0ba8802 |
|
BLAKE2b-256 | 7f749082fcc136083cd082d8d054a2cceed235e9c7280c20d8a5c820b88efb1e |
File details
Details for the file teamgen-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: teamgen-0.0.2-py3-none-any.whl
- Upload date:
- Size: 56.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55852cfbdb56b24c41966af23aacc78aaf8cb9a5d88805df53597f831a3942d3 |
|
MD5 | cb3bf13d661a04cff4198318da79e18f |
|
BLAKE2b-256 | e849c561ffc0f056d44a6319d20338bb4de58cb367d90a9ae3b9f065b035c686 |