Search checking captures early in drop variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 8 Nov 2019 15:29:36 +0000 (16:29 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 8 Nov 2019 15:29:36 +0000 (16:29 +0100)
crazyhouse STC (yellow)
LLR: -2.96 (-2.94,2.94) [0.00,10.00]
Total: 19119 W: 9373 L: 9198 D: 548
http://www.variantfishtest.org:6543/tests/view/5d93b6486e23db3768ec0881

crazyhouse LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5822 W: 2894 L: 2711 D: 217
http://www.variantfishtest.org:6543/tests/view/5d94cc056e23db3768ec0892

crazyhouse VLTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 10293 W: 5048 L: 4802 D: 443
http://www.variantfishtest.org:6543/tests/view/5d97772d6e23db3768ec0898

src/movepick.cpp

index 7f35880..40ec0a8 100644 (file)
@@ -179,7 +179,7 @@ top:
 
   case GOOD_CAPTURE:
       if (select<Best>([&](){
-                       return pos.see_ge(*cur, Value(-55 * cur->value / 1024)) || pos.must_capture() ?
+                       return pos.see_ge(*cur, Value(-55 * cur->value / 1024 - 500 * (pos.captures_to_hand() && pos.gives_check(*cur)))) || pos.must_capture() ?
                               // Move losing capture to endBadCaptures to be tried later
                               true : (*endBadCaptures++ = *cur, false); }))
           return *(cur - 1);