Fork bug

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Fork bug

Post by Sven »

Henk wrote:Skipper lost a two minutes game because it played h5-f6? Should it extend pawn moves ? That probably won't help in other positions. Any suggestions.
[...]

Code: Select all

[...]
  3      0.54       0.12         910   h5f6 f1d3 c8d7 
  2      0.54       0.08         527   h5f6 f1d3 
  1      0.74       0.04          75   h5f6 
In iteration 3 your search *must* find 2.d5 as refutation of 1...Nf6, without any kind of extensions. But the output you have shown says that even iteration 7 does not find it. So again, repair your *search*, not your evaluation. Also NPS is not to blame in this case, although 17 knps is actually almost the slowest rate that I know of.

It does not make any sense to add lots of new evaluation features while the search is broken.

Unless, of course, you have added nonsensical scores for your new eval features, e.g. +250 for an outpost knight or anything like that ... To check that you could start by disabling *all* positional evalution. If that still does not work then it is actually a search bug.
Henk
Posts: 7210
Joined: Mon May 27, 2013 10:31 am

Re: Fork bug

Post by Henk »

Sven Schüle wrote:
Henk wrote:Skipper lost a two minutes game because it played h5-f6? Should it extend pawn moves ? That probably won't help in other positions. Any suggestions.
[...]

Code: Select all

[...]
  3      0.54       0.12         910   h5f6 f1d3 c8d7 
  2      0.54       0.08         527   h5f6 f1d3 
  1      0.74       0.04          75   h5f6 
In iteration 3 your search *must* find 2.d5 as refutation of 1...Nf6, without any kind of extensions. But the output you have shown says that even iteration 7 does not find it. So again, repair your *search*, not your evaluation. Also NPS is not to blame in this case, although 17 knps is actually almost the slowest rate that I know of.

It does not make any sense to add lots of new evaluation features while the search is broken.

Unless, of course, you have added nonsensical scores for your new eval features, e.g. +250 for an outpost knight or anything like that ... To check that you could start by disabling *all* positional evalution. If that still does not work then it is actually a search bug.
I don't understand. Why would not it be Nf6, d5, Ng4 and then White standing pat for it has no capture that wins material. In that case a Bishop on d3 would be better.
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Fork bug

Post by PK »

I don't understand. Why would not it be Nf6, d5, Ng4 and then White standing pat for it has no capture that wins material. In that case a Bishop on d3 would be better.
Test it. Switch queen and bishop. What happens then?
Henk
Posts: 7210
Joined: Mon May 27, 2013 10:31 am

Re: Fork bug

Post by Henk »

[d] r1q1kb1r/ppp1pppp/2npb3/7n/2PPP3/2N1BN2/PP1Q1PPP/2KR1B1R b kq - 2 10

Only counting material. No reductions/extensions.

Code: Select all

Depth  Value   Time(seconds)   Nodes
  6      0.00      10.00      301997   c6b4 h1g1 e6g4 a2a4 e8d8 b2b3 
  5      0.00       3.31      136190   c6b4 h1g1 e6g4 a2a4 
  4      0.00       0.73       18376   c6b4 h1g1 e8d8 
  3      0.00       0.12        4576   c6b4 h1g1 h8g8 
  2      0.00       0.03         498   f7f6 c3d5 
  1      0.00       0.00          69   c6b8 
[d] r1q1kb1r/ppp1pppp/2npb3/7n/2PPP3/2N1QN2/PP1B1PPP/2KR1B1R b kq - 2 10

Code: Select all

Depth  Value   Time(seconds)   Nodes
  6      0.00      10.00      291710   c6b4 d1e1 b4a6 c3d5 g7g6 e3g5 
  5      0.00       3.23      113155   c6b4 d1e1 b4a6 c3d5 g7g6 
  4      0.00       0.58       15227   f7f5 e4f5 e6f5 d1e1 
  3      0.00       0.13        2929   f7f5 e4f5 e6f5 
  2      0.00       0.05         328   f7f5 e4f5 
  1      0.00       0.03          68   e6d7 
