Tutorial Introduction to Friar Tuck 1.0


Round Robin Tournaments

Tournaments are sport events in which a given number of teams (or individuals) carry out matches against each other according to a fixed scheme. A round robin tournament is a tournament scheme in which every team plays every other team a fixed number of times. If this number is 1, we have a single round robin, if it is 2, we have a double round robin and if it is bigger than 2, we talk about a multiple round robin. Each match is carried out at the place of one of the two teams involved in the match.

The planning of such a round robin tournament can become a time consuming task, especially if there are many additional constraints. Friar Tuck is designed to solve such a planning task. It provides graphical input facilities for many kinds of constraints and solves the resulting tasks using a technique called constraint programming.

Getting Familiar With Friar Tuck

After starting Friar Tuck, you see the main window with four small boxes on the left and a big box on the right. You can navigate through the tool by clicking on the small boxes.

To see how Friar Tuck works, go to the menu "Demos" on the top and choose one of the items. Follow the instructions in the window that will pop up.

You may want to play with your own example. For this, go to the menu "File" on top and select "New Task". Enter a "number of teams", say 5, and a "number of rounds", say 1 (each team plays each other team once; single round robin). Now, you can click on "Timetables" on the left and search for a timetable by clicking "Next" in section "Planning". You can look at the resulting timetable by clicking on "Current Show" in section "Display".

Structure

The solving process is reflected in the structure of the user interface.

First, the user specifies a task, including all the constraints that belong to the sport tournament at hand. To find a timetable, Friar Tuck needs to find patterns. Patterns are sequences of home and away (and bye for odd number of teams) flags. From the generated patterns, a pattern set is constructed. A pattern set consists of as many patterns as there are teams. Based on such a pattern set, Friar Tuck can construct a timetable.

These four phases are represented by the fields Friar Tuck displays messages related to the phases in the corresponding field. Clicking on the field opens a control panel for the corresponding phase on the right hand side of the main window. To get familar with this interface and with the problem solving process, you may want to load the demo "DRR 3" (click on "Demos" in the top menu and select "DRR 3"). Now go through the phases Patterns, Pattern Sets and Timetables, clicking on the buttons in sections "Planning" and "Display".

Specifying a Task

Specific tournament planning problems are called tasks. Tasks can be defined using a rich graphical environment, which is explained in this section. Tasks can be stored to and loaded from files using the menu "File" at the top of the main window. Finally, a few demo tasks can be loaded using the menu "Demos" at the top of the main window.

The specification of a task is explained using the ACC 98/99 example, a difficult tournament planning problem described by G. NEMHAUSER AND M. TRICK: Scheduling a major college basketball conference, Operations Research 46(1), 1998.

The control panel for task entry appears on the right after clicking on the field "Task" on the left.

General Task Properties

In the entry Task Name in section "General" you can enter the name of the task. This name is used as title for windows related to the task and is displayed on web pages for tournaments generated by Friar Tuck. Any text can be used as task name.

The Number of Teams is the most important data for planning. If this number is even, every team plays on every date of the round robin. If this number is odd, all teams except one play on every date. The team that does not play at a given date is said to have a "bye" on that date.

The Number of Rounds is the number of times that two given teams play against each other. If this number is 1, we have a single round robin; if it is 2, we have a double round robin; and if it is bigger than 2, we say it is a multiple round robin. The number of dates for the tournament is equal to the number of rounds times the number of teams if the number of teams is odd, and the number of teams minus one if the number of teams is even.

In a double round robin, each team plays each other team twice. The first match is called "first leg", the second is called "return match". You can decide whether first leg and return match should have different venue. This is useful for example to satisfy fans, because if return matches have different venue, the fans will get to see their team play at home against every other team exactly once.

Also specific to double round robins is mirroring. Mirroring allows to fix the dates in which return games occur. Perfect mirroring means that the overall plan has two mirrored halves. For example, in a perfectly mirrored double round robin with 4 teams (6 dates), the matches occurring in the first date reappear in the fourth date, the matches of the second reappear in the fifth and the matches of the third reappear in the sixth. Other mirroring schemes can be entered by clicking on "customized...". The choice "none" means that return matches are not date-wise mirrored; for two matches that happen in a given date, the corresponding return matches could be carried out at different dates.

Team names as well as date names can be edited for display in windows and web pages.

"Fixed Situations" Constraints

This facility is to fix certain matches or patterns for given teams and dates. After clicking on "edit..." under "Fixed Situations", a tournament editor appears. After clicking a specific field corresponding to a team (arranged vertically) and date (arranged horizontally), you can choose either an opponent team or a venue pattern by clicking on one of the options that are indicated in red. "Commit" allows to perform constraint propagation and displays the resulting schedule or an error message if an inconsistency is detected. Clear removes all constraints; "Cancel" cancels all changes in the current editing session and "Accept current setting" commits and returns to the main window.

