|
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 | 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(chess::moves::Move)> &&printMove) -> Callbacks |
| static auto | make_uci_printer (std::function< bool()> &&isDebugMode) -> Callbacks |
Public Attributes | |
| Callback | onIteration |
| 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 41 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 43 of file Callbacks.hpp.
|
inline |
Can be safely called without checking if onIteration is null.
Definition at line 73 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 onSearchComplete is null.
Definition at line 64 of file Callbacks.hpp.
|
inline |
Can be safely called without checking if onSearchStart is null.
Definition at line 57 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 54 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 49 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 46 of file Callbacks.hpp.