mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Use zero null move margin when depth < 4 * OnePly
This is because when we are below 4 * OnePly, the null move will directly jump to qsearch and if we are below beta, our opponent is above beta and will get immediate stand pat cut off. So basically this patch is just optimizing away useless evaluation calls. dbg_hit_on() runs show that this heuristic is correct >99% of cases. Transposition table probably causes some inaccurary? After 1148 games on QUAD mod-orig: 583 - 565 +5 elo Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
0895f1ac71
commit
a093f33154
1 changed files with 1 additions and 1 deletions
|
@ -1334,7 +1334,7 @@ namespace {
|
|||
&& !isCheck
|
||||
&& !value_is_mate(beta)
|
||||
&& ok_to_do_nullmove(pos)
|
||||
&& staticValue >= beta - NullMoveMargin)
|
||||
&& staticValue >= beta - (depth >= 4 * OnePly ? NullMoveMargin : 0))
|
||||
{
|
||||
ss[ply].currentMove = MOVE_NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue