Difference between revisions of "TCEC 4k Rules"

From TCEC wiki
Jump to: navigation, search
(edited to be more complete and substantial)
m
Line 1: Line 1:
{{Temp}}
 
 
 
'''[[:Category:TCEC 4k|TCEC 4k]] - Rules'''
 
'''[[:Category:TCEC 4k|TCEC 4k]] - Rules'''
  

Revision as of 10:15, 26 May 2022

TCEC 4k - Rules

Rules

0. General

  1. Rules in main leagues apply. For example there should be a way to disable internal opening books and pondering if those are supported and enabled by default:

1. Time control

  1. Different classical time controls will be used throughout the season and the time control is increased as the season progresses.
  2. For the Qualification League, League 4, League 3 and League 2 Events, the time control is 30 minutes + 3 seconds added per move for the whole game.
  3. For League 1 Event, the time control is 45 minutes + 4.5 seconds added per move for the whole game.
  4. For Premier Division, the time control is 60 minutes + 6 seconds added per move for the whole game.
  5. For the Infrafinal, the time control is 90 minutes + 9 seconds added per move for the whole game.
  6. For the Superfinal, the time control is 120 minutes + 12 seconds added per move for the whole game.

2. Game ending

  1. A game can be won by mate, opponent's illegal move, opponent's resignation, opponent loses on time, or by tablebase adjudication.
  2. A game can end in a draw by three-fold repetition, 50-move rule, stalemate, tablebase adjudication, and by the TCEC draw rule.
  3. The TCEC draw rule automatically rules a game as drawn at move 35 or later if the eval from both playing engines are within +0.15 to -0.15 pawns for the last 5 moves, or 10 plies. If there is a pawn advance, or a capture of any kind, this draw rule will reset and start over.
  4. Cutechess-cli will adjudicate 6-men (or less) endgame positions automatically with Syzygy tablebases.

3. Tiebreaks

  1. If necessary, tiebreaks shall be used to determine advancement, based on the final standings of a League or Division. For all Events except Infrafinal and Superfinal, the following criteria will be used, in the order as presented below:
    1. In case of engines being tied, then the direct encounter(s) between the tied engines decides first.
    2. The Sonneborn-Berger is the second criterion.
    3. r-mobility tiebreak is the third criterion.
    4. Fourth criterion is greatest number of double wins (winning both sides of a game pair and/or book exit)
    5. Fifth criterion is lowest average number of moves in won games
    6. Sixth criterion is highest average number of moves in lost games
    7. In the unlikely event engines are even then still tied, the Tournament Organizers will decide on promotion or relegation.

4. Engine Updates

  1. Testing will be done and provided to all invited engines; there are three entering slots by invitation:
    1. Before start of Qualification League: for all new engines as well as those engines that have a League seed in QL, L4 or L3, based on the former TCEC Leagues Season.
    2. Between League 3 and 2: for all L2 and L1 engines that have a League seed in L2 and L1, based on the former TCEC Leagues Season.
    3. Between League 1 and Premier Division: for all L1 and DivP engines that have a League seed in L1 and DivP, based on the former TCEC Leagues Season.
  2. For engines that promote to the next Event, the following rules apply:
  3. Except when promoting from QL to L4, and from L4 to L3, all engines that promote to the next Event are allowed to update before the Event's submission deadline, no matter if it is to fix bugs uncovered during the previous Event, or to submit a better version. To summarize:
    1. No testing will be done and provided, nor is updating allowed, between Qualification League and League 4.
    2. No testing will be done and provided, nor is updating allowed, between League 4 and League 3.
    3. Testing will be done and provided, and updating allowed, between League 3 and League 2.
    4. Testing will be done and provided, and updating allowed, between League 2 and League 1.
    5. Testing will be done and provided, and updating allowed, between League 1 and Premier Division.
    6. Testing will be done and provided, and updating allowed, between Premier Division and Superfinal.
  4. The deadline for engine submission is the last game of the current Event unless the programmer is given a specific deadline from the Tournament Organizers - the goal is to be able to start the next Event as soon as possible without any significant delay.
  5. Note that despite testing between certain Events will be provided, engine authors update at their own risk.
  6. Once an Event is being played, no updates are allowed during it.

5. Engine Ratings

  1. The TCEC engine ratings can be found at https://tcec-chess.com/bayeselo.txt
  2. This list is updated live after every official game and includes all games, including rapid or faster time control games from current and previous season.
  3. Most testing games with sufficiently long time control are also used.
  4. Version numbers are ignored and all games are included, including games lost on time or due to crash.
  5. New engines are assigned a temporary rating based on testing, until an official rating can be calculated after they played in an Event.

6. Crashes

  1. If an engine loses on time, the result will not be changed or the game replayed.
  2. In case of a server disconnect, or time loss due to lag, or other interruptions not caused by the engines there are five possible scenarios:
    1. If the web server crashes, the game continues unaffected, and broadcasting will be resumed as soon as possible;
    2. If at the moment of game server interruption the evaluation of both engines is more than +10, or if the evaluation of both engines is less than -10, the game is scored as a win;
    3. If the evaluation of both engines is less than ABS(0.15) at the moment of game server interruption, and both engines have completed 35 moves, the game is scored as a draw;
    4. If a game interrupts with 7 pieces on the board, position on the board at the instant of game server interruption will be adjudicated according to 7-man EGTB;
    5. In all other cases the game is restarted from the position that the two engines reached before the disconnect, with time compensation to fill up the cache.
  3. Crashes are counted as losses.
  4. Any engine crashing more than once, yet promoting, is allowed to fix the problem leading to the crashes, but not update in the sense of changing any other part of the software.

7. 4k specific rules

  1. The size of the engine is limited to a maximum of 4kiB (4096 bytes).
  2. At entry this should be an executable or a script and consist of only 1 file.
  3. The file name should not contain information; engines.json options with irrelevant characters removed is counted towards size (example: "Hash":"98304"). If there are no options, then nothing will be counted to be added.
  4. Startup should be within 60s and not leave itself any files lying around, not counting what system programs might cache.
  5. Explicitly allowed external commands: bzip2, bash, c++, cc, clang, chmod, gzip, lzma, mktemp, perl, python, python3, sh, sleep, tail, xz.
  6. Explicitly allowed libraries: Various system libraries like libc, also CUDA and OpenCL.
  7. Explicitly forbidden: python-chess.
  8. Commands and libraries not listed in either of above might later be allowed and added to allowed list, by discretion of the organizers.
  9. At least the following subset of the UCI protocol must be supported: go or go wtime A btime B winc C binc D, isready, position startpos, uci, ucinewgame and quit
  10. Authors can use UPX or some other executable packer or self decompressing shell script.

Example shell script by mrbdzz that decompresses executable or script and then executes it:

#!/bin/sh
T=`mktemp`
tail -c +84 "$0"|xz -d>$T
chmod +x $T
(sleep 3;rm $T)&exec $T

Example shell script that decompresses C source code, compiles and then executes it:

#!/bin/sh
T=`mktemp`
tail -n +5 "$0"|xz -d|cc -o $T -O3 -xc -
(sleep 3;rm $T)&exec $T

"Hello, world!" asm Linux example If you want 64 bit version, then use: nasm -f elf64 hello.asm -o hello64.o

Further information

See also