13 const char * what ()
const noexcept override
14 {
return "Game ended"; }
19 const char * what ()
const noexcept override
20 {
return "Nothing found"; }
25 const char * what ()
const noexcept override
26 {
return "Aborting search"; }
33 : m_msg(
"tree logic exception, should not occur")
39 const char*
what() const noexcept
override {
50#define DEBUG_sendInfoSearching(b, depth, msg, sc) sendInfoSearching(b, depth, msg, sc)
51#define DEBUG_sendInfoSearchingNS(b, depth, msg) sendInfoSearching(b, depth, msg)
53#define DEBUG_sendInfoSearching(b, depth, msg, sc)
54#define DEBUG_sendInfoSearchingNS(b, depth, msg)
57#if defined(BELOFTE_NOUNICODE)
61#define ALPHABETA "alpha-beta"
63#define BE_DRAW "1/2-1/2"
66#define BE_UNDEFINED "UNDEF."
67#define GTOREQUAL " >= "
74#define ALPHABETA "πΌπ½"
76#define BE_DRAW "Β½-Β½"
79#define BE_UNDEFINED "*"
80#define GTOREQUAL " β₯ "
86#define BE_UNDEFINED ""
101 { m_levelptr =
nullptr; }
117 { m_aborting =
true; }
122 std::string
const& comment)
const;
124 std::string
const& comment,
133 {
return m_noBench; }
135 {
return !m_noBench; }
137 { m_noBench =
false; }
139 { m_noBench =
true; }
141 operator std::string() const&
142 {
return const_cast<std::string const&
>(m_name); }
153 {
if (nDepth > m_maxDepth) m_maxDepth = nDepth; }
155 {
return m_maxDepth; }
162 {
return m_levelptr; }
174 bool m_noBench =
true;
177 std::atomic<bool> m_aborting;
TimedExecution()
implementation of timing functions
void adjustMaxSearchedDepth(depth_t const nDepth)
constexpr int64_t getNodes() const
void StartSearch(bScore const sc)
void sendInfoCurrMove(bBoard const &b, depth_t const nCurDepth, bMove const &m, movenum_t const moveid) const
bScore RetrieveBoardEvaluationForWhite(bBoard &b, gameResult_t const gr, bool const bRecalcFirst) const
Get score of board, eventually from cache, from whites view.
void initMaxSearchedDepth()
constexpr bool isNoBench() const
~bSearchAlgorithm() override
void SearchBestMove(bBoard &b, bMoveList &ml)
Generic search, will call (non-)recursive method per algorithm only when there are moves to be played...
bSearchAlgorithm(std::string const &s)
bSearchAlgorithm(bSearchAlgorithm const &)=delete
bSearchAlgorithm(bSearchAlgorithm &&)=delete
constexpr depth_t getMaxSearchedDepth() const
constexpr bool isBench() const
bScore RetrieveBoardEvaluation(bBoard &b, gameResult_t const gr, bool const bRecalcFirst) const
Get score of board, eventually from cache.
bSearchAlgorithm & operator=(bSearchAlgorithm const &)=delete
void CheckIfAbortingSearch() const
void sendInfoSearching(bBoard const &b, depth_t const nDepth, std::string const &comment) const
bSearchAlgorithm & operator=(bSearchAlgorithm &&)=delete
constexpr int64_t getNonLeafNodes() const
virtual bScore CalcBestMove(bBoard &b, bMoveList &ml)=0
implementation of user interface
treeLogicException(std::string const &msg)
const char * what() const noexcept override
enum gameResult gameResult_t