The result after propagation of the "fixed situations" constraints in the ACC 98 example looks like this.

"Preferred Situations" Constraints

This facility is to define constraints that set a lower limit for the occurrence of a given number of preferred situations. Clicking "edit..." under "Preferred Situations" displays all current constraints of this kind. Clicking "New Constraint" leads to a tournament editor similar to "Fixed Situations". The constraint can be given a name for easy recognition. Situations can be entered and a lower limit for the occurrence of the situations can be specified.

For example, the constraint that three out of four given pairings must occur in the last round of the ACC 98 example is specified like this.

"Pattern Number" Constraints

This facility allows to specify constraints on the possible patterns. For example, the fact that at most two of the first five weekend dates of the ACC 98 example should be played away, can be entered as "At Most" Constraint as follows.

"Balanced Home/Away" allows to specify whether each team should have exactly as many home matches as it has away matches.

"Sequence" Constraints

This facility allows to specify constraints on sequences of situations, either of patterns or of opponent teams.

For example, this is how you can specify that there should be at most 3 away games or byes in a row.

For single round robins and perfectly mirrored double round robins, "Minimizing Breaks" allows to minimize the number of sequences of two home matches or two away matches (breaks) in a row within each round. For odd numbers of teams, such breaks can be avoided altogether, for even number of teams, the number of breaks can be reduced to the number of teams minus two per round. Minimizing breaks greatly reduces the number of pattern sets and feasible timetables, but leads to efficient computation of timetables even for a large number of teams (up to 30 teams on a PC with usual configuration).

Computing Patterns

Typically, a user would go directly to "timetables" after specifying the task. In that case pattern and pattern set generation is done automatically. However, these two phases can also be contolled manually.

After clicking on "Patterns" on the left, the control panel for pattern generation appears on the right. Patterns can be generated and displayed separately or all at once.

You should aim for a number below 100 patterns. If necessary, add pattern constraints to the task. If the number of patterns is higher than 100, it is crucial to restrict the number of patterns used by pattern set generation. This is done using the at most... entry. The patterns used for pattern set generation can be chosen randomly from the computed pattern or in the order in which they are generated (chronological). Most of the time randomly works better than chronological. Of course whenever not all patterns are used for pattern set generation, there may be feasible timetables that are not found by Friar Tuck.

In the ACC 98 example, there are 38 patterns and thus no restriction is necessary.

Computing Pattern Sets

Similar to pattern generation, pattern set generation can be controlled using the pattern set control panel by clicking on the field "Pattern Sets" on the left. Pattern sets can be generated and displayed separately or all at once.

A pattern set for ACC 98 looks like this.

Computing Timetables

The control panel for timetable generation provides a number of ways to tune the search process.

In section "Search" two parameters used by the constraint programming engine can be changed. Play with these parameters if nothing else helps for finding timetables within reasonable time.

If there are no team specific constraints, every team can be treated equally by the search. The switch "schemes only" will generate much fewer timetables (usually also much faster), each of which stands for all possible permutations of teams.

If the number of teams is even, a special restriction can be added that will result in much faster search. Unfortunately, this restriction may not be able to find some timetables which are feasible according to the task description.

In the "Planning" section, two different constraint-based methods can be chosen. Cain's method assigns teams to patterns in the given pattern set first, before the matches are decides, whereas Schreuder's method computes so-called placeholder timetables each row of which is then assigned to a team. Usually Cain's method performs better. However, occasionally Schreuder's method is faster.

The resulting timetables can be displayed like this.

Using the button "Save as web page", a timetable can be saved in HTML format which can be displayed using your favorite web browser like this. Use your web browser for printing and communicating timetables.

Configuration

It is useful to be able to break the solutions in HTML format into several pieces for easy printing. You can specify the maximal number of columns in the HTML tables by clicking on the menu "Configure" on the top of the main window and select "Preferences". Then specify the maximal number of columns using the slider.

If you use Friar Tuck to solve large or difficult tournament planning problems, you may notice that your computer becomes slow because Friar Tuck consumes too much of the main memory of your computer. You can use the Oz Panel to set up memory consumption of Friar Tuck. For this, click on the menu "Configure" on the top of the main window and select "Panel". In this panel, you can monitor the memory consumption and - if necessary - reduce the maximal size of the memory used by Friar Tuck to less than half of the main memory available on your computer.


Martin Henz