BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
libbenbot
Collaboration diagram for libbenbot:

Topics

 Data structures
 Evaluation
 Resources

Files

file  ColorPrinting.hpp
file  Engine.hpp

Namespaces

namespace  ben_bot
namespace  ben_bot::pretty_print

Classes

class  ben_bot::Engine

Functions

auto ben_bot::pretty_print::duration (std::chrono::milliseconds duration) -> std::string
auto ben_bot::pretty_print::evaluation (Score score) -> std::string
auto ben_bot::pretty_print::hashfull (size_t permille) -> std::string
auto ben_bot::pretty_print::nodes (size_t num) -> std::string
auto ben_bot::pretty_print::nps (size_t nodesPerSec) -> std::string
auto ben_bot::pretty_print::search_stat (size_t stat, size_t totalNodes) -> std::string
void ben_bot::print_colored_table (const util::strings::TextTable &table)
void ben_bot::print_colored_board (const Position &pos, bool utf8)
void ben_bot::print_labeled_info (string_view label, string_view info)

Detailed Description

BenBot's evaluation and search logic, implemented as a library.

Function Documentation

◆ duration()

auto ben_bot::pretty_print::duration ( std::chrono::milliseconds duration) -> std::string
nodiscard

Pretty prints a duration in the form "10 ms", "1.3 s", "2.5 m", etc.

◆ evaluation()

auto ben_bot::pretty_print::evaluation ( Score score) -> std::string
nodiscard

Pretty prints an evaluation in the form "+1.2", "-3.6", "#3", etc.

◆ hashfull()

auto ben_bot::pretty_print::hashfull ( size_t permille) -> std::string
nodiscard

Pretty prints the hashfull permille value as a percentage string.

◆ nodes()

auto ben_bot::pretty_print::nodes ( size_t num) -> std::string
nodiscard

Pretty prints a number of nodes in the form "1k", "1m", etc.

◆ nps()

auto ben_bot::pretty_print::nps ( size_t nodesPerSec) -> std::string
nodiscard

Pretty prints nodes-per-second in the form "1k/s", "1m/s", etc.

◆ print_colored_board()

void ben_bot::print_colored_board ( const Position & pos,
bool utf8 )

Prints the given position with faint file/rank labels.

◆ print_colored_table()

void ben_bot::print_colored_table ( const util::strings::TextTable & table)

Prints the given table with bold headings, faint outlines, and regular content cells.

◆ print_labeled_info()

void ben_bot::print_labeled_info ( string_view label,
string_view info )

Prints the given label faintly, and the info as regular text.

◆ search_stat()

auto ben_bot::pretty_print::search_stat ( size_t stat,
size_t totalNodes ) -> std::string
nodiscard

Pretty prints a search statistic (TT hits, beta cutoffs, etc) as a string of the form "1k", "1m", followed by a percentage of the totalNodes.