Null move: minimum depth

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Null move: minimum depth

Post by Daniel Anulliero »

Henk wrote:Depth is a parameter of search. Depth has value zero near the leaves of the search tree. It has maximum value at the root node. ply count is the length of a path in the search tree.
I understood that since long lol
My question was : do you use ply or depth in nulmove validity test ?
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Null move: minimum depth

Post by Joerg Oster »

Daniel Anulliero wrote:
Henk wrote:Depth is a parameter of search. Depth has value zero near the leaves of the search tree. It has maximum value at the root node. ply count is the length of a path in the search tree.
I understood that since long lol
My question was : do you use ply or depth in nulmove validity test ?
You must use depth. Something like
depth >= 3

OTOH, it might be worth trying something like
ply > iteration / 5
to make sure, that at higher depths (iterations) at least some moves
are made before allowing a null move.
Jörg Oster
flok

Re: Null move: minimum depth

Post by flok »

I wonder: what gain can I expect?

I tried the following: I calculated how long it takes to reach a depth, in this case 6. I repeated that 25 times and then (after throwing away the two lowest and two biggest values) calculated the average stddef.

Without null move: 1902.19 (avg) 81.24 (sd)
With null move: 2048.38 (avg) 141.34 (sd)

So comparing w with w/o gives a 7% difference. From other experiments I saw almost 10% difference for the same experiment (when for example running the same run-25-x twice) so I call that insignificant.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

flok wrote:I wonder: what gain can I expect?

I tried the following: I calculated how long it takes to reach a depth, in this case 6. I repeated that 25 times and then (after throwing away the two lowest and two biggest values) calculated the average stddef.

Without null move: 1902.19 (avg) 81.24 (sd)
With null move: 2048.38 (avg) 141.34 (sd)

So comparing w with w/o gives a 7% difference. From other experiments I saw almost 10% difference for the same experiment (when for example running the same run-25-x twice) so I call that insignificant.
For a pretty new program, null move ought to be worth 80-100 Elo, if done correctly. But for a 6 ply search, it is not going to do very much. Is it really taking you that long to do a 6 ply search??? I can't even time a 6 ply search it completes so quickly..
flok

Re: Null move: minimum depth

Post by flok »

bob wrote:For a pretty new program, null move ought to be worth 80-100 Elo, if done correctly. But for a 6 ply search, it is not going to do very much. Is it really taking you that long to do a 6 ply search??? I can't even time a 6 ply search it completes so quickly..

Code: Select all

info depth 1 seldepth 1 score cp 40 time 1 nodes 41 pv e2e4
info depth 2 seldepth 2 score cp 0 time 3 nodes 175 pv e2e4 e7e5 f1b5
info depth 3 seldepth 3 score cp 43 time 13 nodes 1404 pv d2d4 e7e6 d1d3
info depth 4 seldepth 4 score cp 4 time 64 nodes 7548 pv e2e3 g8f6 b1c3 d7d5
info depth 5 seldepth 5 score cp 30 time 341 nodes 61882 pv d2d4 e7e6 e2e4 f8b4 c2c3
info depth 6 seldepth 6 score cp 2 time 2112 nodes 334563 pv b1c3 d7d5 e2e3 d8d6 d1h5
info depth 7 seldepth 7 score cp 28 time 12887 nodes 2340160 pv b1c3 d7d5 e2e3 g8f6 d1f3 b8c6 f1b5 f6d5
So depth 6 is 334k nodes in 2112ms, so 158k nodes per second (on an "Intel(R) Celeron(R) CPU 1037U @ 1.80GHz").
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob »

flok wrote:
bob wrote:For a pretty new program, null move ought to be worth 80-100 Elo, if done correctly. But for a 6 ply search, it is not going to do very much. Is it really taking you that long to do a 6 ply search??? I can't even time a 6 ply search it completes so quickly..

Code: Select all

