TCEC 4k Rules
TCEC 4k - Rules
- 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
- Time control 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.
- 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:
- 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.
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.
- 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.jsonoptions with irrelevant characters removed is counted towards size (example:
"Hash":"98304"). If there are no options, then nothing will be counted to be added.
- Startup should be within 60s and not leave itself any files lying around, not counting what system programs might cache.
- Explicitly allowed external commands:
- Explicitly allowed libraries: Various system libraries like
OpenCL. For python
python-chesslibrary 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 wtime A btime B winc C binc D,
- 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