Bonus for restricting opponent's piece moves

STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 51883 W: 11297 L: 10915 D: 29671
http://tests.stockfishchess.org/tests/view/5bf1e2ee0ebc595e0ae3cacd

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 15859 W: 2752 L: 2565 D: 10542
http://tests.stockfishchess.org/tests/view/5bf337980ebc5902bcecbf62

Notes:

(1) The bonus value has not been carefully tested, so it may be possible
to find slightly better values.

(2) Plan is to now try adding similar restriction for pawns. I wanted to
include that as part of this pull request, but I was advised to do it as
two separate pull requests. STC is currently running here, but may not add
enough value to pass green.

Bench: 3679086
This commit is contained in:
xoto10
2018-11-20 07:45:00 +01:00
committed by Stéphane Nicolet
parent cf5d683408
commit 3925750945
3 changed files with 13 additions and 5 deletions
+3 -3
View File
@@ -85,10 +85,10 @@ namespace {
return d > 17 ? 0 : 29 * d * d + 138 * d - 134;
}
// Add a small random component to draw evaluations to keep search dynamic
// Add a small random component to draw evaluations to keep search dynamic
// and to avoid 3fold-blindness.
Value value_draw(Depth depth, Thread* thisThread) {
return depth < 4 ? VALUE_DRAW
return depth < 4 ? VALUE_DRAW
: VALUE_DRAW + Value(2 * (thisThread->nodes.load(std::memory_order_relaxed) % 2) - 1);
}
@@ -599,7 +599,7 @@ namespace {
if ( Threads.stop.load(std::memory_order_relaxed)
|| pos.is_draw(ss->ply)
|| ss->ply >= MAX_PLY)
return (ss->ply >= MAX_PLY && !inCheck) ? evaluate(pos)
return (ss->ply >= MAX_PLY && !inCheck) ? evaluate(pos)
: value_draw(depth, pos.this_thread());
// Step 3. Mate distance pruning. Even if we mate at the next move our score