Question on Null Move Pruning
Moderators: hgm, Rebel, chrisw
-
- Posts: 12
- Joined: Mon Aug 07, 2017 5:24 pm
- Location: Los Angeles
Question on Null Move Pruning
Why do we search null moves with null windows? Is it because if a node is passed the null window [alpha, alpha+1] and fails low, then our position is so good that no move can refute the null move?
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Question on Null Move Pruning
Because null window is faster, and is enough to provide information we need. When we make a null move, opponent gets huge odds. It does not matter if, given that odds, he gains a queen, or just a small positional advantage, it does not matter how far above beta he can get, so bigger window is not necessary. Tee only thing that matters is when he cannot beat beta. Null window is enough to recognize this.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Question on Null Move Pruning
The narrower the window, the more cut-nodes you will have, and the easier it will be to find the cut-moves in those, all lowering the required number of nodes. So never ask the search for more information than you need. In null-move pruning you only want to know whether the null move fails high or not. You won't use the score itself either way.
-
- Posts: 892
- Joined: Sun Nov 19, 2006 9:16 pm
- Location: Russia
Re: Question on Null Move Pruning
Null move heuristic should not be done on PV-nodes. To my limited understanding all non-PV nodes in PVS are searched with null-window.
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Question on Null Move Pruning
I even don't understand why no null move in PV nodes. I can understand first move of PV must no be null move for that is an invalid move.Aleks Peshkov wrote:Null move heuristic should not be done on PV-nodes. To my limited understanding all non-PV nodes in PVS are searched with null-window.
-
- Posts: 1494
- Joined: Thu Mar 30, 2006 2:08 pm
Re: Question on Null Move Pruning
You can use nullmove on PV nodes, provided beta is less than whatever is infinity for your program. It has not tested well in the past.Aleks Peshkov wrote:Null move heuristic should not be done on PV-nodes. To my limited understanding all non-PV nodes in PVS are searched with null-window.
-
- Posts: 1494
- Joined: Thu Mar 30, 2006 2:08 pm
Re: Question on Null Move Pruning
You probably mean [beta-1, beta]. Null move saves search nodes by assuming a score is so good that if we let the opponent move twice in a row and it cannot get the score below beta, then the present node is most likely a fail high node. In non-PV nodes that is the same as [alpha, alpha+1], but in PV nodes it is not, of course.jfern2011 wrote:Why do we search null moves with null windows? Is it because if a node is passed the null window [alpha, alpha+1] and fails low, then our position is so good that no move can refute the null move?
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Question on Null Move Pruning
Indeed, but it is the null-move reply that we call Search() for, and I suppose he is referring to the argumentsof that call.
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: Question on Null Move Pruning
Alpha & Beta swapping and negation has always been confusing to me. Am I doing it right or wrong. The way I do it does not match any of the examples given.
Null Move
Search, Zero Window
Null Move
Code: Select all
MakeMove(&nullMove);
score = -Search(-beta, -beta + 1, depth - 1 - r);
TakeBack();
if(score >= beta) {
PosStore(beta, depth, LOWER, &nullMove);
return beta;
}
Code: Select all
score = -Search(-alpha - 1, -alpha, depth - lmr);
if(score > alpha)
score = -Search(-beta, -alpha, depth - 1);
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Question on Null Move Pruning
This is wrong. But you get away with it if beta = alpha+1, as it would be in a non-PV PVS node.