Code: Select all
ss->threatMove = (ss+1)->currentMove;
Code: Select all
ss->threatMove = (ss+1)->bestMove;
I think the function: connected_threat(pos, move, ss->threatMove) is not able to test possible to reject moves by futility pruning (move count based pruning) in a good way.
I tested it in 3 example positions and received results (wrong pruning means that the better move was rejected:
[d] rnbq2k1/pp2brpp/3p4/1B2n3/3NP3/2N5/PPP3PP/R1BQK2R w KQ –
Code: Select all
Depth 13
Nodes: 2343784
Nodes/second: 240388
Best move: Rf1
Ponder move: Bf6
futility pruning nodes: 205437
wrong pruning: 18523
Code: Select all
Depth 16
Nodes: 3387231
Nodes/second: 320214
Best move: Rd6
Ponder move: Rb8
futility pruning nodes: 369596
wrong pruning: 31932
Code: Select all
Depth 20
Nodes: 3257640
Nodes/second: 501175
Best move: Ra5+
Ponder move: Ke6
futility pruning nodes: 312898
wrong pruning: 20118
Maybe, the following 3 things could help to get a better result:
threat mate variant instead of mate threat in one move,
strong threat (nullValue < alpha) and use of margin.