Module inanis::interface::terminal

source ·

Constants§

Functions§

  • Handles benchmark command by running a fixed-depth search for a set of static positions and printing diagnostic data.
  • Handles dperft [depth], dperft [depth] fen [fen] and dperft [depth] moves [moves] commands by running a divided perft test to the depth specified by depth parameter. The initial position can be specified by FEN, a list of moves, or just omitted (so the default start position will be taken).
  • Handles evaluate [fen] command by printing evaluation for the position specified by FEN.
  • Handles help command by printing all available ones.
  • Handles perft [depth], perft [depth] fen [fen] and perft [depth] moves [moves] commands by running a perft test to the depth specified by depth parameter. The initial position can be specified by FEN, a list of moves, or just omitted (so the default start position will be taken).
  • Handles qperft [depth] [threads_count] [hashtable_size_mb], qperft [depth] [threads_count] [hashtable_size_mb] fen [fen] and qperft [depth] [threads_count] [hashtable_size_mb] moves [moves] commands by running a quick perft test to the depth specified by depth parameter. This kind of perft also supports multithreading (specified by threads_count) and caching results in the hashtable (with size specified by hashtable_size_mb). The initial position can be specified by FEN, a list of moves, or just omitted (so the default start position will be taken).
  • Handles quit command by exiting process.
  • handle_uci 🔒
    Handles uci command by entering into the UCI (Universal Chess Interface) mode.
  • Handles unknown command by printing an error.
  • handle_wah 🔒
    Handles wah command by printing WAH.
  • Creates a new board based on the input with FEN or moves list - returns Err if internal parser failed.
  • Entry point of the terminal interface and command loop. If there’s a command passed through args, the program will end immediately after completing it and printing the result.