Page 1 of 1

Schedule creation utility

Posted: Wed Jun 19, 2002 10:57 am
by christer
Heh.. I can't find the thread I promised to make this available.. :oops:

Anyway, Here's a link to my small schedule creation utility. It's nowhere near finished or anything.. Mostly just a small hack...

http://trollcave.no-ip.org/Schedule.zip

This is Java, so you need a java runtime environment (JRE or JDK)..
Also, I included the sourcecode if anyone's interested in how I did it.

Some notes about the program:

* All references to graphs, colours, edges and vertices come from the fact that the scheduling problem is equivalent to a well-known class of problems which can be derived from "graph colouring". For you who don't care about math: Graph = Schedule, Colour = Round, Edge = Match and Vertex = Team

* This program uses an iterative algorithm (iterated greedy graph colouring), which means that it can take quite a while to generate some schedules. On my system (athlon 500MHz), it normally takes less than 10 seconds to generate a 16-team schedule. 17 teams should be possible within a reasonable amount of time. 18 or more will probably take quite a bit of time. One thing to remember though. There is a random element to the algorithm so if you're lucky, you could generate a 30 team schedule instantly (No, don't try.. It's very unlikely)

* You run the program by typing "java Schedule 12", where the 12 is the number of teams you have. You exit the program by pressing ctrl-c in the console window. I haven't bothered to add the three-line quit code into the program. Remember, this is a hack.. :)

* When you run it, you'll get a window with lots and lots of checkboxes. Basically, this is a table of which matches you want to schedule, with the teams being on both the x and the y axis. You check the boxes you want to prevent from being scheduled. When you're done selecting you press the "Create" button.

* The output will be displayed in the console window, looking something like this:

Colour 1:
1 - 2
3 - 4

Colour 2:
1 - 3
2 - 4

Colour 3:
1 - 4
2 - 3

Again, replace colour with round, and you'll have a table of matches to be played for every round.

* There is no way to "stop" searching and display the current "best" solution. The program will continue to run until it finds an optimal (or what the program considers optimal. Read the source if you're interested) solution.

Questions, comments, ideas.. feel free to vent. I can't guarantee I'll modify the program though.. But if enough people think it would be useful, I might consider polishing it a bit...

-- Christer

hi!

Posted: Wed Jun 19, 2002 5:19 pm
by neoliminal
Will it do swiss format?

Posted: Wed Jun 19, 2002 5:27 pm
by christer
I have no idea.. What's that? A schedule with holes in it?

Sorry.. Couldn't resist.. And I honestly don't know what swiss format is..

-- Christer

Posted: Wed Jun 19, 2002 7:00 pm
by longfang
I'm sure an explanation will be along shortly!

Posted: Wed Jun 19, 2002 7:10 pm
by Deathwing
Ladder system, where the teams pair off from the top for the following round. So winners play winners, losers play losers etc. All you need is the ranking system!

Posted: Wed Jun 19, 2002 7:13 pm
by longfang
Told you :roll:

Posted: Wed Jun 19, 2002 7:22 pm
by christer
Ok.. This utility will not make swiss format scheduling.

You can use this utility for predetermined schedules. What it does is to schedule matches in as few rounds as possible while allowing only one game per team and round.

-- Christer

Posted: Thu Jun 20, 2002 2:02 pm
by Anthony_TBBF
If you can get it to do Swiss format scheduling that would rock. Doing it by hand at the Orion tournament was a pain in the a**. In fact, a good tournament manager would be amazing. *hint* ;)

Posted: Thu Jun 20, 2002 2:47 pm
by christer
I will not make this tool do swiss-format scheduling. This tool is more a "proof of concept" app, and has no knowledge of ratings, teams, standings or anything.

Now, suppose I were to create a tournament manager.. What kind of features would you want?

-- Christer

Posted: Thu Jun 20, 2002 8:56 pm
by christer
Created a new thread for league manager issues.

http://www.talkbloodbowl.com/phpBB2/vie ... hp?p=13569

-- Christer

Posted: Thu Jun 20, 2002 9:36 pm
by Anthony_TBBF
Hmm for tournament management, my wish list would be:

- automatic pairings based on format (Swiss, round robin etc.)
- calculation of rankings from round to round
- summary of different stats (most TDs etc)

That's off the top of my head.