History heuristic -- should it do THIS?

Discussion of chess software programming and technical issues.

Moderator: Ras

JVMerlino
Posts: 1407
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

History heuristic -- should it do THIS?

Post by JVMerlino »

My understanding of the purpose of the history heuristic is that it is primarily for ordering quiet moves, and that is indeed how it is implemented in my mediocre engine, Myrddin.

However, I decided to try turning it off. The results are unclear as far as ELO gain, but there was one test position in which I got very surprising results.

Here is the position.

[d]3r1r1k/1b4pp/ppn1p3/4Pp1R/Pn5P/3P4/4QP2/1qB1NKR1 w - -

The best move is Rxh7 and this will be easy for just about any engine to find in at most a few seconds. The goal, though, is to show a score for White that is winning. Again, many engines will likely accomplish this in a few seconds.

Here's Myrddin's output with history ON:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      0       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 
 1  -667      1       302 h5g5 b1c1 g5g7 (20 KNPS)
 1  -551      1       381 c1g5 g7h6 (25 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (41 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3102 h5g5? b1c1 (66 KNPS)
 4  -708      4      3331 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -701      6      4276 c1g5 d8d3 g1g3 c6d4 e2e5 e5d3 (68 KNPS)
 4  -693      6      4604 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (74 KNPS)
 4  -684      6      5845 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (94 KNPS)
 5  -707      9      9494 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (102 KNPS)
 5  -703      9     11681 h5g5 b1c1 g5g7 c6d4 e2h5 d4e2 (125 KNPS)
 5  -693     10     14587 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (133 KNPS)
 5  -660     12     24215 c1e3 b4d3 h5g5 g7g6 e3b6 d3e1 b6d8 f8d8 (193 KNPS)
 6  -672     15     36554 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (234 KNPS)
 7  -672     23     65334 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (279 KNPS)
 7  -635     26     76317 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (287 KNPS)
 8  -669     31     99035 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 (317 KNPS)
 9  -663     48    181124 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 h8g7 (374 KNPS)
10  -646     84    369025 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 d4e5 (438 KNPS)
11  -641    138    668361 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 d3d7 f1e1 f8d8 b2c3 (481 KNPS)
12  -650    248   1235704 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (498 KNPS)
12  -601    251   1256263 h5h7! b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (500 KNPS)
12  -491    254   1272524 h5h7! (500 KNPS)
12     0    265   1358650 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (512 KNPS)
13     0    293   1539714 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (524 KNPS)
14     0    393   2173762 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (552 KNPS)
15     0    502   2966992 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 (590 KNPS)
16    40    625   3743346 h5h7! (598 KNPS)
16   150    663   3957996 h5h7! (596 KNPS)
16 32732    739   4511094 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (610 KNPS)
17 32732    865   5590386 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (645 KNPS)
18 32732   1063   7378612 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (693 KNPS)
You can see that, not only does Myrddin show a winning score for White, it actually announces mate in 23 in 7.4 seconds. For those who care, it is actually a mate in 18.

Now, here's the output with history OFF:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      1       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (10 KNPS)
 1  -667      1       302 h5g5 b1c1 g5g7 (18 KNPS)
 1  -551      1       381 c1g5 g7h6 (23 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (39 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3104 h5g5? b1c1 (66 KNPS)
 4  -708      4      3333 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -693      6      4033 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (65 KNPS)
 4  -684      6      5274 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (85 KNPS)
 5  -707      7      9227 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (118 KNPS)
 5  -693      7     10885 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (139 KNPS)
 5  -684     12     20832 c1e3 b4d3 e3b6 d3e1 b6d8 f8d8 (166 KNPS)
 6  -672     15     36663 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (235 KNPS)
 7  -672     21     67036 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (307 KNPS)
 7  -635     25     75226 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (300 KNPS)
 8  -669     29    100109 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 b2e5 (338 KNPS)
 9  -663     46    184625 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 f5g4 (394 KNPS)
10  -646     82    377892 e2b2 b1b2 c1b2 d8d5 f1e2 c6e5 h5g5 f8g8 d3d4 h7h6 (456 KNPS)
11  -648    134    678418 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (505 KNPS)
11  -606    137    690884 h5h7! b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (503 KNPS)
11  -496    140    695629 h5h7! (495 KNPS)
11     0    145    741667 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (511 KNPS)
12     0    157    835178 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (529 KNPS)
13     0    177    988654 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (555 KNPS)
14     0    288   1721951 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (596 KNPS)
15     0    380   2421279 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (636 KNPS)
16     0    719   4736837 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (658 KNPS)
17     0   1847  11781797 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (637 KNPS)
18     0   2361  15451519 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (654 KNPS)
19     0   3272  21921457 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (669 KNPS)
20    40   5383  36306317 h5h7! (674 KNPS)
20   150   5658  38217252 h5h7! (675 KNPS)
20 32732   5924  40688742 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (686 KNPS)
21 32732   7104  50174156 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (706 KNPS)
22 32732   8679  63712508 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (734 KNPS)
23 32732  11567  88105359 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (761 KNPS)
As you can see, the time to find Rxh7 is actually SHORTER (just over half the time as well as one ply sooner), but the time to find a winning score (and announce mate) is 8 times LONGER and 4 ply later.

I just don't understand how, in this very tactical position, where almost every move by White is a capture and/or a check, removing the history ordering of quiet moves can have that much impact. Can somebody enlighten this feeble mind, please?

Many thanks in advance,

jm
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: History heuristic -- should it do THIS?

Post by michiguel »

JVMerlino wrote:My understanding of the purpose of the history heuristic is that it is primarily for ordering quiet moves, and that is indeed how it is implemented in my mediocre engine, Myrddin.

However, I decided to try turning it off. The results are unclear as far as ELO gain, but there was one test position in which I got very surprising results.

Here is the position.

[d]3r1r1k/1b4pp/ppn1p3/4Pp1R/Pn5P/3P4/4QP2/1qB1NKR1 w - -

The best move is Rxh7 and this will be easy for just about any engine to find in at most a few seconds. The goal, though, is to show a score for White that is winning. Again, many engines will likely accomplish this in a few seconds.

Here's Myrddin's output with history ON:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      0       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 
 1  -667      1       302 h5g5 b1c1 g5g7 (20 KNPS)
 1  -551      1       381 c1g5 g7h6 (25 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (41 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3102 h5g5? b1c1 (66 KNPS)
 4  -708      4      3331 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -701      6      4276 c1g5 d8d3 g1g3 c6d4 e2e5 e5d3 (68 KNPS)
 4  -693      6      4604 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (74 KNPS)
 4  -684      6      5845 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (94 KNPS)
 5  -707      9      9494 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (102 KNPS)
 5  -703      9     11681 h5g5 b1c1 g5g7 c6d4 e2h5 d4e2 (125 KNPS)
 5  -693     10     14587 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (133 KNPS)
 5  -660     12     24215 c1e3 b4d3 h5g5 g7g6 e3b6 d3e1 b6d8 f8d8 (193 KNPS)
 6  -672     15     36554 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (234 KNPS)
 7  -672     23     65334 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (279 KNPS)
 7  -635     26     76317 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (287 KNPS)
 8  -669     31     99035 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 (317 KNPS)
 9  -663     48    181124 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 h8g7 (374 KNPS)
10  -646     84    369025 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 d4e5 (438 KNPS)
11  -641    138    668361 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 d3d7 f1e1 f8d8 b2c3 (481 KNPS)
12  -650    248   1235704 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (498 KNPS)
12  -601    251   1256263 h5h7! b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (500 KNPS)
12  -491    254   1272524 h5h7! (500 KNPS)
12     0    265   1358650 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (512 KNPS)
13     0    293   1539714 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (524 KNPS)
14     0    393   2173762 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (552 KNPS)
15     0    502   2966992 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 (590 KNPS)
16    40    625   3743346 h5h7! (598 KNPS)
16   150    663   3957996 h5h7! (596 KNPS)
16 32732    739   4511094 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (610 KNPS)
17 32732    865   5590386 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (645 KNPS)
18 32732   1063   7378612 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (693 KNPS)
You can see that, not only does Myrddin show a winning score for White, it actually announces mate in 23 in 7.4 seconds. For those who care, it is actually a mate in 18.

Now, here's the output with history OFF:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      1       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (10 KNPS)
 1  -667      1       302 h5g5 b1c1 g5g7 (18 KNPS)
 1  -551      1       381 c1g5 g7h6 (23 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (39 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3104 h5g5? b1c1 (66 KNPS)
 4  -708      4      3333 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -693      6      4033 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (65 KNPS)
 4  -684      6      5274 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (85 KNPS)
 5  -707      7      9227 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (118 KNPS)
 5  -693      7     10885 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (139 KNPS)
 5  -684     12     20832 c1e3 b4d3 e3b6 d3e1 b6d8 f8d8 (166 KNPS)
 6  -672     15     36663 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (235 KNPS)
 7  -672     21     67036 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (307 KNPS)
 7  -635     25     75226 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (300 KNPS)
 8  -669     29    100109 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 b2e5 (338 KNPS)
 9  -663     46    184625 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 f5g4 (394 KNPS)
10  -646     82    377892 e2b2 b1b2 c1b2 d8d5 f1e2 c6e5 h5g5 f8g8 d3d4 h7h6 (456 KNPS)
11  -648    134    678418 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (505 KNPS)
11  -606    137    690884 h5h7! b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (503 KNPS)
11  -496    140    695629 h5h7! (495 KNPS)
11     0    145    741667 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (511 KNPS)
12     0    157    835178 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (529 KNPS)
13     0    177    988654 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (555 KNPS)
14     0    288   1721951 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (596 KNPS)
15     0    380   2421279 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (636 KNPS)
16     0    719   4736837 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (658 KNPS)
17     0   1847  11781797 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (637 KNPS)
18     0   2361  15451519 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (654 KNPS)
19     0   3272  21921457 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (669 KNPS)
20    40   5383  36306317 h5h7! (674 KNPS)
20   150   5658  38217252 h5h7! (675 KNPS)
20 32732   5924  40688742 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (686 KNPS)
21 32732   7104  50174156 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (706 KNPS)
22 32732   8679  63712508 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (734 KNPS)
23 32732  11567  88105359 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (761 KNPS)
As you can see, the time to find Rxh7 is actually SHORTER (just over half the time as well as one ply sooner), but the time to find a winning score (and announce mate) is 8 times LONGER and 4 ply later.

I just don't understand how, in this very tactical position, where almost every move by White is a capture and/or a check, removing the history ordering of quiet moves can have that much impact. Can somebody enlighten this feeble mind, please?

Many thanks in advance,

jm
I got the opposite with Gaviota, but I believe it must be just noise.
I think that the effect of ordering in tactical positions could be difficult to predict. Delaying one decent defensive move might help to find things quicker, but if a best attacking move is also delayed, it could harm finding the proper score (mate) quicker. I think that could explain your results. That is, finding the move quicker, but realizing it is mate later.

Miguel

history off

Code: Select all

   2072530  18:      3.8    +0.00  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bf4+ Kg7 6.Bh6+
   2300450  19       4.1      :-)  1.Rxh7+
   2330424  19       4.2      :-)  1.Rxh7+
   2367485  19       4.2      :-)  1.Rxh7+
   2583772  19       4.6    +4.20  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Qh5+ [>]
   2631758  19:      4.7    +4.20  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Qh5+ [>]
   2657022  20       4.7      :-)  1.Rxh7+
   2676836  20       4.7      :-)  1.Rxh7+
   2696247  20       4.8      :-)  1.Rxh7+
   2699973  20       4.8      :-)  1.Rxh7+
  73593820  20     131.4  +Mat_18  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Bf6+ Rxf6 10.exf6
                                   Qxe1+ 11.Kxe1 Nc2+ 12.Kf1 Ne3+ 13.fxe3
                                   Rd7 14.Qe8+ Kh7 15.Qxd7+ Ne7 16.Qxe7+
                                   Kg6 17.Qg7+ Kh5 18.Qg5#
on

Code: Select all

   1514307  18:      2.6    +0.00  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bf4+ Kg7 6.Bh6+
   1713415  19       2.9      :-)  1.Rxh7+
   1742134  19       3.0      :-)  1.Rxh7+
   1763568  19       3.0      :-)  1.Rxh7+
   1890780  19       3.2    +4.20  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Qh5+ [>]
   1944804  19:      3.3    +4.20  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Qh5+ [>]
   1973521  20       3.3      :-)  1.Rxh7+
   2010757  20       3.4      :-)  1.Rxh7+
   2031810  20       3.4      :-)  1.Rxh7+
   2036712  20       3.4      :-)  1.Rxh7+
 141859776  20     246.5  +Mat_18  1.Rxh7+ Kxh7 2.Qh5+ Kg8 3.Rxg7+ Kxg7
                                   4.Bh6+ Kh7 5.Bg5+ Kg7 6.Qh6+ Kf7 7.Qf6+
                                   Kg8 8.Qg6+ Kh8 9.Bf6+ Rxf6 10.exf6
                                   Qxe1+ 11.Kxe1 Nc2+ 12.Kf1 Ne3+ 13.fxe3
                                   Rd7 14.Qe8+ Kh7 15.Qxd7+ Ne7 16.Qxe7+
                                   Kg6 17.Qg7+ Kh5 18.Qg5#
