Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teamgen-0.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

teamgen-0.0.1-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file teamgen-0.0.1.tar.gz.

File metadata

  • Download URL: teamgen-0.0.1.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

Hashes for teamgen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6bba23a0a9ee2552a4edafd6940a128a65c0bc4466c8dc50c6f90952bd71d577
MD5 a66d396590780c796319974426fd19cd
BLAKE2b-256 fb872403a3bdc826d253fe758baa9fbe4595091d798051beb8b9fdde5032183c

See more details on using hashes here.

Provenance

File details

Details for the file teamgen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: teamgen-0.0.1-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

Hashes for teamgen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9215b1fec21c5897819c60c8d4084029214fde1f65a30ad0a83f4e3e5c654325
MD5 11df9ebfce234c299d1ed868de915d30
BLAKE2b-256 d78dfeee8d97d72a2ae450dca899c32f520dea4e0f1ed0fcd289d933e9d0cc30

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page