Skip to content

Commit

Permalink
removed get_avg_depth() implementation
Browse files Browse the repository at this point in the history
due to potential crash

changed to version to 0.9.7.post0
  • Loading branch information
QueensGambit committed Nov 1, 2021
1 parent d27365d commit 7c3fb3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion engine/src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const string engineName = "OpenSpielAra";
const string engineName = "ClassicAra";
#endif

const string engineVersion = "0.9.7";
const string engineVersion = "0.9.7.post0";
#ifdef MODE_CRAZYHOUSE
const string engineAuthors = "Johannes Czech, Moritz Willig, Alena Beyer and CrazyAra developers (see AUTHORS file)";
#elif defined MODE_LICHESS
Expand Down
7 changes: 1 addition & 6 deletions engine/src/manager/threadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,7 @@ bool can_prolong_search(size_t curMoveNumber, size_t expectedGameLength)

size_t get_avg_depth(const vector<SearchThreadMaster*>& searchThreads)
{
size_t avgDetph = 0;
for (SearchThreadMaster* searchThread : searchThreads) {
avgDetph += searchThread->get_avg_depth();
}
avgDetph = size_t(double(avgDetph) / searchThreads.size() + 0.5);
return avgDetph;
return 0; // TODO
}

size_t get_max_depth(const vector<SearchThreadMaster*>& searchThreads)
Expand Down
6 changes: 1 addition & 5 deletions engine/src/searchthreadmaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ size_t SearchThreadMaster::get_tb_hits() const

size_t SearchThreadMaster::get_avg_depth()
{
float avgDepthSum = 0;
for (size_t idx = 0; idx < searchThreads.size(); ++idx) {
avgDepthSum += searchThreads[idx]->get_avg_depth();
}
return avgDepthSum / searchThreads.size() + 0.5f;
return 0; // TODO
}

size_t SearchThreadMaster::get_max_depth() const
Expand Down

0 comments on commit 7c3fb3d

Please sign in to comment.