cetormenter
Posts: 170
Joined: Sun Oct 28, 2012 9:46 pm

Re: History heuristic -- should it do THIS?

Post by cetormenter »

Code: Select all

Nirvana Chess v1.5
position fen 3r1r1k/1b4pp/ppn1p3/4Pp1R/Pn5P/3P4/4QP2/1qB1NKR1 w - -
go infinite
info depth 20 seldepth 40 nps 612000 nodes 964960 score cp 0 pv h5h7 h8h7 e2h5 h
7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g
7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g
7h8 h6g5 h8g7
info depth 21 seldepth 35 nps 645000 nodes 1429521 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7
info depth 22 seldepth 39 nps 676000 nodes 2274077 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7
info depth 23 seldepth 40 nps 688000 nodes 3629724 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7
info depth 24 seldepth 44 nps 687000 nodes 6485384 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
g7h8 h6g5 h8g7
info depth 25 seldepth 48 nps 660000 nodes 13370939 score cp 0 pv h5h7 h8h7 e2h5
 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
 g7h8 h6g5 h8g7
info depth 26 seldepth 49 nps 653000 nodes 24650026 score cp 0 pv h5h7 h8h7 e2h5
 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6 g7h8 h6g5 h8g7 g5h6
 g7h8 h6g5 h8g7
