Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to evaluate KQ vs KR?

Author: Uri Blass

Date: 15:39:07 05/05/04

Go up one level in this thread


On May 05, 2004 at 18:21:39, Sune Fischer wrote:

>On May 05, 2004 at 17:47:08, Dieter Buerssner wrote:
>
>>On May 05, 2004 at 07:22:58, Tord Romstad wrote:
>>
>>>On May 04, 2004 at 16:46:14, Dieter Buerssner wrote:
>>>>score = 400 + 1/8 * dist(K_l,R) - 1/8 * edge_dist(K_l)
>>>>            - 1/8 * corner_dist(K_l) - 1/8 * dist(K_l, K_w)
>>
>>>I will experiment with something similar than that.  If the formula is
>>>really effective, I think a constant bigger than 400 would be a good idea,
>>>though.
>>
>>I just tried it (only once). As noted in another post, I gave the formula wrong.
>>I used (in centipawn) a factor of 12 (instead of 1/8) and a constant of 600
>>(which won't matter for that experiment). It was winning a 1 0 game, but
>>captured the R only in move 48. Then I tried this:
>>
>>  /* initialize squares of the pieces and side of queen */
>>  score = 600 + 6*DISTANCE(kl,r) - 12*EDGE_DIST(kl)
>>          - 12*CORNER_DIST(kl) - 8*DISTANCE(kl,kw);
>>  if (EDGE_DIST(kw) < 2) /* Keep winning K away from the edge */
>>    score += 4 * (EDGE_DIST(kw)-2);
>>  return (ws == side) ? score : -score;
>>
>>
>>I started with the maximum mate distance pos in KQKR, which is mate in 35. White
>>played without TBs (and without bitbases), black played with TBs. Game in one
>>minute. White could win. I also tried game in 0 with 1s increment, and white won
>>again.
>>
>>Perhaps, in another position, 1 minute would not be enough.
>>
>>The overhead of adding this should be very little (I did not measure it,
>>however). I already have some ifs in eval, where non pawn positions are
>>detected, and somwhere inside this, only one further if had to be added.
>
>Why do you use special code for this endgame?
>
>I just use the same 10 lines for all endgames, the common heuristic is to drive
>the enemy king to the corner.

and to reduce the distance between the kings.

>
>In a 5 second game it can mate against itself in tough positions like KQKR and
>KBNK, usually with 2 seconds to spare.

KBNK is impossible to mate if you go to the wrong corner and if you do not have
special code then you will probably not win against tablebase defence.

Uri



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.