From 0409845b0bae6599bd08d983dce67c269f7d7da0 Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Thu, 25 Jun 2026 18:02:39 -0500 Subject: [PATCH 1/2] Fix DumpRetrieved call under debug_all builds. Dereference the transposition-table NodeCards pointer to match the DumpRetrieved(const NodeCards&) signature when DDS_AB_HITS is enabled. Co-authored-by: Cursor --- library/src/ab_search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/ab_search.cpp b/library/src/ab_search.cpp index fbc4e8fd..762d75f0 100644 --- a/library/src/ab_search.cpp +++ b/library/src/ab_search.cpp @@ -225,7 +225,7 @@ static bool ab_search_0_ctx( { #ifdef DDS_AB_HITS DumpRetrieved(thrp->fileRetrieved.GetStream(), - * posPoint, cardsP, target, depth); + * posPoint, *cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) From f7e2490ff80010d4cee3c0fc2710c31baed4569a Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Thu, 25 Jun 2026 18:06:27 -0500 Subject: [PATCH 2/2] Restore DumpRetrieved and DumpStored for debug_all builds. Re-add the DDS_AB_HITS dump helpers in dump.cpp so debug_all links succeed when ab_search logs transposition-table hits. Co-authored-by: Cursor --- library/src/dump.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/library/src/dump.cpp b/library/src/dump.cpp index 860333ed..eb7419c7 100644 --- a/library/src/dump.cpp +++ b/library/src/dump.cpp @@ -15,6 +15,7 @@ #include "dump.hpp" #include #include +#include std::string PrintSuit(const unsigned short suitCode); @@ -335,3 +336,56 @@ void DumpTopLevel( ctx.search().trick_nodes() << " trick nodes\n\n"; } + +#ifdef DDS_AB_HITS + +void DumpRetrieved( + std::ofstream& fout, + const Pos& tpos, + const NodeCards& node, + const int target, + const int depth) +{ + fout << "Retrieved entry\n"; + fout << std::string(15, '-') << "\n"; + fout << PosToText(tpos, target, depth) << "\n"; + fout << FullNodeToText(node) << "\n"; + fout << RankToDiagrams(tpos.rank_in_suit, node) << "\n"; +} + + +void DumpStored( + std::ofstream& fout, + const Pos& tpos, + const Moves& moves, + const NodeCards& node, + const int target, + const int depth) +{ + fout << "Stored entry\n"; + fout << std::string(12, '-') << "\n"; + fout << PosToText(tpos, target, depth) << "\n"; + fout << NodeToText(node); + fout << moves.TrickToText((depth >> 2) + 1) << "\n"; + fout << PrintDeal(tpos.rank_in_suit, 16); +} + + +void DumpStored( + std::ofstream& fout, + const Pos& tpos, + SolverContext& ctx, + const NodeCards& node, + const int target, + const int depth) +{ + fout << "Stored entry\n"; + fout << std::string(12, '-') << "\n"; + fout << PosToText(tpos, target, depth) << "\n"; + fout << NodeToText(node); + fout << ctx.move_gen().trick_to_text((depth >> 2) + 1) << "\n"; + fout << PrintDeal(tpos.rank_in_suit, 16); +} + +#endif // DDS_AB_HITS +