Seating Wizard
Overview
The seating wizard seats players at poker tables. The method of seating is primarily random, but it also attempts to take specific preferences into account.
The seating wizard is called from the tournament roster panel and the tournament seating panel. It is also called from the elimination wizard if the tournament is set for "auto-consolidation".
Seating Process
The seating wizard is given a set of players to seat. In general, it will seat players randomly and leave the tables as balanced as possible. It will also take the "Clock Operator" and "Expert" attributes of players and the "Clock" attributes of poker tables into account, if deemed necessary.
Seating happens according to the following algorithm.
- Preparation for seating:
- Preparation step 1: Grab the list of active tables
- Preparation step 2: Grab the list of unseated players that are to be seated
- Preparation step 3: Determine whether or not the wizard
should attempt to seat clock operators. The wizard will give first
seating preference to a clock operator if all of the following are
true:
- At least one player (of the players we are attempting to
seat) is identified as a clock operator
- At least one table (of the currently active tables) is
identified as a clock table
- No clock operator is yet seated at any of the active tables
identified as a "clock table"
- Preparation step 4: Determine whether or not the wizard
should attempt to seat game experts. The wizard will give first
seating preference to seat game experts if all of the following are
true:
- At least one player (of the players we are attempting to
seat) is identified as a game expert
- At least one table (of the currently active tables) does not
have a game expert seated
- Seating process: Iterate through
the following loop until there are no more players to seat:
- Step 1: Sort all active tables by occupied seat count
in ascending order.
- Step 2: Of the tables with the lowest number of occupied seats, select one randomly. This becomes the "target table".
- Step 3: Attempt to seat a random player at the target table
- 3a: If we still need to seat a clock operator and the target table is a clock table:
- Grab a random unseated clock operator and seat them at the first available unlocked seat at this table
- Denote that we no longer need to seat a clock operator for the rest of this algorithm
- Jump back to the beginning of the loop.
- 3b: If it was determined that we need to seat experts and the target table doesn't have an expert seated:
- Grab a random unseated game expert and seat them at a random unlocked seat at this table
- Denote that the table now has an expert
- Jump back to the beginning of the loop.
- 3c: If we still haven't seated someone in this iteration:
- Seat a random player in a random unlocked seat at this table
- Note: If we still need to seat clock operators, we don't pick a clock operator for this seat (unless we have to)
- Note: If we still need to seat game experts, we don't pick a game expert for this seat (unless we have to)
- Step 4: Update the seating chart
See also