Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: detecting result by evaluation in Kp vs K positions

Author: Christophe Theron

Date: 09:14:35 02/08/04

Go up one level in this thread


On February 08, 2004 at 04:27:57, Uri Blass wrote:

>On February 07, 2004 at 23:37:31, Robert Hyatt wrote:
>
>>On February 07, 2004 at 18:26:00, Uri Blass wrote:
>>
>>>I started to work on having some evaluation about endgame and
>>>I wrote something to detect draws in KP vs K.
>>>
>>>It does not detect every possible draw but at least hopefully when it detect
>>>draw it is correct if I have no bugs.
>>>
>>>Tablebases is not a solution because they are too slow and I believe that
>>>generally functions are better because even in case of having tablebases if I do
>>>not probe them in the qsearch I may get KP vs K that I need to evaluate without
>>>tablebases and I want to return correct score without looking in tablebases.
>>>
>>>I read that yace is using bitbases even for 4 piece endgames when the bitbases
>>>give only win draw loss information and I guess that the bitbases were
>>>calculated from nalimov tablebases.
>>>
>>>I wonder what other people do in KP vs K endgame in case of not looking in
>>>tablebases(because the program does not support tablebases or because it is a
>>>qsearch node).
>>
>>I have special code. that handles two rules:
>>
>>1.  If the king is one square in front of the pawn, and has the opposition,
>>then the pawn queens.
>>
>>2.  If the king is two squares in front of the pawn, then the pawn queens no
>>matter what.
>>
>>A couple of special exception cases to make sure that the opponent can't capture
>>the pawn instantly, and you are done...  Just try Crafty with KP vs K and no
>>tables, to see what I mean...
>
>I started by having rules to find draws so later I do not need to check if the
>king can capture the pawn instantely except cases when the pawn is in the second
>rank because it is one of the cases when draw should be detected based on
>distances.
>
>Note that I already checked if this rule is correct and I found that it is not
>correct
>
>[D]8/K7/8/5k2/8/3P4/8/8 w - - 0 1
>
>In this position my latest version plays d4 with draw score when Kb6 is winning
>but is evaluated as a draw because the black king is closer to the pawn relative
>to the white king and it is black to move and the pawn is not in the second
>rank.
>
>I still think that it is possible to have always correct rules based on distance
>but it is not so simple.
>
>Maybe distance to block the pawn is better but in this case I need to check that
>the pawn is not in the 7th because in these cases the king can block the pawn
>and still lose.
>
>Uri



I have a KPK code that works in almost all cases, including this one. So it is
possible to write it.

Be prepared however to spend several days on it. I think it took me one week and
loads of aspirin. I don't want to touch this code anymore! :)



    Christophe



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.