cutechess cli - resume tournament?

Discussion of computer chess matches and engine tournaments.

Moderators: hgm, Rebel, chrisw

User avatar
MartinBryant
Posts: 69
Joined: Thu Nov 21, 2013 12:37 am
Location: Manchester, UK
Full name: Martin Bryant

cutechess cli - resume tournament?

Post by MartinBryant »

Is it possible to get cutechess cli to resume a tournament that was unfortunately aborted due to a power outage?
I've read the documentation but can't see any option to do this :(
I think technically it would be possible by scanning the tourney .pgn file. Could this be added if it can't already do it?
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: cutechess cli - resume tournament?

Post by lucasart »

MartinBryant wrote: Mon Jul 12, 2021 9:56 am Is it possible to get cutechess cli to resume a tournament that was unfortunately aborted due to a power outage?
I've read the documentation but can't see any option to do this :(
I think technically it would be possible by scanning the tourney .pgn file. Could this be added if it can't already do it?
Indeed, it's not possible to resume a tournament at the moment. This is doable, but requires some careful thought to do it right. Things to consider:
  • should the user just type something like c-chess-cli -resume tounament_file ? (TBD format must be human readable, but also easy to parse, not interested in writing a JSON parser in C or embarking large code dependancies).
  • or should the user just repeat the same exact command, with the addition of a -resume flag ? note that PGN are appended not overwritten, so running a new tournament in append mode is just fine, doesn't have to be resume partial one. but then what if the user screws up and enters something inconsistent with the first tournament command ?
  • also for SPRT we want to be able to resume
The idea of parsing the PGN does make things easier. The trick is to use the [Rounds x.y] tag, in order to understand which job was completed, and eventually where to start (we may also check that there is no omission or repetition, rather than carelessly start from the last game). Fortunately, games are written in sequential manner, despite being produced in random manner (due to multi-threading), so that simplifies the problem a bit.

I don't think cutechess-cli can resume tournaments either. But you can use Banksia's tournament manager (it has a pure cli as well), which is excellent and has this capability.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: cutechess cli - resume tournament?

Post by amanjpro »

For ZaTour I use TCEC fork of cutechess-cli which has resume functionality. The vanilla one doesn't have it