Skip to content

Time_Control_Config

Ilya V. Portnov edited this page Nov 8, 2023 · 2 revisions

Time control options are configured in timing.yaml file, which is looked up in the following order

  • first, time_control option of server.yaml option is checked; that option may specify the location of timing.yaml.
  • next, ~/.config/hcheckers/timing.yaml is checked
  • last, /etc/hcheckers/timing.yaml is checked.

The yaml file should represent a dictionary. Keys in that dictionary are unique identifiers (slugs) of timing options. Values describe the options. Example:

classic12060n:
  title:
    ru: "Классика: 2ч на первые 50 ходов + 1ч на каждые 25 ходов"
    en: "Classic: 2h for first 50 moves + 1h for each 25 moves"
  initial_seconds: 7200
  initial_moves: 50
  next_moves: 25
  additional_seconds: 50
  rules: [international, canadian, frisian, killer]
blitz32:
  title:
    ru: "Блиц 3м + 2с за ход"
    en: "Blitz 3m + 2s for move"
  seconds_per_game: 180
  seconds_per_move: 2

The title key must be present in each timing variant; it describes timing option name to be present for user, in each supported language (en is used as a fallback). rules key, if present, says that this timing option is applicable only to certain game rules. If not present, then this option is applicable to all rules. Other keys depend on the variant of time control system:

  • For fixed time per game, it is enough to specify seconds_per_game key.
  • For Fischer timing, seconds_per_game and seconds_per_move must be provided.
  • For "N minutes for first M moves and then K minutes for the rest of the game", one must specify initial_moves, initial_seconds and additional_seconds.
  • For "N minutes for first M moves, and then K minutes for each next L moves", one must specify initial_moves, initial_seconds, next_moves and additional_seconds.
Clone this wiki locally