info depth 27 seldepth 56 nps 707000 nodes 96677003 score mate 18 pv h5h7 h8h7 e
2h5

Code: Select all

Nirvana Chess v1.5
position fen 3r1r1k/1b4pp/ppn1p3/4Pp1R/Pn5P/3P4/4QP2/1qB1NKR1 w - -
go infinite
info depth 21 seldepth 37 nps 647000 nodes 3179471 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6f4 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6
g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6
g8h8 g6h6 h8g8
info depth 22 seldepth 40 nps 643000 nodes 9981257 score cp 0 pv h5h7 h8h7 e2h5
h7g8 g1g7 g8g7 c1h6 g7h8 h6f4 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6
g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6 g8h8 g6h6 h8g8 h6g6
g8h8 g6h6 h8g8
info depth 23 seldepth 54 nps 684000 nodes 17586856 score mate 18 pv h5h7 h8h7 e
2h5 h7g8 g1g7 g8g7
I find that history does not work very well here either. However as Miguel said it is very random. You can find plenty of positions where history "does not work" but you will find many more where it works fantastically. It all depends on your implementation and due to that your mileage will vary but it should be a fairly significant gain.

I ran a short 500 game match at 2"+0.02" just as a test to see how much of a gain it is in Nirvana.

Code: Select all