info depth 1 seldepth 1 score cp 40 time 1 nodes 41 pv e2e4
info depth 2 seldepth 2 score cp 0 time 3 nodes 175 pv e2e4 e7e5 f1b5
info depth 3 seldepth 3 score cp 43 time 13 nodes 1404 pv d2d4 e7e6 d1d3
info depth 4 seldepth 4 score cp 4 time 64 nodes 7548 pv e2e3 g8f6 b1c3 d7d5
info depth 5 seldepth 5 score cp 30 time 341 nodes 61882 pv d2d4 e7e6 e2e4 f8b4 c2c3
info depth 6 seldepth 6 score cp 2 time 2112 nodes 334563 pv b1c3 d7d5 e2e3 d8d6 d1h5
info depth 7 seldepth 7 score cp 28 time 12887 nodes 2340160 pv b1c3 d7d5 e2e3 g8f6 d1f3 b8c6 f1b5 f6d5
So depth 6 is 334k nodes in 2112ms, so 158k nodes per second (on an "Intel(R) Celeron(R) CPU 1037U @ 1.80GHz").
For me, a 6 ply search takes a whopping 3.6K nodes total. With null move disabled, it doubles the nodes to 6.1K. If I also disable LMR it jumps to 41K nodes. You are somehow WAY larger.
Joost Buijs
Posts: 1564
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Null move: minimum depth

Post by Joost Buijs »

flok wrote:
bob wrote:For a pretty new program, null move ought to be worth 80-100 Elo, if done correctly. But for a 6 ply search, it is not going to do very much. Is it really taking you that long to do a 6 ply search??? I can't even time a 6 ply search it completes so quickly..

Code: Select all

info depth 1 seldepth 1 score cp 40 time 1 nodes 41 pv e2e4
info depth 2 seldepth 2 score cp 0 time 3 nodes 175 pv e2e4 e7e5 f1b5
info depth 3 seldepth 3 score cp 43 time 13 nodes 1404 pv d2d4 e7e6 d1d3
info depth 4 seldepth 4 score cp 4 time 64 nodes 7548 pv e2e3 g8f6 b1c3 d7d5
info depth 5 seldepth 5 score cp 30 time 341 nodes 61882 pv d2d4 e7e6 e2e4 f8b4 c2c3
info depth 6 seldepth 6 score cp 2 time 2112 nodes 334563 pv b1c3 d7d5 e2e3 d8d6 d1h5
info depth 7 seldepth 7 score cp 28 time 12887 nodes 2340160 pv b1c3 d7d5 e2e3 g8f6 d1f3 b8c6 f1b5 f6d5
So depth 6 is 334k nodes in 2112ms, so 158k nodes per second (on an "Intel(R) Celeron(R) CPU 1037U @ 1.80GHz").
It seems a bit slow.
I don't know the performance of this processor, I guess it's an Ivy-Bridge.
Most engines I know run about 1 mnps on a processor like this.
It looks as if you don't use any pruning at all, 334k nodes is al lot for a 6 ply search.
My engine (which has not a very good BF either) does about 8k nodes on a 6 ply search from the initial position.
flok

Re: Null move: minimum depth

Post by flok »

bob wrote:For me, a 6 ply search takes a whopping 3.6K nodes total. With null move disabled, it doubles the nodes to 6.1K. If I also disable LMR it jumps to 41K nodes. You are somehow WAY larger.
Maybe because I don't do futillity pruning etc? I don' know.

What I do is:
- null move
- transposition table
- move ordering: tt hit, best-node-sibbling-move, pv-move
flok

Re: Null move: minimum depth

Post by flok »

Joost Buijs wrote:
flok wrote:So depth 6 is 334k nodes in 2112ms, so 158k nodes per second (on an "Intel(R) Celeron(R) CPU 1037U @ 1.80GHz").
It seems a bit slow.
I don't know the performance of this processor, I guess it's an Ivy-Bridge.
Most engines I know run about 1 mnps on a processor like this.
I think because I'm not using bitboards etc.
It looks as if you don't use any pruning at all, 334k nodes is al lot for a 6 ply search.
My engine (which has not a very good BF either) does about 8k nodes on a 6 ply search from the initial position.
What is the low hanging fruit for pruning?

I do have a +/- 20 elo points gain from the version I combatted with at the csvn tournament. Not too bad!
mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Null move: minimum depth

Post by mvk »

flok wrote:
bob wrote:For me, a 6 ply search takes a whopping 3.6K nodes total. With null move disabled, it doubles the nodes to 6.1K. If I also disable LMR it jumps to 41K nodes. You are somehow WAY larger.
Maybe because I don't do futillity pruning etc? I don' know.

What I do is:
- null move
- transposition table
- move ordering: tt hit, best-node-sibbling-move, pv-move
Similar to Floyd, and it needs 7193 nodes for the 7 ply search from the starting position. Also no futilty. And I expect about 500knps on your hardware, without any caching or speed enahncements at all. It is a quite minimalistic program, so you might want to take a peek.
[Account deleted]