コンパイルエラーを修正した

This commit is contained in:
nodchip
2020-06-08 23:46:06 +09:00
parent 5c936572e9
commit 33772a0418
4 changed files with 29 additions and 28 deletions
+10 -10
View File
@@ -2024,9 +2024,9 @@ namespace Learner
{
auto th = pos.this_thread();
th->completedDepth = DEPTH_ZERO;
th->completedDepth = 0;
th->selDepth = 0;
th->rootDepth = DEPTH_ZERO;
th->rootDepth = 0;
// 探索ノード数のゼロ初期化
th->nodes = 0;
@@ -2050,7 +2050,7 @@ namespace Learner
: -make_score(ct, ct / 2));
for (int i = 7; i > 0; i--)
(ss - i)->continuationHistory = &th->continuationHistory[NO_PIECE][0]; // Use as sentinel
(ss - i)->continuationHistory = &th->continuationHistory[0][0][NO_PIECE][0]; // Use as a sentinel
// rootMovesの設定
auto& rootMoves = th->rootMoves;
@@ -2109,7 +2109,7 @@ namespace Learner
return { mated_in(/*ss->ply*/ 0 + 1), {} };
}
auto bestValue = ::qsearch<PV>(pos, ss, -VALUE_INFINITE, VALUE_INFINITE, DEPTH_ZERO);
auto bestValue = ::qsearch<PV>(pos, ss, -VALUE_INFINITE, VALUE_INFINITE, 0);
// 得られたPVを返す。
std::vector<Move> pvs;
@@ -2139,11 +2139,11 @@ namespace Learner
{
std::vector<Move> pvs;
Depth depth = depth_ * ONE_PLY;
if (depth < DEPTH_ZERO)
Depth depth = depth_;
if (depth < 0)
return std::pair<Value, std::vector<Move>>(Eval::evaluate(pos), std::vector<Move>());
if (depth == DEPTH_ZERO)
if (depth == 0)
return qsearch(pos);
Stack stack[MAX_PLY + 10], * ss = stack + 7;
@@ -2176,7 +2176,7 @@ namespace Learner
Value delta = -VALUE_INFINITE;
Value bestValue = -VALUE_INFINITE;
while ((rootDepth += ONE_PLY) <= depth
while ((rootDepth += 1) <= depth
// node制限を超えた場合もこのループを抜ける
// 探索ノード数は、この関数の引数で渡されている。
&& !(nodesLimit /*node制限あり*/ && th->nodes.load(std::memory_order_relaxed) >= nodesLimit)
@@ -2203,7 +2203,7 @@ namespace Learner
selDepth = 0;
// depth 5以上においてはaspiration searchに切り替える。
if (rootDepth >= 5 * ONE_PLY)
if (rootDepth >= 5 * 1)
{
delta = Value(20);
@@ -2217,7 +2217,7 @@ namespace Learner
int failedHighCnt = 0;
while (true)
{
Depth adjustedDepth = std::max(ONE_PLY, rootDepth - failedHighCnt * ONE_PLY);
Depth adjustedDepth = std::max(1, rootDepth - failedHighCnt * 1);
bestValue = ::search<PV>(pos, ss, alpha, beta, adjustedDepth, false);
stable_sort(rootMoves.begin() + pvIdx, rootMoves.end());