|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/search/Callbacks.hpp>
Public Types | |
| using | Callback = std::function<void(const Result&)> |
Public Member Functions | |
| void | iteration_complete (const Result &result) const |
| void | root_move (const Move move, const size_t idx) const |
| void | search_complete (const Result &result) const |
| void | search_start (const Options &options) const |
Static Public Member Functions | |
| static auto | make_pretty_printer (std::function< std::string(Move, const chess::game::Position &)> &&printMove) -> Callbacks |
| static auto | make_uci_printer (std::function< bool()> isDebugMode) -> Callbacks |
Public Attributes | |
| Callback | onIteration |
| std::function< void(Move, size_t)> | onRootMove |
| Callback | onSearchComplete |
| std::function< void(const Options &)> | onSearchStart |
This struct encapsulates a set of functions that will be called to process search progress and results. Search results are always retrieved through these callbacks.
Definition at line 46 of file Callbacks.hpp.
| using ben_bot::search::Callbacks::Callback = std::function<void(const Result&)> |
Function type that accepts a single Result argument.
Definition at line 48 of file Callbacks.hpp.
|
inline |
Can be safely called without checking if onIteration is null.
Definition at line 84 of file Callbacks.hpp.
|
staticnodiscard |
Creates a set of callbacks that print search information in a human-readable table-aligned format.
| printMove | Function object that will be used to format Move objects to display the PV. |
|
staticnodiscard |
Creates a set of callbacks that print UCI-formatted information and bestmove output to standard output.
| isDebugMode | Function object that should return true if debug information should be included in the information output. |
|
inline |
Can be safely called without checking if onRootMove is null.
Definition at line 93 of file Callbacks.hpp.
|
inline |
Can be safely called without checking if onSearchComplete is null.
Definition at line 75 of file Callbacks.hpp.
|
inline |
Can be safely called without checking if onSearchStart is null.
Definition at line 68 of file Callbacks.hpp.
| Callback ben_bot::search::Callbacks::onIteration |
Function object that will be invoked with results from each iteration of the iterative deepening loop.
Definition at line 59 of file Callbacks.hpp.
| std::function<void(Move, size_t)> ben_bot::search::Callbacks::onRootMove |
Function object that will be invoked with each root move being searched. The second argument is the index of the current move in the list of moves being searched.
Definition at line 65 of file Callbacks.hpp.
| Callback ben_bot::search::Callbacks::onSearchComplete |
Function object that will be invoked with results from a completed search.
Definition at line 54 of file Callbacks.hpp.
| std::function<void(const Options&)> ben_bot::search::Callbacks::onSearchStart |
Function object that will be invoked when a new search is started.
Definition at line 51 of file Callbacks.hpp.