TCEC 4k Rules

From TCEC wiki
Jump to: navigation, search

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. Time control will be 30 mins + 3 secs increment per move for all games in a match.
  2. If an engine loses on time, that results in a loss and will be registered as such. The game will not be replayed.

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.
  2. 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.
  3. Note that despite testing between certain Events will be provided, engine authors update at their own risk.
  4. 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. If python-chess library is used, it must be included in the binary and thus counted toward the size.
  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