mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix LazySMP when searching to a fixed depth.
Currently, helper threads will only search up to the specified depth limit. Now let them search until the main thread has finished the specified depth. On the other hand, we don't want to pick a thread with a higher search depth. This may be considered cheating. ;-) No functional change.
This commit is contained in:
parent
2dd24dc4e6
commit
dc0030de4f
1 changed files with 3 additions and 2 deletions
|
@ -350,6 +350,7 @@ void MainThread::search() {
|
|||
Thread* bestThread = this;
|
||||
if ( !this->easyMovePlayed
|
||||
&& Options["MultiPV"] == 1
|
||||
&& !Limits.depth
|
||||
&& !Skill(Options["Skill Level"]).enabled()
|
||||
&& rootMoves[0].pv[0] != MOVE_NONE)
|
||||
{
|
||||
|
@ -411,7 +412,7 @@ void Thread::search() {
|
|||
multiPV = std::min(multiPV, rootMoves.size());
|
||||
|
||||
// Iterative deepening loop until requested to stop or the target depth is reached.
|
||||
while (++rootDepth < DEPTH_MAX && !Signals.stop && (!Limits.depth || rootDepth <= Limits.depth))
|
||||
while (++rootDepth < DEPTH_MAX && !Signals.stop && (!Limits.depth || Threads.main()->rootDepth <= Limits.depth))
|
||||
{
|
||||
// Set up the new depths for the helper threads skipping on average every
|
||||
// 2nd ply (using a half-density matrix).
|
||||
|
|
Loading…
Add table
Reference in a new issue