I don't know what to call it
Moderator: Ras
-
- Posts: 965
- Joined: Fri Aug 21, 2020 1:25 am
- Location: Planet Earth, Sol system
- Full name: Michael J Sherwin
I don't know what to call it
Maybe a reversed polarity null move. The idea is if I make a move and my position is so bad that it is <= alpha and I pass for the opponent, then do a null move search and the score is still <= alpha then prune. Wouldn't it save some time to do it like this?
-
- Posts: 28353
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: I don't know what to call it
Doing a null move/turn pass for both yourself and the opponent is like doing no null move at all, right? So the search you do after this is guaranteed to get the same result (<= alpha) as you already had.
-
- Posts: 965
- Joined: Fri Aug 21, 2020 1:25 am
- Location: Planet Earth, Sol system
- Full name: Michael J Sherwin
Re: I don't know what to call it
If the reverse polarity null move is done the normal null move is not done. It is just a way of doing null move sooner?
for each move {
if eval <= alpha {
do null move search
if null mov search <= alpha return alpha
call negamax -b -a depth - 1
}
}
for each move {
if eval <= alpha {
do null move search
if null mov search <= alpha return alpha
call negamax -b -a depth - 1
}
}
-
- Posts: 2695
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: I don't know what to call it
Lets assume the opponent has just captured a knight, which is why eval is below alpha. It's our turn, and we can capture the opponent's queen, which would get us above alpha. With your null move approach, we omit our queen capture, and the opponent moves his queen to safety. We would falsely return alpha here.Mike Sherwin wrote: ↑Sat May 13, 2023 6:37 amIf the reverse polarity null move is done the normal null move is not done. It is just a way of doing null move sooner?
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 965
- Joined: Fri Aug 21, 2020 1:25 am
- Location: Planet Earth, Sol system
- Full name: Michael J Sherwin
Re: I don't know what to call it
I mistakenly put return alpha when I should have just put continue. Though in my move generator all the moves are scored when generated. Therefore the queen captures etc. would be tried first. Then after so many tries we can LMR and return alpha anyways.
-
- Posts: 2695
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: I don't know what to call it
If you are close to the leaves of the search tree and much below alpha, you can discard moves that have no hope of getting above alpha, i.e. non-captures/promotions/killers that don't give check. That's not a null move, however, but futility pruning: https://www.chessprogramming.org/Futility_PruningMike Sherwin wrote: ↑Sat May 13, 2023 5:15 pmI mistakenly put return alpha when I should have just put continue.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 28353
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: I don't know what to call it
It is still not clear to me what you propose. Do you make 'each' move, and if so, where? If you do the null move after making a move that does not raise the score above alpha, it is exactly the same as doing null move in the child when eval is above beta. It doesn't alter the search tree, but only how you slice it up into instances of Search(). Often it is more efficient to do this in other ways than the 'text-book examples'. E.g. probing the TT can be profitably be done in the parent, before making the move. And ordering the research for PVS or LMR can be more efficiently done in the child, to avoid having to generate the moves again.
-
- Posts: 965
- Joined: Fri Aug 21, 2020 1:25 am
- Location: Planet Earth, Sol system
- Full name: Michael J Sherwin
Re: I don't know what to call it
You correctly understand. Do null move in the parent to avoid an unnecessary call into the child.hgm wrote: ↑Sun May 14, 2023 11:21 am It is still not clear to me what you propose. Do you make 'each' move, and if so, where? If you do the null move after making a move that does not raise the score above alpha, it is exactly the same as doing null move in the child when eval is above beta. It doesn't alter the search tree, but only how you slice it up into instances of Search(). Often it is more efficient to do this in other ways than the 'text-book examples'. E.g. probing the TT can be profitably be done in the parent, before making the move. And ordering the research for PVS or LMR can be more efficiently done in the child, to avoid having to generate the moves again.