Tie Break Server


Tie break server

The goal for the project is to make a Tie Break Server (TBS) that can be a reference for Tie Break calculation.

Main features:


Resource center

Some of the Tie-breaks are quite difficult to grasp, and some this recource center may be used to explain the Tie-breaks

Example: Direct encouter for Round Robin:
Alex    6.5   10 w 1   2 w =   3 b =   4 w =   5 b 1   6 w 1   7 b =   8 w +   9 b =
Beth    6.5    9 w =   1 b =  10 w 1   3 w =   4 b 0   5 w 1   6 b 1   7 w 1   8 b +
Carl    4.0    8 w 0   9 b =   1 w =   2 b =  10 w =   4 w 1   5 b 0   6 w 1   7 b -
Dave    4.0    7 w 0   8 b 1   9 w 0   1 b =   2 w 1   3 b 0  10 w =   5 w 1   6 b 0
Elsa    4.0    6 w 1   7 b 1   8 w 0   9 b =   1 w 0   2 b 0   3 w 1   4 b 0  10 w =
Fred    3.5    5 b 0  10 b =   7 w 1   8 b 1   9 w 0   1 b 0   2 w 0   3 b 0   4 w 1
Gina    4.0    4 b 1   5 w 0   6 b 0  10 b 0   8 w =   9 b 1   1 w =   2 b 0   3 w +
Hans    4.0    3 b 1   4 w 0   5 b 1   6 w 0   7 b =  10 b 1   9 w =   1 b -   2 w -
Ivan    4.5    2 b =   3 w =   4 b 1   5 w =   6 b 1   7 w 0   8 b =  10 b 0   1 w =
John    4.0    1 b 0   6 w =   2 b 0   7 w 1   3 b =   8 w 0   4 b =   9 w 1   5 b =

Hans has two forfeited games. Dave has forfeited games. In round robin they are treated as regular games.
15.2 In tournaments with pre-determined pairings, forfeited games (the only possible unplayed rounds) are treated as regular games.

Two players have 6.5p, Alex and Beth. They played a draw against each other and DE will not not separate them.

Six players have 4.0p, Carl, Dave, Elsa, Gina, Hans and John.

6.2 If all the tied participants have met each other, the separate standings determine all rankings among them, except for any further ties among any subset of them, for which Article 6 shall be reapplied until no further ties can be resolved.
      C  D  E  G  H  J  Pts  Rank
Carl  -  1  0  0  0  =  1.5  6
Dave  0  -  1  0  1  =  2.5  ?
Elsa  1  0  -  1  0  =  2.5  ?
Gina  1  1  0  -  =  0  2.5  ?
Hans  1  0  1  =  -  1  3.5  1
John  =  =  =  1  0  -  2.5  ?

Reapply:
      D  E  G  J  Pts  Rank
Dave  -  1  0  =  1.5  ?
Elsa  0  -  1  =  1.5  ?
Gina  1  0  -  0  1.0  4
John  =  =  1  -  2.0  1

Apply for the third time:
      D  E  Pts  Rank
Dave  -  1  1.0  1
Elsa  0  -  0.0  2

Direct Encouter result, round robin
               DE
Alex    6.5    0
Beth    6.5    0 
Ivan    4.5    0 
Hans    4.0    1
John    4.0    2
Dave    4.0    3
Elsa    4.0    4
Gina    4.0    5
Carl    4.0    6 
Fred    3.5    0

What if this was a Swiss tournament

Alex and Beth is still tied, no change

Six players have 4.0p, Carl, Dave, Elsa, Gina, Hans and John.

6.3 In Swiss tournaments, if the tied participants have not played all the games against each other, but one of them will be alone at the top of the separate standings whatever the outcome of the missing games, that participant is ranked first among the tied participants – the same applies to the second rank when the first is assigned this way; and so on.
      C  D  E  G  H  J  Min  Max  Rank
Carl  -  1  0  -  0  =  1.5  2.5  ?
Dave  0  -  1  0  1  =  2.5  2.5  ?
Elsa  1  0  -  1  0  =  2.5  2.5  ?
Gina  +  1  0  -  =  0  1.5  2.5  ?
Hans  1  0  1  =  -  1  3.5  3.5  1
John  =  =  =  1  0  -  2.5  2.5  ?

