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 <span>
28#include <string>
29#include <string_view>
30#include <variant>
31
36
37using moves::Move;
38using std::size_t;
39
49std::monostate info_string(std::string_view info);
50
57 Move bestMove,
58 std::optional<Move> ponderMove);
59
67 Move currentMove, size_t moveNum);
68
75 Move move,
76 std::span<const Move> refutation = { });
77
84 std::span<const Move> line,
85 std::optional<size_t> cpuNum = std::nullopt);
86
93struct SearchInfo final {
95 struct Score {
97 struct Centipawns final {
99 int value { 0 };
100 };
101
103 struct MateIn final {
107 int plies { 0 };
108
112 [[nodiscard]] auto moves() const noexcept -> int;
113 };
114
116 std::variant<Centipawns, MateIn> value;
117
119 bool lowerBound { false };
120
122 bool upperBound { false };
123 };
124
127
129 size_t depth { 0uz };
130
132 size_t selDepth { 0uz };
133
135 std::chrono::milliseconds time;
136
138 size_t nodes { 0uz };
139
143 std::optional<size_t> multiPV;
144
147
149 size_t hashfull { 0uz };
150
152 size_t tbHits { 0uz };
153
157 std::string extraInformation;
158
160 [[nodiscard]] auto get_nps() const noexcept -> size_t;
161};
162
168void search_info(const SearchInfo& info);
169
170} // namespace chess::uci::printing
void best_move(Move bestMove, std::optional< Move > ponderMove)
void refutation_info(Move move, std::span< const Move > refutation={ })
void search_info(const SearchInfo &info)
void currmove_info(Move currentMove, size_t moveNum)
std::monostate info_string(std::string_view info)
beman::inplace_vector::inplace_vector< Move, MAX_MOVES > MoveList
Definition MoveGen.hpp:63
void currline_info(std::span< const Move > line, std::optional< size_t > cpuNum=std::nullopt)
std::variant< Centipawns, MateIn > value
Definition Printing.hpp:116
std::optional< size_t > multiPV
Definition Printing.hpp:143
auto get_nps() const noexcept -> size_t
std::chrono::milliseconds time
Definition Printing.hpp:135