
os.execute('rm -f tournoi.err tournoi.log tournoi.pgn')

local cutechess_cli = '$HOME/Documents/echecs/sources/cutechess/1_5_1/build/cutechess-cli'

local cmd = table.concat(
  {
    cutechess_cli,
    --'-debug all',
    '-tournament gauntlet',
    '-rounds 2',
    '-engine name="Gumble RC 240529" cmd="./gumble" dir="git/build/src" proto="uci"',
    --'-engine name="Alouette 0.1.5 Random" cmd="alouette64" dir="alouette/015" arg="--random" proto="uci"',
    --'-engine conf="Alouette 0.1.7"',
    --'-engine conf="Alouette 0.1.7 Random"',
    --'-engine conf="Alouette 0.1.8"',
    --'-engine conf="Amy 0.9.7"',
    --'-engine conf="Aquilon 0.0.6"',
    --'-engine conf="Arasan 23.2"',
    --'-engine conf="Arasan 25.2"',
    --'-engine conf="Booot 4.14.0 RC"',
    --'-engine conf="Booot 4.15.1 RC"',
    --'-engine conf="Booot 6.3.1 RC"',
    --'-engine conf="Booot 6.5"',
    --'-engine conf="Cheng 4.40"',
    --'-engine conf="Cheese 3.0.1"',
    --'-engine conf="CT800 1.12"',
    --'-engine conf="CT800 1.46"',
    --'-engine conf="Durandal 0.1.2 Random"',
    --'-engine conf="Faile 1.4.4"',
    --'-engine conf="Fairy-Max 5.0b"',
    --'-engine conf="Feuerstein 0.4.6.1 RC 0.4"',
    --'-engine conf="Floyd 0.9"',
    --'-engine conf="Fridolin 4.00"',
    --'-engine conf="Fruit 2.1"',
    --'-engine name="Fruit Lua" cmd="luajit" dir="../../lua/echecs/fruit" arg="fruit.lua" proto="uci"',
    --'-engine conf="Galjoen 0.41.2"',
    '-engine conf="GiuChess 1.0 RC 0.2"',
    --'-engine conf="GreKo 2018.12"',
    --'-engine conf="GreKo 2021.10"',
    --'-engine conf="Gully 2.16"',
    --'-engine conf="Hippocampe 0.4.2 RC 0.2"',
    '-engine conf="Irina 0.23"',
    --'-engine conf="Jazz 840"',
    --'-engine conf="King Slayer"',
    --'-engine conf="Kitty"',
    --'-engine conf="Kiwi 0.6"',
    --'-engine conf="Little Wing 0.6.0"',
    --'-engine conf="Luciole 0.0.6"',
    '-engine conf="Micro-Max 1.6"',
    --'-engine conf="Micro-Max 4.0"',
    --'-engine conf="Micro-Max 4.4"',
    --'-engine conf="Micro-Max 4.8"',
    '-engine conf="Monchester 1.0.1"',
    --'-engine conf="Moustique 0.4.1"',
    '-engine conf="MSCP 1.4"',
    --'-engine conf="Needle 0.53.1 RC 0.1"',
    --'-engine conf="NEG 1.3"',
    --'-engine conf="Nero 6.0 RC 0.1"',
    --'-engine conf="OliThink 3.0.1"',
    --'-engine conf="OliThink 5.11.0"',
    --'-engine conf="OliThink 5.11.5"',
    --'-engine conf="Ram 2.0"',
    --'-engine conf="Rodent II 0.9.68"',
    '-engine conf="Sachy 0.2 RC 0.5"',
    --'-engine conf="SamChess RC 0.1"',
    --'-engine conf="Senpai 2.0"',
    --'-engine conf="Senpai 3.0.1"',
    --'-engine conf="Senpai 3.0.2"',
    --'-engine conf="Sjaak II 1.4.1"',
    --'-engine conf="SlowChess Classic 2.9"',
    --'-engine conf="Stash 13.0.1"',
    --'-engine conf="Toledo Nanochess"',
    --'-engine conf="Uralochka 1.1d RC"',
    --'-engine conf="Zeppelin 0.2.0"',
    --'-engine conf="Zugblitz 1.3.2"',
    --'-engine conf="ZCT 0.3.2498"',
    --'-recover',
    '-pgnout tournoi.pgn',
    '-each tc=40/30',
    --'-openings file=book/gaviota-starters.pgn order=random plies=4',
    '-wait 500 2>> tournoi.err | tee tournoi.log'
  },
  ' '
)

os.execute(cmd)
