BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
Printing.hpp
Go to the documentation of this file.
1/*
2 * ======================================================================================
3 *
4 * ░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░▒▓████████▓▒░
5 * ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
6 * ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
7 * ░▒▓███████▓▒░░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
8 * ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
9 * ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
10 * ░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░
11 *
12 * ======================================================================================
13 */
14
19
20#pragma once
21
22#include <chrono>
23#include <cstddef> // IWYU pragma: keep - for size_t
26#include <optional>
27#include <string>
28#include <string_view>
29#include <variant>
30
35
36using moves::Move;
37using std::size_t;
38
48std::monostate info_string(std::string_view info);
49
56 Move bestMove,
57 std::optional<Move> ponderMove);
58
67struct SearchInfo final {
69 struct Score {
71 struct Centipawns final {
73 int value { 0 };
74 };
75
77 struct MateIn final {
81 int plies { 0 };
82
86 [[nodiscard]] auto moves() const noexcept -> int;
87 };
88
90 std::variant<Centipawns, MateIn> value;
91
93 bool lowerBound { false };
94
96 bool upperBound { false };
97 };
98
101
103 size_t depth { 0uz };
104
106 size_t selDepth { 0uz };
107
109 std::chrono::milliseconds time;
110
112 size_t nodes { 0uz };
113
116
118 size_t hashfull { 0uz };
119
121 size_t tbHits { 0uz };
122
126 std::string extraInformation;
127
129 [[nodiscard]] auto get_nps() const noexcept -> size_t;
130};
131
137void search_info(const SearchInfo& info);
138
139} // namespace chess::uci::printing
void best_move(Move bestMove, std::optional< Move > ponderMove)
void search_info(const SearchInfo &info)
std::monostate info_string(std::string_view info)
beman::inplace_vector::inplace_vector< Move, MAX_MOVES > MoveList
Definition MoveGen.hpp:63
std::variant< Centipawns, MateIn > value
Definition Printing.hpp:90
auto get_nps() const noexcept -> size_t
std::chrono::milliseconds time
Definition Printing.hpp:109