mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Clean steps 8 and 9.
No functional change Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
2142be7d7f
commit
01b228b5e1
1 changed files with 23 additions and 19 deletions
|
@ -165,26 +165,29 @@ namespace {
|
||||||
const Depth RazorDepth = 4 * OnePly;
|
const Depth RazorDepth = 4 * OnePly;
|
||||||
inline Value razor_margin(Depth d) { return Value(0x200 + 0x10 * d); }
|
inline Value razor_margin(Depth d) { return Value(0x200 + 0x10 * d); }
|
||||||
|
|
||||||
// Search depth at iteration 1
|
// Step 8. Null move search with verification search
|
||||||
const Depth InitialDepth = OnePly;
|
|
||||||
|
|
||||||
// Use internal iterative deepening?
|
|
||||||
const bool UseIIDAtPVNodes = true;
|
|
||||||
const bool UseIIDAtNonPVNodes = true;
|
|
||||||
|
|
||||||
// Internal iterative deepening margin. At Non-PV moves, when
|
|
||||||
// UseIIDAtNonPVNodes is true, we do an internal iterative deepening
|
|
||||||
// search when the static evaluation is at most IIDMargin below beta.
|
|
||||||
const Value IIDMargin = Value(0x100);
|
|
||||||
|
|
||||||
// Easy move margin. An easy move candidate must be at least this much
|
|
||||||
// better than the second best move.
|
|
||||||
const Value EasyMoveMargin = Value(0x200);
|
|
||||||
|
|
||||||
// Null move margin. A null move search will not be done if the static
|
// Null move margin. A null move search will not be done if the static
|
||||||
// evaluation of the position is more than NullMoveMargin below beta.
|
// evaluation of the position is more than NullMoveMargin below beta.
|
||||||
const Value NullMoveMargin = Value(0x200);
|
const Value NullMoveMargin = Value(0x200);
|
||||||
|
|
||||||
|
// Step 9. Internal iterative deepening
|
||||||
|
|
||||||
|
const Depth IIDDepthAtPVNodes = 5 * OnePly;
|
||||||
|
const Depth IIDDepthAtNonPVNodes = 8 * OnePly;
|
||||||
|
|
||||||
|
// Internal iterative deepening margin. At Non-PV nodes
|
||||||
|
// we do an internal iterative deepening
|
||||||
|
// search when the static evaluation is at most IIDMargin below beta.
|
||||||
|
const Value IIDMargin = Value(0x100);
|
||||||
|
|
||||||
|
// Search depth at iteration 1
|
||||||
|
const Depth InitialDepth = OnePly;
|
||||||
|
|
||||||
|
// Easy move margin. An easy move candidate must be at least this much
|
||||||
|
// better than the second best move.
|
||||||
|
const Value EasyMoveMargin = Value(0x200);
|
||||||
|
|
||||||
// If the TT move is at least SingleReplyMargin better then the
|
// If the TT move is at least SingleReplyMargin better then the
|
||||||
// remaining ones we will extend it.
|
// remaining ones we will extend it.
|
||||||
const Value SingleReplyMargin = Value(0x20);
|
const Value SingleReplyMargin = Value(0x20);
|
||||||
|
@ -1098,8 +1101,7 @@ namespace {
|
||||||
// Step 8. Null move search with verification search (is omitted in PV nodes)
|
// Step 8. Null move search with verification search (is omitted in PV nodes)
|
||||||
|
|
||||||
// Step 9. Internal iterative deepening
|
// Step 9. Internal iterative deepening
|
||||||
if ( UseIIDAtPVNodes
|
if ( depth >= IIDDepthAtPVNodes
|
||||||
&& depth >= 5*OnePly
|
|
||||||
&& ttMove == MOVE_NONE)
|
&& ttMove == MOVE_NONE)
|
||||||
{
|
{
|
||||||
search_pv(pos, ss, alpha, beta, depth-2*OnePly, ply, threadID);
|
search_pv(pos, ss, alpha, beta, depth-2*OnePly, ply, threadID);
|
||||||
|
@ -1408,8 +1410,10 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 9. Internal iterative deepening
|
// Step 9. Internal iterative deepening
|
||||||
if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly &&
|
if ( depth >= IIDDepthAtNonPVNodes
|
||||||
!isCheck && ss[ply].eval >= beta - IIDMargin)
|
&& ttMove == MOVE_NONE
|
||||||
|
&& !isCheck
|
||||||
|
&& ss[ply].eval >= beta - IIDMargin)
|
||||||
{
|
{
|
||||||
search(pos, ss, beta, depth/2, ply, false, threadID);
|
search(pos, ss, beta, depth/2, ply, false, threadID);
|
||||||
ttMove = ss[ply].pv[ply];
|
ttMove = ss[ply].pv[ply];
|
||||||
|
|
Loading…
Add table
Reference in a new issue