Rank Name                Elo   +    -   games score oppo. draws 
   1 NirvanachessHis     29   25   25   500   59%   -29   32% 
   2 NirvanachessNoHis  -29   25   25   500   41%    29   32% 
Nirvana uses the history heuristic for more than simply just move ordering so it is able to squeeze a little bit more out of it.

In any case good luck improving your engine!

Thomas
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: History heuristic -- should it do THIS?

Post by Tom Likens »

I also get the opposite effect with the latest version of Djinn (history ON is slightly better).
But honestly it seems to be noise.

History OFF

Code: Select all

  12  00:00:00   0.01  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Bh6+ Kh8H 7. Bg5+H Kg7H 8. Bh6+H
                       Kh8H 9. Bg5+H Kg7H 10. Bh6+H Kh8H 11. Bg5+H Kg7H
                       12. Bh6+H Kh8H 13. Bg5+H Kg7H 14. Bh6+H Kh8H 15. Bg5+H
                       Kg7H 16. Bh6+H Kh8H 17. Bg5+H Kg7H 18. Bh6+H Kh8H
                       19. Bg5+H Kg7H 20. Bh6+H Kh8H 21. Bg5+H Kg7H 22. Bh6+H
                       Kh8H 23. Bg5+H Kg7H 24. Bh6+H Kh8H 25. Bg5+H Kg7H
                       26. Bh6+H Kh8H 27. Bg5+H Kg7H 28. Bh6+H Kh8H 29. Bg5+H
                       Kg7H 30. Bh6+H Kh8H 31. Bg5+H Kg7H 32. Bh6+ <HT>
  13  00:00:00   0.01  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Bh6+ Kh8H 7. Bg5+H Kg7H 8. Bh6+H
                       Kh8H 9. Bg5+H Kg7H 10. Bh6+H Kh8H 11. Bg5+H Kg7H
                       12. Bh6+H Kh8H 13. Bg5+H Kg7H 14. Bh6+H Kh8H 15. Bg5+H
                       Kg7H 16. Bh6+H Kh8H 17. Bg5+H Kg7H 18. Bh6+H Kh8H
                       19. Bg5+H Kg7H 20. Bh6+H Kh8H 21. Bg5+H Kg7H 22. Bh6+H
                       Kh8H 23. Bg5+H Kg7H 24. Bh6+H Kh8H 25. Bg5+H Kg7H
                       26. Bh6+H Kh8H 27. Bg5+H Kg7H 28. Bh6+H Kh8H 29. Bg5+H
                       Kg7H 30. Bh6+H Kh8H 31. Bg5+H Kg7H 32. Bh6+ <HT>
  14  00:00:00   +.++  1. Rxh7+!!
  14  00:00:00   +.++  1. Rxh7+!!
  14  00:00:00 MAT-18  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Qg6+
                       Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+
                       12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+
                       Ne7 16. Qxe7+ Kg6 17. Qg7+ Kh5 18. Qg5#

 Total time:0.64  nodes:1160441  qnodes:761148 (65.59%) NPS: 1813100
 Timeout's checked: 1  per/second: 1.56 
 Max depth reached during the search: 55  abf: 1.91
