You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered an issue during Swiss tournaments where any rounds played after a clear winner is determined will sometimes replay matches, even when it is possible to assign matches in that round so that no one replays.
My most recent example of this is from this tournament: https://sendou.ink/to/891/brackets Seed 1 and Seed 7 play in both Round 2 and Round 4, even though in Round 4 Seed 1 vs Seed 3 and Seed 7 vs Seed 5 was possible and wouldn't have involved replays.
I think I have worked out where the issue is in the code. I refer to the swiss bracket code found at this path: app/features/tournament-bracket/core/Swiss.ts
With these post-winner rounds, the matchmaking function, matchesByNotPlayedBefore, is sometimes used depending on the results of each round. The function grabs all the previous matches and then grabs all the possible match pairings for the current round, using the function makeRounds, and finds the first set of pairings that won't replay any of those previous matches, if possible. However, I don't think makeRounds actually creates all the possible sets of pairings, just some of them.
The function makeRounds is from https://stackoverflow.com/a/75330079_ (thank you for including the link as a comment btw). There you can see that for six participants it generates these possible sets of pairings:
[
[ [ 5, 0 ], [ 1, 4 ], [ 2, 3 ] ],
[ [ 5, 1 ], [ 2, 0 ], [ 3, 4 ] ],
[ [ 5, 2 ], [ 3, 1 ], [ 4, 0 ] ],
[ [ 5, 3 ], [ 4, 2 ], [ 0, 1 ] ],
[ [ 5, 4 ], [ 0, 3 ], [ 1, 2 ] ]
]
However, it misses a lot of possible sets of pairings such as [ [ 5, 0 ], [ 1, 2 ], [ 3, 4 ] ] or [ [ 5, 1 ] , [ 2, 3 ], [ 4, 0 ] ]. Sometimes this limited generation will cause matchesByNotPlayedBefore to return null when it shouldn't and then allow the system to generate matches with replays.
The text was updated successfully, but these errors were encountered:
I have encountered an issue during Swiss tournaments where any rounds played after a clear winner is determined will sometimes replay matches, even when it is possible to assign matches in that round so that no one replays.
My most recent example of this is from this tournament: https://sendou.ink/to/891/brackets
Seed 1 and Seed 7 play in both Round 2 and Round 4, even though in Round 4 Seed 1 vs Seed 3 and Seed 7 vs Seed 5 was possible and wouldn't have involved replays.
I think I have worked out where the issue is in the code. I refer to the swiss bracket code found at this path: app/features/tournament-bracket/core/Swiss.ts
With these post-winner rounds, the matchmaking function, matchesByNotPlayedBefore, is sometimes used depending on the results of each round. The function grabs all the previous matches and then grabs all the possible match pairings for the current round, using the function makeRounds, and finds the first set of pairings that won't replay any of those previous matches, if possible. However, I don't think makeRounds actually creates all the possible sets of pairings, just some of them.
The function makeRounds is from https://stackoverflow.com/a/75330079_ (thank you for including the link as a comment btw). There you can see that for six participants it generates these possible sets of pairings:
[
[ [ 5, 0 ], [ 1, 4 ], [ 2, 3 ] ],
[ [ 5, 1 ], [ 2, 0 ], [ 3, 4 ] ],
[ [ 5, 2 ], [ 3, 1 ], [ 4, 0 ] ],
[ [ 5, 3 ], [ 4, 2 ], [ 0, 1 ] ],
[ [ 5, 4 ], [ 0, 3 ], [ 1, 2 ] ]
]
However, it misses a lot of possible sets of pairings such as [ [ 5, 0 ], [ 1, 2 ], [ 3, 4 ] ] or [ [ 5, 1 ] , [ 2, 3 ], [ 4, 0 ] ]. Sometimes this limited generation will cause matchesByNotPlayedBefore to return null when it shouldn't and then allow the system to generate matches with replays.
The text was updated successfully, but these errors were encountered: