beta = VALUE_INFINITE;
multiPV = Options["MultiPV"];
- Skill skill(Options["Skill Level"]);
+ // Pick integer skill levels, but non-deterministically round up or down
+ // such that the average integer skill corresponds to the input floating point one.
+ PRNG rng(now());
+ int intLevel = int(Options["Skill Level"]) +
+ ((Options["Skill Level"] - int(Options["Skill Level"])) * 1024 > rng.rand<unsigned>() % 1024 ? 1 : 0);
+ Skill skill(intLevel);
// When playing with strength handicap enable MultiPV search that we will
// use behind the scenes to retrieve a set of possible moves.
Depth r = reduction(improving, depth, moveCount);
// Reduction if other threads are searching this position.
- if (th.marked())
+ if (th.marked())
r += ONE_PLY;
// Decrease reduction if position is or has been on the PV
r += ONE_PLY;
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
- r -= ss->statScore / 20000 * ONE_PLY;
+ r -= ss->statScore / 16384 * ONE_PLY;
}
Depth d = clamp(newDepth - r, ONE_PLY, newDepth);