History ON

Code: Select all

  12  00:00:00   0.01  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Qh6+ Kg8 7. Qg6+H Kh8H 8. Qh6+H
                       Kg8H 9. Qg6+H Kh8H 10. Qh6+H Kg8H 11. Qg6+H Kh8H
                       12. Qh6+H Kg8H 13. Qg6+H Kh8H 14. Qh6+H Kg8H 15. Qg6+H
                       Kh8H 16. Qh6+H Kg8H 17. Qg6+H Kh8H 18. Qh6+H Kg8H
                       19. Qg6+H Kh8H 20. Qh6+H Kg8H 21. Qg6+H Kh8H 22. Qh6+H
                       Kg8H 23. Qg6+H Kh8H 24. Qh6+H Kg8H 25. Qg6+H Kh8H
                       26. Qh6+H Kg8H 27. Qg6+H Kh8H 28. Qh6+H Kg8H 29. Qg6+H
                       Kh8H 30. Qh6+H Kg8H 31. Qg6+H Kh8H 32. Qh6+ <HT>
  13  00:00:00   0.01  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Qh6+ Kg8 7. Qg6+H Kh8H 8. Qh6+H
                       Kg8H 9. Qg6+H Kh8H 10. Qh6+H Kg8H 11. Qg6+H Kh8H
                       12. Qh6+H Kg8H 13. Qg6+H Kh8H 14. Qh6+H Kg8H 15. Qg6+H
                       Kh8H 16. Qh6+H Kg8H 17. Qg6+H Kh8H 18. Qh6+H Kg8H
                       19. Qg6+H Kh8H 20. Qh6+H Kg8H 21. Qg6+H Kh8H 22. Qh6+H
                       Kg8H 23. Qg6+H Kh8H 24. Qh6+H Kg8H 25. Qg6+H Kh8H
                       26. Qh6+H Kg8H 27. Qg6+H Kh8H 28. Qh6+H Kg8H 29. Qg6+H
                       Kh8H 30. Qh6+H Kg8H 31. Qg6+H Kh8H 32. Qh6+ <HT>
  14  00:00:00   +.++  1. Rxh7+!!
  14  00:00:00   +.++  1. Rxh7+!!
  14  00:00:00 MAT-18  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8
                       5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Qg6+
                       Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+
                       12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+
                       Ne7 16. Qxe7+ Kg6 17. Qg7+ Kh5 18. Qg5#

 Total time:0.57  nodes:1100778  qnodes:649528 (59.01%) NPS: 1931100
 Timeout's checked: 1  per/second: 1.75 
 Max depth reached during the search: 57  abf: 1.54
regards,
--tom
User avatar
WinPooh
Posts: 276
Joined: Fri Mar 17, 2006 8:01 am
Location: Russia
Full name: Vladimir Medvedev

Re: History heuristic -- should it do THIS?

Post by WinPooh »

GreKo 10.3

Finding Rxh7
History ON: depth = 10, time = 0.18, nodes = 169503
History OFF: depth = 10, time = 0.18, nodes = 176293

Announcing mate in 18
History ON: depth = 21, time = 45.33, nodes = 133585174
History OFF: depth = 21, time = 56.38, nodes = 160942311

History ON:

Code: Select all

  1      -630        2           196  1. Bg5
  2      -678        2           526  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3
  3      -674        3          1240  1. Be3 Nxe5 2. Bxb6
  4      -651        4          3974  1. Be3 Nxe5 2. Bxb6 Nf3
  5      -665        5          9726  1. Be3 Nxe5 2. Bxb6 Nf3 3. Qxe6 Nxe1 4. Qxe1 Qxd3+ 5. Qe2
  6      -678        8         27603  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3
  7      -643       10         43179  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5
  8      -645       12         66776  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5 g6
  9      -626       15        126992  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5 Rd2 5. Rxg7 Rxb2 6. Rxb7 Nxe5
 10      -576       17        157920  1. Rxh7+!
 10         0       18        169503  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Be3+ Kg8 6. Qg6+ Kh8 7. Qh5+
 11         0       19        200473  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Be3+ Kg8 6. Qg6+ Kh8 7. Qh5+
 12         0       23        277187  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Be3+ Kg8 6. Qg6+ Kh8 7. Qh5+
 13         0       31        491087  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Be3+ Kg8 6. Qg6+ Kh8 7. Qh5+
 14         0       52       1008059  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Be3+ Kg8 6. Qg6+ Kh8 7. Qh5+
 15        50       64       1323707  1. Rxh7+!
 15        94      163       3882407  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kg8 7. Qg6+ Kh8 8. B
