Bracket

A bracket refers to a competitive method in which the outcome of a match determines where the participants go next. Winners will continue while losers are progressively eliminated. Matches are therefore connected between them and are often represented as a tree leading to a final match to determine the winner.

A bracket is mainly composed of matches and links. Links are connected between two matches and have a direction that determine how participants move from one match to another. A match can have multiple links, either because both winner and loser are moved somewhere else, either because it is a ffa match with more than two participants that qualify in another match.

Data structure

A bracket is technically a directed acyclic graph. The nodes are actually matches and the links represent the connections between matches.

Since links are established for the purpose of moving competitors from one match to another, they follow particular rules. They move a participant from a match, found in a match opponent, based on the match outcome. They move the participant to another match, and more specifically another match opponent (acting like a slot in the match).

Therefore, the node can be represented directly as a match and the link can be represented directly in a match opponent. Both data structures are called bracket node and bracket link.

A bracket node is simply a match with extra information. It shares all the data of the match, even the match id, and adds new data such as depth and branch.

Depth

The depth of a bracket node represents the depth of a tree traversal. A bracket can usually be traversed as a tree, even when it is a graph, when it only traverses specifics links. The depth property can be used to quickly display a bracket. But another tree traversal can be performed to calculate another depth using other calculations.

Branch

The branch of a bracket node represents part of the bracket that matches a specific competition group. For example, when in a double elimination bracket, there are three distinct sub-brackets: winners' bracket, losers' bracket and grand final.

A bracket link is simply a match opponent with extra information. It shares all the data of a match opponent and adds extra data that identifies where that opponent comes from and why.

A bracket link represents the connection between two matches in order to describe how a participant will move from one match to another. The link therefore has a direction with a source and a target. The source represents a match and a specific outcome. The target represents an opponent in a match. Since the target is a match opponent, the link data is provided in the target and describes the source. The extra data therefore provides source data such as node id, type and position.

Source node id

The source node id contains the id of the node, and thus the match, to which that match opponent is connected to. Each opponent can only have a single source node id because it can only come from a single match. A match opponent can not have two different sources.

Source type

The source type determines the reason why an opponent arrives in this match. It defines whether it is a victory or a defeat that leads the opponent here. If no source type is defined, it implies that the opponent does not come from a match. It then probably comes from the stage placement and can be considered as an entry point where competitors arrive in the bracket.

Source position

The source node position is mainly used in ffa brackets when the source type is not sufficient. Since a ffa match can have more than two opponents, it is not possible to identify winners or losers as simply as in a duel match. It is necessary to specify winning ranks and not simply a winner. However, since a rank can be tied in a ranking, it is not enough to identify precisely a single participant. It is therefore necessary to use the position rather than the rank to ensure that only one opponent can arrive in that slot.