Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to evaluate KQ vs KR?

Author: Dieter Buerssner

Date: 14:47:08 05/05/04

Go up one level in this thread


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.

[Event "1 Minutes/Game"]
[Site "Engine Match"]
[Date "2004.05.05"]
[Round "1"]
[White "Yace 0.99.86 no TBs"]
[Black "Yace 0.99.86"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/8/2r5/8/2k5/K6Q w - -"]

1. Qh2+ {+5.28/10 2s} Kc3 {-M34/74 0s} 2. Qg3+ {+5.30/11
2s} Kc2 {-M33/72 0s} 3. Qa3 {+5.38/12 1s} Kd2 {-M32/70 0s}
4. Kb1 {+5.42/12 1s} Rc3 {-M31/68 0s} 5. Qa5 {+5.42/10 0s}
Kd3 {-M30/66 0s} 6. Qd5+ {+5.44/11 1s} Ke3 {-M29/64 0s}
7. Kb2 {+5.46/12 1s} Rd3 {-M28/62 0s} 8. Qe5+ {+5.52/11 0s}
Kd2 {-M27/60 0s} 9. Qc5 {+5.52/11 0s} Ke2 {-M27/60 0s}
10. Kc2 {+5.54/11 0s} Rd2+ {-M27/60 0s} 11. Kc3 {+5.54/12
1s} Rd3+ {-M26/58 0s} 12. Kc4 {+5.54/11 1s} Rg3 {-M25/56
0s} 13. Qh5+ {+5.62/9 0s} Ke3 {-M24/54 0s} 14. Qe5+
{+5.62/9 1s} Kf2 {-M23/52 0s} 15. Kd4 {+5.66/9 0s} Rb3
{-M22/50 0s} 16. Qd6 {+5.66/9 0s} Rf3 {-M22/50 0s} 17. Qh2+
{+5.70/10 0s} Ke1 {-M21/48 0s} 18. Qg1+ {+5.70/10 1s} Ke2
{-M20/46 0s} 19. Qg2+ {+5.74/10 1s} Rf2 {-M19/44 0s}
20. Qe4+ {+5.78/10 0s} Kf1 {-M18/42 0s} 21. Qg4 {+5.78/10
1s} Rf8 {-M18/42 0s} 22. Ke3 {+5.80/8 0s} Re8+ {-M18/42 0s}
23. Kf3 {+5.82/9 0s} Rf8+ {-M17/40 0s} 24. Kg3 {+5.90/9 0s}
Rd8 {-M16/38 0s} 25. Qc4+ {+5.90/8 0s} Ke1 {-M15/36 0s}
26. Qb4+ {+5.90/9 0s} Kd1 {-M14/34 0s} 27. Kf2 {+6.02/9 0s}
Kc2 {-M13/32 0s} 28. Qa4+ {+6.02/8 0s} Kb2 {-M13/32 0s}
29. Qb5+ {+14.31/9 0s} Kc2 {-M12/30 0s} 30. Qf5+ {+14.39/9
0s} Kb3 {-M11/28 0s} 31. Qf7+ {+14.41/8 0s} Ka4 {-M10/26
0s} 32. Qc4+ {+14.39/8 0s} Ka3 {-M9/24 0s} 33. Qa6+
{+14.41/8 0s} Kb4 {-M8/22 0s} 34. Qb6+ {+14.47/9 0s} Kc4
{-M7/20 0s} 35. Qxd8 {+14.57/10 0s} Kc5 {-M6/18 0s} 36. Ke3
{+14.65/9 0s} Kc6 {-M5/16 0s} 37. Kd4 {+M5/9 0s} Kb5
{-M4/14 0s} 38. Qd6 {+M4/13 0s} Ka4 {-M3/12 0s} 39. Kc4
{+M3/11 0s} Ka5 {book 0s} 40. Qh6 {+M2/9 0s} Ka4 {book 0s}
41. Qa6+ {+M1/7 0s} 1-0

Note, that the theoretical distance to mate never increased. 6 times it did not
decrease. But this might be pure luck.

Regards,
Dieter



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.