f6+ Rxf6 9. exf6 Rd7 10. Qe8+ Kh7 11. Qxd7+ Ne7 12. fxe7 Bc6 13. e8=Q+ Bxd7 14. Qxd7+
 16       144      172       4073616  1. Rxh7+!
 16       783      243       5996178  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nxd3+ 12. Kf1 Rd7 13. Qh5+ Kg8 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. Qxe7+ Kg6 17. Qxb7
 17       833      276       6765913  1. Rxh7+!
 17       854      396      10170907  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nxd3+ 12. Kf1 Rd7 13. Qe8+ Kh7 14. Qxd7+ Ne7 15. fxe7 Bg2+ 16. Kxg2 Nf4+ 17. Kf3
 18       904      442      11233177  1. Rxh7+!
 18      1126      699      18570480  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kg8 7. Qg6+ Kh8 8. B
f6+ Rxf6 9. exf6 Qxe1+ 10. Kxe1 Nxd3+ 11. Kf1 Rd7 12. Qe8+ Kh7 13. Qxd7+ Ne7 14. fxe7 Nc5 15. e8=Q+ Nxd7 16. Qxd7+ Kg6 17. Qxb7
 19      1176      807      21270002  1. Rxh7+!
 19      1131     1561      41648753  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nxd3+ 12. Kf1 Rd7 13. Qe8+ Kh7 14. Qxd7+ Ne7 15. fxe7 Nc5 16. e8=Q+ Nxd7 17. Qxd7+ Kg
8 18. Qxb7
 20      1181     1731      45725826  1. Rxh7+!
 20      2510     2851      80778157  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qh5+ Kg8 15. Qe8+ Kh7 16. Qxd7+ Ne7 17. fxe7 Bc6 1
8. Qxc6 e5 19. e8=Q
 21      2560     3392      96819845  1. Rxh7+!
 21     32733     4553     133585174  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh8 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. Qxe7+ Kg6 17. Qg7+ Kh5
18. Qg5# {+Mate in 18}
History OFF:

Code: Select all

  1      -630        1           196  1. Bg5
  2      -678        1           526  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3
  3      -674        1          1240  1. Be3 Nxe5 2. Bxb6
  4      -651        3          3966  1. Be3 Nxe5 2. Bxb6 Nf3
  5      -665        4          9920  1. Be3 Nxe5 2. Bxb6 Nf3 3. Qxe6 Nxe1 4. Qxe1 Qxd3+ 5. Qe2
  6      -678        6         32016  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3
  7      -643        7         48864  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5
  8      -645       11         71626  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5 g6
  9      -626       15        135422  1. Qb2 Qxb2 2. Bxb2 Nxd3 3. Nxd3 Rxd3 4. Rhg5 Rd2 5. Rxg7 Rxb2 6. Rxb7 Nxe5
 10      -576       17        164779  1. Rxh7+!
 10         0       18        176293  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bc1+ Kg7
 11         0       20        204427  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bc1+ Kg7
 12         0       23        274812  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bc1+ Kg7
 13         0       32        504880  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bc1+ Kg7
 14         0       45        833569  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bc1+ Kg7
 15        50       62       1296805  1. Rxh7+!
 15        94      349       8687578  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kg8 7. Qg6+ Kh8 8. B
f6+ Rxf6 9. exf6 Rd7 10. Qe8+ Kh7 11. Qxd7+ Ne7 12. fxe7 Bc6 13. e8=Q+ Bxd7 14. Qxd7+ Kh8 15. Qd4+ Kg8 16. Qxb6
 16       144      360       8904748  1. Rxh7+!
 16        94      503      12743917  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Rd7 11. Qe8+ Kh7 12. Qxd7+ Ne7 13. fxe7 Bc6 14. e8=Q+ Bxd7 15. Qxd7+ Kh8 16. Qd4+ Kg8 17. Qxb6
 17       144      517      13023518  1. Rxh7+!
 17       835      702      17945645  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nxd3+ 12. Kf1 Rd7 13. Qh5+ Kg8 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. fxe7 Bg2+ 17. Kxg2
 18       885      791      20173262  1. Rxh7+!
 18       963     1044      27109067  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Rd7 13. Qh5+ Kg8 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. fxe7 Bg2+ 17. Kxg2 Ne1+
