|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/search/Options.hpp>
Public Member Functions | |
| auto | to_string () const -> std::string |
Static Public Member Functions | |
| static auto | from_libchess (const chess::uci::GoCommandOptions &goOptions, bool isWhiteToMove, std::chrono::milliseconds overhead=std::chrono::milliseconds { 0 }) -> Options |
| static auto | from_string (std::string_view text, const chess::game::Position ¤tPosition) -> Options |
Public Attributes | |
| size_t | depth { std::numeric_limits<size_t>::max() } |
| bool | infinite { false } |
| std::optional< size_t > | mateIn |
| size_t | maxNodes { std::numeric_limits<size_t>::max() } |
| std::chrono::milliseconds | moveOverhead { 0uz } |
| chess::moves::MoveList | movesToSearch |
| size_t | multiPV { 1uz } |
| std::optional< std::chrono::milliseconds > | searchTime |
| std::optional< std::chrono::milliseconds > | softSearchTime |
This struct encapsulates the parameters to the search algorithm.
Definition at line 58 of file Options.hpp.
|
staticnodiscard |
Translates the raw UCI "go" command options into this struct's fields. The move overhead is subtracted from the time we have available.
|
staticnodiscard |
Deserializes options from a string.
|
nodiscard |
Serializes these options to a string.
| size_t ben_bot::search::Options::depth { std::numeric_limits<size_t>::max() } |
The maximum search depth (in plies).
Definition at line 60 of file Options.hpp.
| bool ben_bot::search::Options::infinite { false } |
If true, the search should not exit until a stop or exit command is received.
Definition at line 86 of file Options.hpp.
| std::optional<size_t> ben_bot::search::Options::mateIn |
Search for mate in this many moves.
Definition at line 89 of file Options.hpp.
| size_t ben_bot::search::Options::maxNodes { std::numeric_limits<size_t>::max() } |
Search only this many nodes. Setting this value too low can really emphasize the effects of our move ordering algorithm.
Definition at line 76 of file Options.hpp.
| std::chrono::milliseconds ben_bot::search::Options::moveOverhead { 0uz } |
Move overhead time subtracted from maximum search time.
Definition at line 71 of file Options.hpp.
| chess::moves::MoveList ben_bot::search::Options::movesToSearch |
Restrict the search to only these moves. If this is empty, all legal moves in the position will be searched.
Definition at line 81 of file Options.hpp.
| size_t ben_bot::search::Options::multiPV { 1uz } |
The number of principal variations to search for and report. If this is greater than 1, the search will find the N best lines.
Definition at line 94 of file Options.hpp.
| std::optional<std::chrono::milliseconds> ben_bot::search::Options::searchTime |
The maximum search time. The search is aborted once this much time has passed.
Definition at line 63 of file Options.hpp.
| std::optional<std::chrono::milliseconds> ben_bot::search::Options::softSearchTime |
A softer time limit: once this much time has passed, we don't start another iteration, but the current one is allowed to finish (up to searchTime).
Definition at line 68 of file Options.hpp.