Hans is alone on the top of the separate standings whatever the outcome of the missing games.

      C  D  E  G  J  Min  Max  Rank
Carl  -  1  0  -  =  1.5  2.5  ?
Dave  0  -  1  0  =  1.5  1.5  ?
Elsa  1  0  -  1  =  2.5  2.5  ?
Gina  +  1  0  -  0  1.0  2.0  ?
John  =  =  =  1  -  2.5  2.5  ?


No player is alone on the top of the separate standings. Stop!

Direct Encouter result, swiss

               DE
Alex    6.5    0
Beth    6.5    0 
Ivan    4.5    0 
Hans    4.0    1
Carl    4.0    2
Dave    4.0    2
Elsa    4.0    2
Gina    4.0    2
John    4.0    2 
Fred    3.5    0


Server code - git

Install software Command line

tiebreakchecker.py [ options ]

Tie break specification

A Tie-break is described with:

TB :pp #Mn -opt

Tie-breaks
--- Individual and team tie-breaks ---
PTS - points
DE - direct encounter
WIN - Number of wins
WON - Number of games won
BPG - Number of games played with black
BWG - Number of games won with black
GE - Games one elected to play
PS - Progressive Score
PS!50 - Prigressive score with limit 50
BH - Buchholz
BH!C1 - Buchholz cut 1
FB - Fore Buchholz
SB - Sonneborn Berger
KS - Koya system
AOB - Average of opponents Buchholz
TPR - Tournament performance rating
PTP - Perfect tournament performance
APRO - Average of opponents TRP
APPO - Average of opponents PTP
--- Team tie-breaks ---
MPTS - match points (same as PTS:MP)
GPTS - match points (same as PTS:GP)
MPvGP - Match point cs Game Points
BC - Board Count
TBR - Top Board Results
BBE - Bottom Board Elimination
ESB - Extended Sonneborn Berger for Teams
EDE - Extended Direct Encounter for Teams
SSSC - Scores and Schedule Strength Combination (SSSC)
--- Other ---
SNO - Start number
RND - Random

Point system for team competitions
The first occurrence of the PST, GPST or MPST determines the primary score
:MP - Match points
:GP - Game points
:MM - (ESB) Total MP opponent × MP scored.
:MG - (ESB) Total MP opponent × GP scored.
:GM - (ESB) Total GP opponent × MP scored.
:GG - (ESB) Total GP opponent × GP scored.
:MG - (DE) Apply the Direct Encounter, first using the MP, then, if using GP.
:GM - (DE) Apply the Direct Encounter, first using the gP, then, if using MP.

Modifiers
!Cn - Cut n (!C1, !C2, ..)
!Mn - Median n (!M1)
!Ln - Limit n (!L50)

Options
-P - forfeited games, either wins or losses, are considered as played games against the scheduled opponent
-U - all unplayed rounds are considered as Draws - against themself (DAT) to compute the participant's TB
-V - the article 14.6 is ignored, i.e., the least significant value is cut, regardless of the surroundings
-S - Force Direct encounter to treat tournament as a Swiss tournament


TBS - Tie Break Server

The server is a HTTP/1.0 protocol that sends parameter with POST, and reads response
The input parameters are x-www-form-urlencoded and the tournament data base64-encoded

Filename
Tournament data-file
Rank-order list
... additional parameters ...
Request
  ⇒  
HTTP/POST
TBS-server
Parse input
.. compute ..
Ouput JSON
True/False
Response
  ⇒  
200 OK
JSON
{
"code": 0,
"error": [],
"check": true
}



Demo Server

A simple interface to the Tie-break server can be tested at http://axicon.no:9000/spp/tbs.html
five tournaments:
Chess JSON files
contains files in Json chess format (.JCH)
t6681,jch - Round robin, Direct encounter needs 3 iterations
elite19-20.jch - Team round robin.
escc20218.jch - European Senior chess 2018, threee groups
ncteam2022.jch - Open Norwegian Championship for teams 2022
ngpl23.jch - % round tournament, 3 groups,1/2p pairing allocated bye
Comments and questions: Otto Milvang <tbs@gacrux.no>