18. Kg3
 19      1013     1175      30373871  1. Rxh7+!
 19      1126     1697      44165854  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nxd3+ 12. Kf1 Rd7 13. Qe8+ Kh7 14. Qxd7+ Ne7 15. fxe7 Nc5 16. e8=Q+ Nxd7 17. Qxd7+ Kg
6 18. Qxb7
 20      1176     1973      51168140  1. Rxh7+!
 20      2477     3329      90594869  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qh5+ Kg8 15. Qe8+ Kh7 16. Qxd7+ Ne7 17. fxe7 Bc8 1
8. Qxc8 f4 19. e8=Q fxe3 20. Qcxe6
 21      2527     4155     114624506  1. Rxh7+!
 21     32733     5638     160942311  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. Qxe7+ Kh6 17. Qg7+ Kh5
18. Qg5# {+Mate in 18}
 22     32733     8667     255269212  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. Qxe7+ Kh6 17. Qg7+ Kh5
18. Qg5# {+Mate in 18}
 23     32733    17039     518431524  1. Rxh7+ Kxh7 2. Qh5+ Kg8 3. Rxg7+ Kxg7 4. Bh6+ Kh7 5. Bg5+ Kg7 6. Qh6+ Kf7 7. Qf6+ Kg8 8. Q
g6+ Kh8 9. Bf6+ Rxf6 10. exf6 Qxe1+ 11. Kxe1 Nc2+ 12. Kf1 Ne3+ 13. fxe3 Rd7 14. Qe8+ Kh7 15. Qxd7+ Ne7 16. Qxe7+ Kh6 17. Qg7+ Kh5
18. Qg5# {+Mate in 18}
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: History heuristic -- should it do THIS?

Post by bob »

JVMerlino wrote:My understanding of the purpose of the history heuristic is that it is primarily for ordering quiet moves, and that is indeed how it is implemented in my mediocre engine, Myrddin.

However, I decided to try turning it off. The results are unclear as far as ELO gain, but there was one test position in which I got very surprising results.

Here is the position.

[d]3r1r1k/1b4pp/ppn1p3/4Pp1R/Pn5P/3P4/4QP2/1qB1NKR1 w - -

The best move is Rxh7 and this will be easy for just about any engine to find in at most a few seconds. The goal, though, is to show a score for White that is winning. Again, many engines will likely accomplish this in a few seconds.

