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 magic command by printing a fresh set of magic numbers.
  • 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.
  • Handles testset [epd] [depth] [transposition_table_size] [threads_count] command by running a fixed-depth search of positions stored in the epd file, using hashtable with size specified in transposition_table_size. To classify the test as successful, the last iteration has to return the correct best move.
  • Handles tuner [epd] [output] [lock_material] [randomize] [threads_count] command by running the evaluation parameters tuner. The input file is specified by epd file with a list of positions and their expected results, and the output directory is used to store generated Rust sources with the optimized values. Use lock_material to disable tuner for piece values, and randomize to initialize evaluation parameters with random values. Multithreading is supported by threads_count.
  • Handles tunerset [pgn] [output] [min_ply] [max_score] [max_diff] [density] command by running generator of the dataset for the tuner. It works by parsing pgn_filename, and then picking random positions based on the provided restrictions like min_ply, max_score, max_differ, density and avg_game_phase. Output positions are then stored in the output_file.
  • handle_uci 🔒
    Handles uci command by entering into the UCI (Universal Chess Interface) mode.
  • Handles unknown command by printing warning message.
  • 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.