Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: perpetual check

Author: Robert Hyatt

Date: 14:58:56 10/16/01

Go up one level in this thread


On October 16, 2001 at 17:10:39, Robert Hyatt wrote:

>On October 16, 2001 at 16:39:07, Miguel A. Ballicora wrote:
>
>>On October 16, 2001 at 16:02:42, Uri Blass wrote:
>>
>>>On October 16, 2001 at 14:24:00, Robert Hyatt wrote:
>>>
>>>>On October 16, 2001 at 11:13:38, John Merlino wrote:
>>>>
>>>>>On October 16, 2001 at 07:58:15, Steffen Jakob wrote:
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>this is a position from a blitz game Hossa - Sjeng:
>>>>>>
>>>>>>[D]7k/4QP2/7p/6rP/8/1K6/6r1/8 b
>>>>>>
>>>>>>For a human it's obvious that this is a draw. Hossa was rather clueless and
>>>>>>thought that white was winning. Are there any engines which show a draw value at
>>>>>>once (without significant search depth)?
>>>>>>
>>>>>>Greetings,
>>>>>>Steffen.
>>>>>
>>>>>Chessmaster 8000 sees the draw in less than a second:
>>>>>
>>>>>Time	Depth	Score	Positions	Moves
>>>>>0:00	1/3	1.18	7319		1...R2g3+ 2. Kc2 Rg2+ 3. Kd3 R2g3+
>>>>>					4. Kc4 R3g4+ 5. Kc3 Rg3+ 6. Kb2
>>>>>					Rg2+ 7. Kc1 Rg1+ 8. Kd2 R1g2+ 9.
>>>>>					Ke3
>>>>>0:00	2/4	0.95	23824		1...R2g3+ 2. Kc2 Rg2+ 3. Kd3 R2g3+
>>>>>					4. Kc4 R3g4+ 5. Kc3 Rg3+ 6. Kb2
>>>>>					Rg2+ 7. Kc1 Rg1+ 8. Kd2 R1g2+ 9.
>>>>>					Ke3 R2g3+ 10. Ke2 Rg2+ 11. Kf1
>>>>>					Rg1+ 12. Kf2
>>>>>0:00	3/5	0.00	45109		1...R2g3+ 2. Kc2 Rg2+ 3. Kd3 R2g3+
>>>>>					4. Kc4 R3g4+ 5. Kc3 Rg3+ 6. Kb2
>>>>>					Rg2+ 7. Kc1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 R3g4+ 5. Kc3 Rg3+ 6. Kb2
>>>>>					Rg2+ 7. Kc1 Rg1+ 8. Kd2 R1g2+ 9.
>>>>>					Ke3 R2g3+ 10. Ke2 Rg2+ 11. Kf1
>>>>>					Rg1+ 12. Kf2 R1g2+ 13. Ke3
>>>>>
>>>>>jm
>>>>
>>>>
>>>>It isn't seeing "the draw".  It is seeing "a draw".
>>>
>>>
>>>
>>>I do not know
>>>The score is positive at depth 2/4 when the main line is 22 plies
>>>so it can see advantage for white and only later changes it's opinion to draw
>>>score.
>>>
>>>  "the draw" is way deep
>>>>here.  "the draw" is probably beyond 40 plies deep.
>>>
>>>It is possible that it can see 40 plies at depth 3/5 or bigger depthes
>>>45109 positions may be enough if you search the right lines.
>>
>>There is 24 distinctive positions where the white king can go. After the move 25
>>the rook can check and find that as repetition. So, that is 50 plies. However,
>>with check extensions it is just 25 plies. With some other extensions
>>this can be reduced considerably. Besides, hashtables can be tricking here the
>>program to see the draw earlier since 25 plies is true with a certain move
>>ordering. Otherwise, the hashtable will start to be filled up with draw scores
>>earlier (which in this case helps but it could be wrong). IMHO, I think that it
>>is possible that CM is seeing "the" draw.
>>
>>Regards,
>>Miguel
>>
>
>
>I suspect not based on the PV.  Because the _first_ draw that should be seen
>is the deepest one.  Otherwise that longest PV should be able to hide a draw
>until it is penetrated.
>
>With CM I could easily be wrong.  But then Crafty sees the repetition as well,
>and I am pretty sure _it_ can not go beyond 40 plies there although I did not
>check this by experimentation.
>
>Nonetheless, however, I would prefer if my program solved this the same way
>_I_ solve it.  I don't have to look at all the checks and responses.  I do it
>with a quick static analysis to be sure that the rook checks can't be stopped
>by the queen nor can the king hide from them.  I shudder, even if my program
>could find this in 1 second, because it may well reach that end position in
>a terminal position and say "I am a pawn ahead, I will take this and be
>happy" only to discover in a while that it is a draw.



Actually, this is probably solvable today.  With the following approach.

1.  Write a piece of code that answers the question "which squares can the
king move to assuming that one of my rooks can't be captured, and the other
can't be attacked at all, or if it can be attacked, it is doubled so that it
can't be captured either."

2. Now you know which squares the king can get to.  Now you add code to ask "is
the king safe from check on any of those squares it can actually reach?"  IE
if the rook checks on one of its possible checking squares, will the king and
queen both attack that rook so that it can be removed along with the other
rook (two rooks for a queen).


Obviously that can't be done at every static evaluation, so you trigger it
only in cases where (say) the last N moves are rook checks.  IE maybe 4.  Then
you would only be evaluating that nonsense where it apparently makes some
sense, and only in positions where the opponent can't escape the checks over
the last N moves.

Might be worth a try, because I have seen other cases.  One a long time back
was Crafty as white where the opponent had a rook on the e file and a rook on
the f file but with pawns at f7/g7/h7.  The rook coul move back and forth and
check, and the damned program found a very tortuous path that involved
diagonally shifting the king up and down the three files so that it doubled
the necessary depth to see the repetition.  And it gleefully went for it.

That is actually stoppable, so long as the evaluation term is not called
unless it is deemed appropriate.  I think I'll add this to my to-do list.  :)




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.