When does a chess engine blow up?

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: When does a chess engine blow up?

Post by hgm »

Michel wrote:I think it is more critical for detecting draws. The following position is draw

[d]

and it requires looking at very few position to prove it (less than 64x8). Yet it seems
difficult to see this with forward search.
I think this kind of position is more suitable for recognition as a pattern. When you do checks in QS it is easy: if after an unsafe check by a Rook all good captures on the checker lead to draw by stalemate, do not consider other evasions (in QS) but return a draw score.

This way you invert the burden of proof, and require the search to proof that it can avoid the perpetual, rather than make the usual assumption that it can. Which seems justified in the case of a rabid Rook.
Uri Blass
Posts: 10890
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: When does a chess engine blow up?

Post by Uri Blass »

I think that it is also not correct

[d]7k/5Q2/8/8/8/3r4/2K5/8 b - - 0 1

You can evaluate the following as a draw based on this pattern after Rc3+ but white is winning

relevant lines to calculate for humans to understand it
Rc3+ Kb2 Rc2+ Ka3 Rc3+(Rg2 is better) Kb4

Rd2+ Kb3 Rb2+(or Rd3+ Kb4 Rd4+ Kc5) Ka3
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: When does a chess engine blow up?

Post by hgm »

You will discover that at sufficient depth.

Evaluation is no substitute for search. It is a heuristic guess at what the search would find. The best you can hope is that the guess is right more often than not. I think that a rabid Rook is one of the cases where a draw is the dominant outcome, just as white Bishops trapped on a7 or h7 will usually be lost against a Pawn, and white Knights on a8 or h8 will usually be lost with only positional compensation.
Uri Blass
Posts: 10890
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: When does a chess engine blow up?

Post by Uri Blass »

I am not sure about the dominant result.

It is possible to check it by testing all the tablebases KQKR positions when capturing the rook is leading to stalemate and stronger side is in check to see how many of them are draws and how many of them are wins.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: When does a chess engine blow up?

Post by hgm »

Yes, that would be posible in KQKR, but the principle of the rabid Rook is a general one, and not limited to that end-game. t can easily occur in 7-, 8- or 9-men positions.

Even if draw is not the dominant result, there would be another consideration: Finding an escape from the checks usually requires a much smaller search depth than forcing the draw. So you might have a 90% error rate at d=0 when you take draw as the default assumption, but it could drop to 1% at d=6, because in the other 89% of the cases the search would have found the escape. The alternative would be to hace 10% error rate at d=0, which would stay pretty much 10% upto d=60. My guess is that you would be better off in the first case.