BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
Collaboration diagram for UCI:

Files

file  CommandParsing.hpp
file  EngineBase.hpp
file  Options.hpp
file  Printing.hpp

Namespaces

namespace  chess
namespace  chess::uci
namespace  chess::uci::printing

Classes

struct  chess::uci::Action
struct  chess::uci::BoolOption
struct  chess::uci::printing::SearchInfo::Score::Centipawns
struct  chess::uci::ComboOption
struct  chess::uci::EngineBase
struct  chess::uci::GoCommandOptions
struct  chess::uci::IntOption
struct  chess::uci::printing::SearchInfo::Score::MateIn
struct  chess::uci::Option
struct  chess::uci::RegisterNowOptions
struct  chess::uci::printing::SearchInfo::Score
struct  chess::uci::printing::SearchInfo
struct  chess::uci::StringOption

Typedefs

using chess::uci::RegisterOptions = optional<RegisterNowOptions>

Functions

void chess::uci::printing::best_move (Move bestMove, std::optional< Move > ponderMove)
std::monostate chess::uci::printing::info_string (std::string_view info)
auto parse_go_options (string_view options, const Position &currentPosition) -> GoCommandOptions
auto chess::uci::parse_position_options (string_view options) -> std::expected< Position, std::string >
auto chess::uci::parse_register_options (string_view options) -> RegisterOptions
void search_info (const SearchInfo &info)

Detailed Description

Utilities for working with the Universal Chess Interface. [3]

Typedef Documentation

◆ RegisterOptions

A simple convenience typedef.

Definition at line 77 of file CommandParsing.hpp.

Function Documentation

◆ best_move()

void chess::uci::printing::best_move ( Move bestMove,
std::optional< Move > ponderMove )

Prints a UCI-formatted [3] best move string to standard output. Specifying a ponder move is optional.

◆ info_string()

std::monostate chess::uci::printing::info_string ( std::string_view info)

Prints a UCI-formatted [3] information string to standard output. This function should be used for any informational or debug output that an engine wants to print.

Note
This function returns a std::monostate object so that it is suitable for passing to functions such as std::expected::transform_error.

◆ parse_go_options()

auto parse_go_options ( string_view options,
const Position & currentPosition ) -> GoCommandOptions
related

Parses the options following a UCI [3] "go" command. The options should not include the "go" token itself.

◆ parse_position_options()

auto chess::uci::parse_position_options ( string_view options) -> std::expected< Position, std::string >
nodiscard

Parses the options following a UCI [3] "position" command into a Position object. The options should not include the "position" token itself.

If the input string cannot be parsed correctly, returns an explanatory error string.

◆ parse_register_options()

auto chess::uci::parse_register_options ( string_view options) -> RegisterOptions
nodiscard

Parses the options following a UCI [3] "register" command. The options should not include the "register" token itself. If this returns nullopt, then the user sent a register later command.

◆ search_info()

void search_info ( const SearchInfo & info)
related

Prints a UCI-formatted [3] search info string to standard output.