Null move in TT

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
lauriet
Posts: 196
Joined: Sun Nov 03, 2013 8:32 am
Contact:

Null move in TT

Post by lauriet » Thu May 14, 2020 12:17 am

Null move causes a beta cut.
Can I save anything to the TT ?
What move could you save ?

bob
Posts: 20885
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Null move in TT

Post by bob » Thu May 14, 2020 1:59 am

"zero" (or whatever you use for the null move. You can't get a best move for fail low positions, so you should already handle this for all fail-low positions. For the others, just stick in the "null move" and results. If you encounter this position again, you'd prefer to get the same result from the TT entry rather than having to a null-move search again...

Remember this golden rule. ANYTIME you get a useful result from any sort of search, store that in the TT. If you reach the same position with sufficient depth again, why would you not want to just use the result rather than expending effort. This applies to ANY type of position you reach and produce a useful result.

AndrewGrant
Posts: 558
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: Null move in TT

Post by AndrewGrant » Thu May 14, 2020 4:45 am

lauriet wrote:
Thu May 14, 2020 12:17 am
Null move causes a beta cut.
Can I save anything to the TT ?
What move could you save ?
I'm not a big fan of saving the results of pruning methods into the table. I prefer to leave open the possibility that if the position is seen again, that either the search will again confirm the prune, or possibly changes in the TT, or in the history scores, or in killers/counter moves, will cause the prune to fail.

Henk
Posts: 6353
Joined: Mon May 27, 2013 8:31 am

Re: Null move in TT

Post by Henk » Thu May 14, 2020 10:35 am

bob wrote:
Thu May 14, 2020 1:59 am
"zero" (or whatever you use for the null move. You can't get a best move for fail low positions, so you should already handle this for all fail-low positions. For the others, just stick in the "null move" and results. If you encounter this position again, you'd prefer to get the same result from the TT entry rather than having to a null-move search again...

Remember this golden rule. ANYTIME you get a useful result from any sort of search, store that in the TT. If you reach the same position with sufficient depth again, why would you not want to just use the result rather than expending effort. This applies to ANY type of position you reach and produce a useful result.
best move makes no sense for chess because it uses statistics and an ill defined horizon. So best move is best statistical move or best subjective move.

Don't understand why there would be a 'best move' when failing high. Especially when upperbound of the search window has a low value. In that case best move is only one of possibly many 'refuting moves'.

O wait it is just a way of speeding up the search.

mjlef
Posts: 1448
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Null move in TT

Post by mjlef » Thu May 14, 2020 4:06 pm

lauriet wrote:
Thu May 14, 2020 12:17 am
Null move causes a beta cut.
Can I save anything to the TT ?
What move could you save ?
You can store it, but at some risk. It would be stored with a value of beta or maybe they null move search result which could be much higher, and as a lower bound. The risk is that if a new beta comes along due to a change at the root of alpha, assuming it will still fail high. All the strong programs rose a lot of moves and can miss things. So just run a lot of games and tune as needed

bob
Posts: 20885
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Null move in TT

Post by bob » Thu May 14, 2020 8:35 pm

How is there a risk? A null move failed at the current position with some depth remaining (draft) value.

You get to the same position later, with either the same (or lower) draft. Why would the current position not do EXACTLY the same thing as the previous identical position? Unless you have a bug.

As far as which move to save, save "no move". The null failed high previously. If it fails high now, you are already done and need no "best move." If it doesn't fail high, then you have no suggested move to try, so move on to your primary search ordering strategy...

User avatar
hgm
Posts: 24441
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move in TT

Post by hgm » Thu May 14, 2020 9:39 pm

You can just make the move in the TT entry 'invalid'. If the draft of the entry was not enough for a hash cutoff, the search would start with a null-move anyway. So there is no need to tell any prober that he has to start searching a null move first.

In fact you can detect the case by the fact that the score was a lower bound, but you had no hash move. If you have no move because of a fail low you would have had an upper bound.

If you normally would not try null move when eval < beta, you could still force the null move when the TT score lower-bound is above beta.

Post Reply