TCEC 4k Rules
TCEC 4k - Rules
Contents
Rules
0. General and format
- 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.
- 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).
- The 2 top engines in the final standings of this Pool will qualify to play a MiniFinal to determine the final 4k Event champion.
- The MiniFinal will consist of a 25DRR, a 25x double round robin (a total of 50 games, this includes reverse games).
- Books will be provided for each stage.
1. Time control
- Time control for all stages will be 30 mins + 3 secs increment per move for all games in a match.
- 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
- A game can be won by mate, opponent's illegal move, opponent's resignation or opponent loses on time.
- A game can end in a draw by three-fold repetition, 50-move rule or stalemate.
- If an engine loses on time, the result will not be changed or the game replayed.
3. Tiebreaks
- 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:
- In case of engines being tied, then the direct encounter(s) between the tied engines decides first.
- The Sonneborn-Berger is the second criterion.
- r-mobility tiebreak is the third criterion.
- Fourth criterion is greatest number of double wins (winning both sides of a game pair and/or book exit)
- Fifth criterion is lowest average number of moves in won games
- Sixth criterion is highest average number of moves in lost games
- In the unlikely event engines are even then still tied, the Tournament Organizers will decide on promotion or relegation.
- 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
- Testing will be done and provided to all invited engines.
- 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.
- Note that despite testing between certain Events will be provided, engine authors update at their own risk.
- Once an Event is being played, no updates are allowed during it.
5. Engine Ratings
- The TCEC engine ratings can be found at https://tcec-chess.com/bayeselo.txt
- 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.
- Most testing games with sufficiently long time control are also used.
- Version numbers are ignored and all games are included, including games lost on time or due to crash.
- 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
- 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:
- If the web server crashes, the game continues unaffected, and broadcasting will be resumed as soon as possible;
- 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;
- 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;
- 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;
- 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.
- Crashes are counted as losses.
- 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
- The size of the engine is limited to a maximum of 4KiB (4096 bytes).
- At entry this should be an executable or a script and consist of only 1 file.
- 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. - Startup should be within 60s and not leave itself any files lying around, not counting what system programs might cache.
- Explicitly allowed external commands:
bzip2
,bash
,c++
,cargo
,cc
,clang
,chmod
,gzip
,lzma
,mktemp
,perl
,python
,python3
,pypy3
,rustc
,sh
,sleep
,tail
,xz
. - Explicitly allowed libraries: Various system libraries like
libc
, alsoCUDA
andOpenCL
. For pythonNumpy
allowed. - If
python-chess
library is used, it must be included in the binary and thus counted toward the size. - Commands and libraries not listed in either of above might later be allowed and added to allowed list, by discretion of the organizers.
- At least the following subset of the UCI protocol must be supported:
go
orgo wtime A btime B winc C binc D
,bestmove (move)
,isready
,position startpos (moves ..)
,uci
,ucinewgame
andquit
- 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