So location of Qe3 counts for f5-f4.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Fork bug

Post by Sven »

Henk wrote:
Sven Schüle wrote:
Henk wrote:Skipper lost a two minutes game because it played h5-f6? Should it extend pawn moves ? That probably won't help in other positions. Any suggestions.
[...]

Code: Select all

[...]
  3      0.54       0.12         910   h5f6 f1d3 c8d7 
  2      0.54       0.08         527   h5f6 f1d3 
  1      0.74       0.04          75   h5f6 
In iteration 3 your search *must* find 2.d5 as refutation of 1...Nf6, without any kind of extensions. But the output you have shown says that even iteration 7 does not find it. So again, repair your *search*, not your evaluation. Also NPS is not to blame in this case, although 17 knps is actually almost the slowest rate that I know of.

It does not make any sense to add lots of new evaluation features while the search is broken.

Unless, of course, you have added nonsensical scores for your new eval features, e.g. +250 for an outpost knight or anything like that ... To check that you could start by disabling *all* positional evalution. If that still does not work then it is actually a search bug.
I don't understand. Why would not it be Nf6, d5, Ng4 and then White standing pat for it has no capture that wins material. In that case a Bishop on d3 would be better.
Ok, you are partially right since I overlooked Ng4 attacking the queen. But 2...Ng4 only delays the problem. So we are not talking about iteration 3 but iteration 5. There you need to find 2.d5 Ng4 3.Qe1 (for instance) as a refutation of 1...Nf6.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Fork bug

Post by Sven »

Henk wrote:Only counting material. No reductions/extensions.

Code: Select all

Depth  Value   Time(seconds)   Nodes
  6      0.00      10.00      301997   c6b4 h1g1 e6g4 a2a4 e8d8 b2b3 
  5      0.00       3.31      136190   c6b4 h1g1 e6g4 a2a4 
  4      0.00       0.73       18376   c6b4 h1g1 e8d8 
  3      0.00       0.12        4576   c6b4 h1g1 h8g8 
  2      0.00       0.03         498   f7f6 c3d5 
  1      0.00       0.00          69   c6b8 
That might imply that you indeed screwed up your eval scores somehow, which in turn screws up the search.
Henk
Posts: 7210
Joined: Mon May 27, 2013 10:31 am

Re: Fork bug

Post by Henk »

Enabling other evaluation terms.

Code: Select all

Depth  Value   Time(seconds)   Nodes
  5      0.34       8.11      132834   e6g4 f1d3 c6b4 d3b1 h5f6 
  4      0.58       1.35       20461   h5f6 d4d5 f6g4 e3e2 
  3      0.54       0.36        4375   h5f6 d4d5 f6g4 
  2      0.58       0.08         860   b7b5 c3d5 
  1      0.74       0.04          71   h5f6


+ after enabling reductions/extensions

Code: Select all

Depth  Value   Time(seconds)   Nodes
  7      0.14      10.00      178743   c6b4 d4d5 e6g4 a2a3 b4a6 f1d3 h5f6 
  6      0.54       3.62       59661   f7f5 f1d3 h5f6 e4f5 e6f5 d3f5 
  5      0.54       2.68       44182   f7f5 f1d3 h5f6 e4f5 e6f5 
  4      0.58       0.42        5848   h5f6 f1d3 c6b4 d3f1 
  3      0.54       0.17        2209   h5f6 f1d3 c8d8 
  2      0.58       0.06         463   b7b5 c4c5 
  1      0.74       0.04          74   h5f6 
Looks like LMR might be reducing the wrong moves.

Only null move reduction gives:

Code: Select all

Depth  Value   Time(seconds)   Nodes
  5      0.34       7.95      138377   e6d7 f1d3 h5f6 d4d5 c6e5 
  4      0.58       1.41       21204   h5f6 d4d5 f6g4 e3e1 
  3      0.54       0.43        5619   f7f5 e4f5 e6f5 
  2      0.58       0.10         879   b7b5 c3d5 
  1      0.74       0.03          68   h5f6