Null move: minimum depth

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
My doubts starts at d = 2. At depth 2 reducing with only 1 is too slow. When reducing with 2 at d=2 I have to do extensions or an expensive kingInCheck search. From d = 3 reducing with 2 seems acceptable. But position might still be zug zwang position.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

Also at d=3 a normal search with d=1 is not much to refute a bad move. d=2 is more.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

And there may be many positions at d <= 3 so big chance one is a zug zwang position.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

Henk wrote:And there may be many positions at d <= 3 so big chance one is a zug zwang position.
zugzwang is not very common when pieces are left, although they do happen. The idea is not trying to reach "perfection"... The idea is to reach a solution that is better in more cases than not, which makes it a winning idea. I'm using a really large R value today, 3 + a function based on remaining depth. Way back when, I used to use 2 + function of depth, but the function back then rarely produced a value > 1, which means I used r=2 or 3 generally.

Today, here's some output from a longish game on a fast machine:

Code: Select all

         30->   1&#58;03/50.62    0.36   12. O-O Qc7 13. c4 Bh6 14. Bxh6 Rxh6
                                     15. Kh1 Rh8 16. Rc1 O-O-O 17. f4 Ne4
                                     18. fxe5 Nxe5 19. c5 dxc5 20. Nxc5 Nxc5
                                     21. b4 Qd6 22. Rxc5+ Kb8 23. Qd4 Nd7
                                     24. Rcc1 Ne5 25. Rfd1 Rhe8 26. b5 Nc6
                                     27. bxc6 Rxe2 28. cxb7 Kxb7
        time=1&#58;03&#40;97%)  nodes=5036945344&#40;5.0B&#41;  fh1=90%  pred=11  nps=79.8M
        checks=71.2M  qchecks=96.1M  fp=1.5B  mcp=437.1M  reversible=1
        LMReductions&#58;  1/148.4M  2/91.2M  3/54.4M  4/21.6M  5/1.7M  6/33.9K
              7/306
        null-move &#40;R&#41;&#58;  3/175.0M  4/10.8M  5/247.3K  6/7.6K  7/169
        splits=648.9K&#40;203.4K&#41;  aborts=95.1K  joins=2.2M  data=29%&#40;29%)
Notice that R reached 7 plies in 169 positions. Notice that LMR hit 6 plies in 33.9K positions... All based on a 30 ply search.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

bob wrote:
hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
If I would read Nf7 (deadly fork) instead of Qg7# or a5a6( unstoppable pawn) or perhaps any other advantage or clear advantage then I don't see much difference. If that is true jumping to d=1 instead of q-search is better.
Or has this all to do (again) with reduction of tree size. Qg7# is a leave while other dangerous moves possibly not.
Last edited by Henk on Mon Sep 14, 2015 6:38 pm, edited 1 time in total.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

Henk wrote:
bob wrote:
hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
If I would read Nf7 (deadly fork) instead of Qg7# or a5a6( unstoppable pawn) then I don't see much difference. If that is true jumping to d=1 instead of q-search is better.
Checks are different. If you play Nxf7 I might be able to play Rhf8 and pin your knight on your king or queen. Etc. Where a check has to be answered RIGHT NOW.

a5-a6 is not a problem if your evaluation is reasonable. It will pick that up as a static evaluation term and handle it properly...

Again, you are thinking about this in the wrong way. It is not about catching EVERYTHING. It is about catching the things that are easiest to catch, or the things that are most important to catch. In chess. checks are a serious issue.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

bob wrote:
Henk wrote:
bob wrote:
hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
If I would read Nf7 (deadly fork) instead of Qg7# or a5a6( unstoppable pawn) then I don't see much difference. If that is true jumping to d=1 instead of q-search is better.
Checks are different. If you play Nxf7 I might be able to play Rhf8 and pin your knight on your king or queen. Etc. Where a check has to be answered RIGHT NOW.

a5-a6 is not a problem if your evaluation is reasonable. It will pick that up as a static evaluation term and handle it properly...

Again, you are thinking about this in the wrong way. It is not about catching EVERYTHING. It is about catching the things that are easiest to catch, or the things that are most important to catch. In chess. checks are a serious issue.
If king is good defended there might be many options to get out of check. Also Steinitz wrote something like "King is a strong piece".

But it might have something to do with average tree size.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

Henk wrote:
bob wrote:
Henk wrote:
bob wrote:
hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
If I would read Nf7 (deadly fork) instead of Qg7# or a5a6( unstoppable pawn) then I don't see much difference. If that is true jumping to d=1 instead of q-search is better.
Checks are different. If you play Nxf7 I might be able to play Rhf8 and pin your knight on your king or queen. Etc. Where a check has to be answered RIGHT NOW.

a5-a6 is not a problem if your evaluation is reasonable. It will pick that up as a static evaluation term and handle it properly...

Again, you are thinking about this in the wrong way. It is not about catching EVERYTHING. It is about catching the things that are easiest to catch, or the things that are most important to catch. In chess. checks are a serious issue.
If king is good defended there might be many options to get out of check. Also Steinitz wrote something like "King is a strong piece".

But it might have something to do with average tree size.
doesn't really matter how many options there are, ONE of the moves to escape check is forced, since you can't leave the king in check. That is quite unlike forks, skewers, x-ray attacks, etc, unless a fork/skewer hits the king of course.
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Null move: minimum depth

Post by Henk »

bob wrote:
Henk wrote:
bob wrote:
Henk wrote:
bob wrote:
hgm wrote:
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.
The problem that I found painful was a position with black king at g8, white pawn at f6 and white queen moves to h6. Null-move reduces depth to zero and enters q-search. No capture shows a problem, but if you do checking moves at least at the first ply, you find Qg7# and you don't fail high here thinking you are doing fine when you are dead lost.

The trick most of us used to use was to ensure one full ply of search after any null-move, hence the old "adaptive null-move" idea proposed by John Stanback, and then written up by Heinz. Once I added checks to first ply of q-search, that was no longer needed since I still see Qg7# and don't think that is a safe and good position.

The one ply of checks solved a lot of evils, some of which I didn't think about when doing this. But in Cray Blitz, we didn't see this problem since we had 6 plies of "tactical search" after the normal search, before the captures-only search. Fortunately, those included checks which addressed the null-move problem nicely.
If I would read Nf7 (deadly fork) instead of Qg7# or a5a6( unstoppable pawn) then I don't see much difference. If that is true jumping to d=1 instead of q-search is better.
Checks are different. If you play Nxf7 I might be able to play Rhf8 and pin your knight on your king or queen. Etc. Where a check has to be answered RIGHT NOW.

a5-a6 is not a problem if your evaluation is reasonable. It will pick that up as a static evaluation term and handle it properly...

Again, you are thinking about this in the wrong way. It is not about catching EVERYTHING. It is about catching the things that are easiest to catch, or the things that are most important to catch. In chess. checks are a serious issue.
If king is good defended there might be many options to get out of check. Also Steinitz wrote something like "King is a strong piece".

But it might have something to do with average tree size.
doesn't really matter how many options there are, ONE of the moves to escape check is forced, since you can't leave the king in check. That is quite unlike forks, skewers, x-ray attacks, etc, unless a fork/skewer hits the king of course.
If a very small search/evaluation would see 'this move is so strong that it ends the game' then there is no difference with a specialized search that sees 'this move gives a check mate'. But perhaps such a search/evaluation does not exist. I don't know.