I found this position :
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
n1N3br/2p1Bpkr/1pP2R1b/pP3Pp1/P5P1/1P1p4/p2P4/K7 w - - 0 1
It seems , at least for me, that its the Late Move Reduction that is the cause.
Any idea ?
Philippe
Moderator: Ras
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
What does that statement mean? The position is reachable from the starting position by a sequence of legal moves.
Code: Select all
info depth 7 score mate 2 nodes 682 nps 56833 time 12 pv e7a3 g7f6 a3b2
Excellent.lithander wrote: ↑Mon Nov 06, 2023 12:40 pm Interesting position!
Leorik takes >1B positions (1159831095) to find a mate in 11 at depth 41 and one iteration later it finds the mate in 2.
If I disable null-move pruning the search finds the mate quickly at depth 7.
I have code in place that disables null-move pruning in endgame positions but this positions is not recognized as being endgame. What works really well in this scenario is not to look at the available pieces but to count the number of legal moves and skip null-move pruning when the number of legal moves is below a certain threshold e.g. legal_moves < 6.
By tuning the legal move threshold just right it's possible to detect the mate in 2 super quickly in less than a thousand searched nodes.Code: Select all
info depth 7 score mate 2 nodes 682 nps 56833 time 12 pv e7a3 g7f6 a3b2
I think many engine devs have the same problem: A change that improves puzzle solving often hurts the general playing strength.
Code: Select all
Leorik 1.0
position fen n1N3br/2p1Bpkr/1pP2R1b/pP3Pp1/P5P1/1P1p4/p2P4/K7 w - - 0 1
go
info depth 1 score cp -566 nodes 96 nps 96000 time 1 pv a1a2
info depth 2 score cp 0 nodes 197 nps 24625 time 8 pv a1a2
info depth 3 score mate 2 nodes 583 nps 64777 time 9 pv e7a3 g7f6 a3b2
info depth 4 score mate 2 nodes 1616 nps 161600 time 10 pv e7a3 g7f6 a3b2