Skip to content

Commit

Permalink
Fixing registration pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
mooskagh committed Feb 7, 2025
1 parent 3da33ef commit e6f1bab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/neural/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct EvalResultPtr {
float* q = nullptr;
float* d = nullptr;
float* m = nullptr;
std::span<float> p;
std::span<float> p = {};
};

struct EvalPosition {
Expand Down
4 changes: 3 additions & 1 deletion src/search/instamove/instamove.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ class ValueHeadSearch : public InstamoveSearch {
500 * (1 - results[best_idx].q - results[best_idx].d)))},
}};
uci_responder()->OutputThinkingInfo(&infos);
return legal_moves[best_idx];
Move best_move = legal_moves[best_idx];
if (history.IsBlackToMove()) best_move.Mirror();
return best_move;
}

private:
Expand Down
6 changes: 3 additions & 3 deletions src/search/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class SearchManager {
std::vector<std::unique_ptr<SearchFactory>> algorithms_;
};

#define REGISTER_SEARCH(alg) \
namespace { \
static SearchManager::Register reg3b50Y##algorithm(std::make_unique<alg>()); \
#define REGISTER_SEARCH(alg) \
namespace { \
static SearchManager::Register reg3b50Y_##alg(std::make_unique<alg>()); \
}

} // namespace lczero

0 comments on commit e6f1bab

Please sign in to comment.