Here's Myrddin's output with history ON:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      0       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 
 1  -667      1       302 h5g5 b1c1 g5g7 (20 KNPS)
 1  -551      1       381 c1g5 g7h6 (25 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (41 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3102 h5g5? b1c1 (66 KNPS)
 4  -708      4      3331 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -701      6      4276 c1g5 d8d3 g1g3 c6d4 e2e5 e5d3 (68 KNPS)
 4  -693      6      4604 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (74 KNPS)
 4  -684      6      5845 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (94 KNPS)
 5  -707      9      9494 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (102 KNPS)
 5  -703      9     11681 h5g5 b1c1 g5g7 c6d4 e2h5 d4e2 (125 KNPS)
 5  -693     10     14587 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (133 KNPS)
 5  -660     12     24215 c1e3 b4d3 h5g5 g7g6 e3b6 d3e1 b6d8 f8d8 (193 KNPS)
 6  -672     15     36554 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (234 KNPS)
 7  -672     23     65334 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (279 KNPS)
 7  -635     26     76317 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (287 KNPS)
 8  -669     31     99035 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 (317 KNPS)
 9  -663     48    181124 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 h8g7 (374 KNPS)
10  -646     84    369025 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 d4e5 (438 KNPS)
11  -641    138    668361 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 d3d7 f1e1 f8d8 b2c3 (481 KNPS)
12  -650    248   1235704 e2b2 b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (498 KNPS)
12  -601    251   1256263 h5h7! b1b2 c1b2 d8d5 h5g5 f8g8 f1e2 c6e5 d3d4 h7h6 g5g3 f5f4 (500 KNPS)
12  -491    254   1272524 h5h7! (500 KNPS)
12     0    265   1358650 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (512 KNPS)
13     0    293   1539714 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (524 KNPS)
14     0    393   2173762 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g8 h5g6 g8h8 g6h5 (552 KNPS)
15     0    502   2966992 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 g5h6 (590 KNPS)
16    40    625   3743346 h5h7! (598 KNPS)
16   150    663   3957996 h5h7! (596 KNPS)
16 32732    739   4511094 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (610 KNPS)
17 32732    865   5590386 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (645 KNPS)
18 32732   1063   7378612 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (693 KNPS)
You can see that, not only does Myrddin show a winning score for White, it actually announces mate in 23 in 7.4 seconds. For those who care, it is actually a mate in 18.

Now, here's the output with history OFF:

Code: Select all

 1  -894      0         6 h5h7 h8h7 
 1  -684      1       166 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (10 KNPS)
 1  -667      1       302 h5g5 b1c1 g5g7 (18 KNPS)
 1  -551      1       381 c1g5 g7h6 (23 KNPS)
 2  -591      1       629 c1g5? d8d3 g5d8 f8d8 (39 KNPS)
 2  -683      3       693 c1g5 d8d3 (22 KNPS)
 2  -667      3       983 h5g5 b1c1 g5g7 (31 KNPS)
 3  -667      3      1685 h5g5 b1c1 g5g7 (54 KNPS)
 4  -707      4      3104 h5g5? b1c1 (66 KNPS)
 4  -708      4      3333 h5g5 b1c1 g5g7 c6d4 (70 KNPS)
 4  -693      6      4033 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (65 KNPS)
 4  -684      6      5274 e2e3 b4d3 e1d3 b1d3 f1e1 d3e3 c1e3 c6e5 e3b6 (85 KNPS)
 5  -707      7      9227 e2e3 b4d3 e1d3 b1d3 e3d3 d8d3 (118 KNPS)
 5  -693      7     10885 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 (139 KNPS)
 5  -684     12     20832 c1e3 b4d3 e3b6 d3e1 b6d8 f8d8 (166 KNPS)
 6  -672     15     36663 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (235 KNPS)
 7  -672     21     67036 c1e3 d8d7 h5g5 c6e5 e3d4 d7d4 e2e5 (307 KNPS)
 7  -635     25     75226 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 (300 KNPS)
 8  -669     29    100109 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 b2e5 (338 KNPS)
 9  -663     46    184625 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 f1e1 f8d8 g1g3 f5g4 (394 KNPS)
10  -646     82    377892 e2b2 b1b2 c1b2 d8d5 f1e2 c6e5 h5g5 f8g8 d3d4 h7h6 (456 KNPS)
11  -648    134    678418 e2b2 b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (505 KNPS)
11  -606    137    690884 h5h7! b1b2 c1b2 b4d3 e1d3 d8d3 h5g5 g7g6 f1e1 f8d8 h4h5 b6a5 (503 KNPS)
11  -496    140    695629 h5h7! (495 KNPS)
11     0    145    741667 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (511 KNPS)
12     0    157    835178 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (529 KNPS)
13     0    177    988654 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (555 KNPS)
14     0    288   1721951 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (596 KNPS)
15     0    380   2421279 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (636 KNPS)
16     0    719   4736837 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (658 KNPS)
17     0   1847  11781797 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (637 KNPS)
18     0   2361  15451519 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (654 KNPS)
19     0   3272  21921457 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6c1 h8g8 h5g6 g8h8 g6h6 h8g8 h6g6 (669 KNPS)
20    40   5383  36306317 h5h7! (674 KNPS)
20   150   5658  38217252 h5h7! (675 KNPS)
20 32732   5924  40688742 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (686 KNPS)
21 32732   7104  50174156 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (706 KNPS)
22 32732   8679  63712508 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (734 KNPS)
23 32732  11567  88105359 h5h7 h8h7 e2h5 h7g8 g1g7 g8g7 c1h6 g7h8 h6g5 h8g7 h5h6 g7f7 h6f6 f7g8 f6g6 g8h8 g5f6 f8f6 e5f6 b1e1 f1e1 b4c2 e1f1 c2e3 f2e3 d8d7 g6e8 h8h7 e8d7 c6e7 d7e7 h7g6 e7g7 g6h5 g7g5 (761 KNPS)
As you can see, the time to find Rxh7 is actually SHORTER (just over half the time as well as one ply sooner), but the time to find a winning score (and announce mate) is 8 times LONGER and 4 ply later.

I just don't understand how, in this very tactical position, where almost every move by White is a capture and/or a check, removing the history ordering of quiet moves can have that much impact. Can somebody enlighten this feeble mind, please?

Many thanks in advance,

jm
Think about it this way. If you don't change your mind, history information provides good ordering, because it is based on game history and reflects what has been good in past iterations. but to find a new best move, old move ordering info is wrong. Particularly history since it won't help to find the oddball mate or whatever.

Any move ordering idea will produce poor results in some positions. But the key point is that they should produce better results in the majority of the positions. And that is what you want, something that works more often than it doesn't. I've not had any luck trying history in recent years. I spent a couple of months working on it late last year. The cost of ordering the moves (for me) more than offsets the small gain in search space size.