About move ordering and TT hitrate

Discussion of chess software programming and technical issues.

Moderator: Ras

diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: About move ordering and TT hitrate

Post by diep »

JVMerlino wrote: Fri Oct 29, 2021 6:17 am
Joost Buijs wrote: Thu Oct 28, 2021 5:20 pm You don't need special evaluation features to solve fine70. It can be solved on pure tactical grounds but you have to disable NMP (like most engines do when there are only pawns and kings on the board).
Ah yes, this is critical. If I always allow null move pruning, Myrddin jumps to depth 66 in three seconds, but with a draw score and the move Kb2. Depth doesn't mean anything if you've selected the wrong move. :) So I disable NMP if the side to move has only pawns.
66 plies really? Without nullmove i'm pretty sure i could reach that quickly.

Mainline Kb1 is here at 24 plies +3.2 after in total 922776 nodes searched. That's single core 2012 version which has some bugs in hashtable - especially in the update of it. Bugs as in: not great for branching factor - not like crashing bugs.

Interestingly at 23 plies Kb1 already gave a fail high but obviously the research done was not so great :)
JVMerlino
Posts: 1404
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: About move ordering and TT hitrate

Post by JVMerlino »

diep wrote: Fri Oct 29, 2021 11:10 pm
JVMerlino wrote: Fri Oct 29, 2021 6:17 am
Joost Buijs wrote: Thu Oct 28, 2021 5:20 pm You don't need special evaluation features to solve fine70. It can be solved on pure tactical grounds but you have to disable NMP (like most engines do when there are only pawns and kings on the board).
Ah yes, this is critical. If I always allow null move pruning, Myrddin jumps to depth 66 in three seconds, but with a draw score and the move Kb2. Depth doesn't mean anything if you've selected the wrong move. :) So I disable NMP if the side to move has only pawns.
66 plies really? Without nullmove i'm pretty sure i could reach that quickly.

Mainline Kb1 is here at 24 plies +3.2 after in total 922776 nodes searched. That's single core 2012 version which has some bugs in hashtable - especially in the update of it. Bugs as in: not great for branching factor - not like crashing bugs.

Interestingly at 23 plies Kb1 already gave a fail high but obviously the research done was not so great :)
To compare for clarity:
Myrddin, single core, with code to avoid null move if there are only pawns, finds Kb1 at depth 18 and reaches depth 43 in three seconds. The eval at that point is +9.92.
With null move always enabled, it stays on Kb2 with a draw score and reaches depth 66 in three seconds.
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: About move ordering and TT hitrate

Post by diep »

JVMerlino wrote: Sun Oct 31, 2021 5:17 am
diep wrote: Fri Oct 29, 2021 11:10 pm
JVMerlino wrote: Fri Oct 29, 2021 6:17 am
Joost Buijs wrote: Thu Oct 28, 2021 5:20 pm You don't need special evaluation features to solve fine70. It can be solved on pure tactical grounds but you have to disable NMP (like most engines do when there are only pawns and kings on the board).
Ah yes, this is critical. If I always allow null move pruning, Myrddin jumps to depth 66 in three seconds, but with a draw score and the move Kb2. Depth doesn't mean anything if you've selected the wrong move. :) So I disable NMP if the side to move has only pawns.
66 plies really? Without nullmove i'm pretty sure i could reach that quickly.

Mainline Kb1 is here at 24 plies +3.2 after in total 922776 nodes searched. That's single core 2012 version which has some bugs in hashtable - especially in the update of it. Bugs as in: not great for branching factor - not like crashing bugs.

Interestingly at 23 plies Kb1 already gave a fail high but obviously the research done was not so great :)
To compare for clarity:
Myrddin, single core, with code to avoid null move if there are only pawns, finds Kb1 at depth 18 and reaches depth 43 in three seconds. The eval at that point is +9.92.
With null move always enabled, it stays on Kb2 with a draw score and reaches depth 66 in three seconds.
How many nodes?

Note that i would guess reductions cause Diep to need more plies than 18.
JVMerlino
Posts: 1404
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: About move ordering and TT hitrate

Post by JVMerlino »

diep wrote: Fri Nov 05, 2021 12:42 pm
JVMerlino wrote: Sun Oct 31, 2021 5:17 am To compare for clarity:
Myrddin, single core, with code to avoid null move if there are only pawns, finds Kb1 at depth 18 and reaches depth 43 in three seconds. The eval at that point is +9.92.
With null move always enabled, it stays on Kb2 with a draw score and reaches depth 66 in three seconds.
How many nodes?

Note that i would guess reductions cause Diep to need more plies than 18.
Unchanged null move code:

Code: Select all

18     70      4        38571 a1b2 a7a8 b2c2 a8b8 c2d3 b8c7 d3c4 (838 KNPS)
18     95      4        39460 a1b1! a7b7 (857 KNPS)
18     90      4        43166 a1b1 a7a8 b1b2 a8a7 b2b3 a7b7 (938 KNPS)
...
43   1103    301     11685134 a1b1! (3875 KNPS)
43   1167    320     12222962 a1b1! (3816 KNPS)
43   1247    334     12657429 a1b1! (3786 KNPS)
43   1343    371     13592899 a1b1! (3655 KNPS)
43   1455    406     14578048 a1b1! (3588 KNPS)
43   1583    443     15667704 a1b1! (3531 KNPS)
43   1727    479     16686612 a1b1! (3479 KNPS)
43   1365   1087     40623982 a1b1 a7b6 b1c2 b6c7 c2d3 c7b7 d3e3 b7c7 e3f3 c7d7 f3g3 d7e7 g3h4 e7f7 h4g5 f7g7 g5f5 g7f7 (3735 KNPS)
Disabling the code to avoid null move:

Code: Select all

65      0    287      6251806 a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3d2 c7d7 d2e3 d7d8 e3f3 d8e7 f3g3 e7f6 g3h4 f6g6 h4h3 g6h5 h3g3 h5g6 g3h4 g6h6 h4h3 h6g6 h3h4 (2010 KNPS)
66      0    311      6259072 a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3d2 c7d7 d2e3 d7d8 e3f3 d8e7 f3g3 e7f6 g3h4 f6g6 h4h3 g6h5 h3g3 h5g6 g3h4 g6h6 h4h3 h6g6 h3h4 (2012 KNPS)
67      0    364      7406625 a1b2 a7b6 b2c3 b6c7 c3c4 c7b6 c4d3 b6c7 d3d2 c7d7 d2e3 d7d8 e3f3 d8e7 f3g3 e7f6 g3h4 f6g6 h4h3 g6h5 h3g3 h5g6 g3h4 g6h6 h4h3 h6g6 h3h4 (2034 KNPS)