Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TB's & Castling (Opps, I did post the wrong FEN)

Author: Jeremiah Penery

Date: 20:13:43 03/06/02

Go up one level in this thread


On March 06, 2002 at 22:49:38, Slater Wold wrote:

>On March 06, 2002 at 22:27:17, Uri Blass wrote:
>
>>On March 06, 2002 at 19:18:16, Slater Wold wrote:
>>
>>>I am 100% sure TB's do indeed take castling into consideration.
>>
>>
>>No
>>You do not understand how tablebases work.
>>There are no moves in tablebases.
>>
>>The engine generates all the legal moves and looks in the tablebases after these
>>moves to see distance to mate.
>
>
>Um, well, according to Hyatt, it would tell the TB "o-o" and it wouldn't return
>anything.  I am very well aware how TB's work.

No, that's not how they work.  The engine would feed it the position after the
move O-O was made, and the TB would return MATE in 2.  But if you give the
position 2 plies before the castling, the TB will return MATE in 4, because it
didn't calculate the distance to mate with castling rights in consideration.  If
you feed Crafty the position where castling is possible, it will return the
correct Mate in 2 score, from tablebases.

White(1): new
White(1): 8/8/8/8/8/6P1/6k1/4KR1R w K -
White(1): analyze
Analyze Mode: type "exit" to terminate.
end-game phase
              clearing hash tables
              time surplus   0.00  time limit 30.00 (3:30)
         nss  depth   time  score   variation (1)
                1     0.00  21.61   1. g4
                1->   0.00  21.61   1. g43
                2     0.00  21.31   1. g4 Kg3
                2->   0.00  21.31   1. g4 Kg3
                3     0.00     ++   1. g4!!
                3     0.00  21.84   1. g4 Kg3 2. g5
                3     0.04  Mat06   1. Rf2+ Kxh1 <HT>
                3     0.04  Mat05   1. Rh2+ Kxh2 <HT>
                3     0.04  Mat04   1. Rh8 Kxg3 <HT>
                3->   0.04  Mat04   1. Rh8 Kxg3 <HT>
               <snip>
              endgame tablebase-> probes done=277  successful=153
analyze.White(1): Rf4
White(1): Rf4
              clearing hash tables
              time surplus   0.00  time limit 30.00 (3:30) [easy move]
         nss  depth   time  score   variation (1)
                1     0.00  12.45   1. ... Kxg3
                1->   0.00  12.45   1. ... Kxg3
                2     0.00     --   1. ... Kxg3
                2     0.00  Mat03   1. ... Kxg3 <HT>
                2->   0.00  Mat03   1. ... Kxg3 <HT>
                3     0.00  Mat03   1. ... Kxg3 <HT>
                3->   0.00  Mat03   1. ... Kxg3 <HT>
               <SNIP>
              endgame tablebase-> probes done=2  successful=2
analyze.Black(1): Kxg3
Black(1): Kxg3
              clearing hash tables
              time surplus   0.00  time limit 30.00 (3:30)
         nss  depth   time  score   variation (1)
                1     0.00  12.45   2. O-O
                1->   0.00  12.45   2. O-O4
                2     0.00     ++   2. O-O!!
                2     0.00  Mat02   2. O-O <HT>
                2->   0.00  Mat02   2. O-O <HT>
                3     0.00  Mat02   2. O-O <HT>
                3->   0.00  Mat02   2. O-O <HT>
                4     0.00  Mat02   2. O-O <HT>
                4->   0.00  Mat02   2. O-O <HT>
              time=0.04  cpu=0%  mat=10  n=19  fh=100%  nps=10k
              ext-> chk=0 cap=0 pp=0 1rep=0 mate=0
              predicted=0  nodes=19  evals=0
              endgame tablebase-> probes done=3  successful=3
              hashing-> trans/ref=82%  pawn=0%  used=0%
analyze.White(2):


>>If castling is legal then the engine looks at the tablebases to see the distance
>>to mate after castling in order to see the mate in 2 score.
>
>
>According to Hyatt, no it doesn't.

Uri was right, and that's exactly what they do.  It's just that they don't take
castling rights into consideration in the mate scores they return.  If castling
is possible at the root, the engine will generate that move and feed the
resulting position to the TB, which will return the now-correct mate score.

>The correct position is:
>
>[D]8/8/8/8/8/6P1/6k1/4KR1R w K -



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.