Tennis Tournament Generator (ttg)

ttg (Tennis Tournament Generator), what does it do?

Ttg tries to create a schedule for a tennis tournament, for example this one:

  • Number of players: 24
  • Number of games for each player: 3
  • Number of tennis courts: 6
  • Type of game: double

The tournament should have the following properties:

  • Players are redistributed in each round
  • Two players should meet each other at most once
  • Male/female distribution is as even as possible in each game
  • In each game, the strength on both sides of the net is as even as possible


Ttg is implemented using javascript and jquery and runs in a browser because:

  • Buttons, css, printing and so an are available without much programming effort
  • The computations take place in the browser, the web server is totally unaware of what is going on
  • There are no security problems, it is even possible to run ttg without an internet connection

For input and output of data, the csv (Comma Separated Values) format is used, which allows pre- and post processing using a spreadsheet program like excel.

The schedule is computed using a simple genetic algorithm with crossing and mutation. A comprehensive description of genetic algorithms is available on Wikipedia.

State of the program

It should be noted that at this moment the program is in a very pristine state. A sneak preview is here


It is the intention to make the program multi-lingual. At this moment the program speaks Dutch, English and German. There is some support for Spanish, French and Finnish.