TCEC 4k Rules

From TCEC wiki
Jump to: navigation, search

TCEC 4k - Rules

Rules

0. General and format

  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.
  2. As the first stage, a Pool is formed with all engines playing all in a 4DRR, a 4x double round robin (a total of 120 games at 6 engines, this includes reverse games).
  3. The 2 top engines in the final standings of this Pool will qualify to play a MiniFinal to determine the final 4k Event champion.
  4. The MiniFinal will consist of a 25DRR, a 25x double round robin (a total of 50 games, this includes reverse games).
  5. Books will be provided for each stage.

1. Time control

  1. Time control for all stages 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 or opponent loses on time.
  2. A game can end in a draw by three-fold repetition, 50-move rule or stalemate.
  3. If an engine loses on time, the result will not be changed or the game replayed.

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 the MiniTinal, 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.
  2. In case the MiniFinal ends in a tie after 50 games, pairs of games at the same time control will be played until one engine wins such a pair.

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. 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.
  2. Crashes are counted as losses.
  3. 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 if used to contain part of engine will be counted towards size with irrelevant characters removed (example: "TuringEngine":"...."). Hash, Threads and any such configuration option not used to bypass size reduction is not counted towards size in any way.
  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++, cargo, cc, clang, chmod, gzip, lzma, mktemp, perl, python, python3, pypy3, rustc, sh, sleep, tail, xz.
  6. Explicitly allowed libraries: Various system libraries like libc, also CUDA and OpenCL. For python Numpy allowed.
  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 (moves ..), 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