TCEC 4k Rules

From TCEC wiki
Revision as of 19:07, 27 July 2021 by Aloril (talk | contribs) (4k rules, initial draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This is a temporary version!! The page below is not yet final.



TCEC 4k - Rules

Rules

1. 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.

2. 4k specific rules

  1. Size is limited to maximum of 4kiB (4096 bytes)
  2. Entry should be an executable or a script and consist of only 1 file
  3. File name should not contain information, engines.json options with irrelevant characters removed is counted towards size (example: "Hash":"98304"): if no options, then nothing 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 be allowed and added to allowed list
  9. UCI protocol, following subset must be supported: go or go wtime A btime B winc C binc D, isready, position startpos, uci, ucinewgame and quit
  10. 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