The Algorithm allocating the Seats
Here's the algorithm that allocates the seats you wished during the wishing phase trying convert your wishes into real bookings.
Basic rules
During the design of this algorithm these things were important for us:
- Simple: If a guest does not delve into the options offered but simply books some events, they should not be disadvantaged in terms of their chances of securing event spots.
- Priority: It should be possible for a guest to book a potentially high-demand event along with a simultaneous alternative (as a backup) and indicate which of the two conflicting events is their preferred choice – ensuring that this preference is taken into account.
- Fair: The system should strive for fairness so that a guest with five bookings is not left with almost nothing while another guest with two dozen bookings gets all the spots.
- Balancing bad luck: If necessary, spots for overbooked events will be allocated by lottery. Those who were unlucky during a seat allocation will be given priority in the next draw over those who have been lucky before.
- Mensans over non-Mensans: In the lottery for overbooked events, Mensans will have a slight advantage over non-Mensans.
- Group bookings: A block of spots in the lottery due to a group booking will be treated as a single person, except that multiple tickets are allocated. This means neither an advantage nor a disadvantage arises. Other aspects will also always apply to the person making the booking for the group: an M will have slight advantages, and potential conflicts will only be considered for the person making the booking.
Processing Overbooked Events
The allocation of spots takes place in three rounds, as guests can prioritise their bookings with high (two stars), medium (one star), or "why not" (no star). The process starts with high-priority (**) bookings in the first round, followed by two more rounds for the other two priority levels.
Overbooked events are sorted based on the degree of overbooking (number of bookings divided by number of available spots), with the least overbooked events being processed first. This order ensures that guests who have booked only a few but highly sought-after events have a lower risk of missing out entirely.
- Loop through booking priorities: round 1: high priority (two stars), round 2: medium (one star), and round 3: low priority (no star).
- Loop through the overbooked events, processing them in ascending order of overbooking degree.
- A list is created of guests who have marked the event with the current priority.
- Guests who have booked a non-overbooked conflicting event with a higher priority are excluded as per their preference.
- A "score" is generated for these guests based on the following factors:
- The number of event spots the guest has already secured (those who have received fewer spots so far – thus including those who were unlucky in a previous round – have better chances).
- Whether the guest is an Mensan (Mensans have a higher chance of getting spots than non-Mensans).
- The priority of the booking (not relevant for overbooked events, as they are processed by priority groups, but relevant for non-overbooked events processed afterwards).
- A random number (as a last resort, if all else fails, luck plays a role).
- The available spots for the event are then allocated to the guests in order of the above score. This means guests who have received fewer spots so far have a higher chance, and Mensans are prioritised over non-Mensans. For bookings of equal standing, allocation is decided randomly as a necessity.
A spot is only assigned if the booking is valid – meaning no scheduling conflicts (no guest can have two events at the same time or duplicate bookings for the same event). Additionally, it is checked whether the chosen options are still available and whether the guest meets any necessary requirements (e.g., minimum age).
- End of event loop
- End of priority loop
Processing Non-Overbooked Events
In a second step the non-overbooked events are processed.
The procedure is similar to the one above but has only one loop since no event is overbooked. Since the priority is contained in the score the guests will get their preferred ones in case of collisions.
What the Algorithm Does
Admittedly, the algorithm may seem a little confusing at first, but our goal is to provide a clear representation of how it is technically implemented.
Since the above explanation may not be immediately intuitive for everyone, here is how the algorithm works in terms of its
effect:
Loop through booking priorities: round 1: high priority (two stars) , round 2: medium priority (one star) and round 3: low priority (no star)
Within each priority round, the algorithm proceeds as follows:
- Loop through all events, processing overbooked events first, in ascending order of overbooking degree, followed by non-overbooked events.
At this stage, we have established the priority level from the main loop (starting with the highest) and the specific event for which spots are now being allocated.
- For guests who have marked the current event with the current priority, a "score" is calculated based on the following factors:
- The number of event spots the guest has already secured (those who have received fewer spots so far – including those who were unlucky in a previous round – have better chances).
- Whether the guest is an M (Mensans have a higher chance of getting spots than non-Mensans).
- A random number (as a last resort, if all else fails, luck plays a role).
- The available spots for the event are then allocated to guests in order of the above score. This means guests who have received fewer spots so far have a higher chance, and Mensans are prioritised over non-Mensans. If bookings are of equal standing, allocation is decided randomly as a necessity.
A spot is only assigned if the booking is valid – meaning no scheduling conflicts (no guest can have two events at the same time or duplicate bookings for the same event). Additionally, it is checked whether the chosen options are still available and whether the guest meets any necessary requirements (e.g., minimum age).
- End of loop through all events.
End of loop through the three booking priority levels.
Navigation
The Booking System (Main page)
The Time for Wishes – Booking after Seat Allocation
Group booking – Single booking only
Amend Booking – Cancellations
Priorities – Waiting List – Representation
Options – Children's prices
Common Errors – Frequently asked Questions (and Answers)
The Algorithm allocating the Seats – Contact