Symbolic: First results with whole-tree mate search

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Symbolic: First results with whole-tree mate search

Post by sje »

Symbolic: First results with whole-tree mate search

I wrote up the Lisp version of the whole-tree mate search algorithm as described in the 2007.04.25 status report and tried it on several problems from BWTC and WAC.

There are a number of bugs in the code and redundancies in the search, to be sure. But it does seem to work. It was able to solve WAC.163 with just a 660 node search, and BWTC.0031 fell after only 130 nodes:

[D] 2qrr1n1/3b1kp1/2pBpn1p/1p2PP2/p2P4/1BP5/P3Q1PP/4RRK1 w - - 0 1

Code: Select all

1. Bxe6+ Bxe6 2. Qh5+ Nxh5 3. fxe6+ Kxe6
1. Qh5+
 1... Nxh5
  2. Bxe6+ Bxe6 3. fxe6+ Kxe6
  2. fxe6+ Kg6 3. Bc2+ Kg5 4. h4+
       4... Kg4
        5. Bd1+
         5... Kg3
          6. Re3+ Kxh4 7. Rh3+ Kg5 8. Rxh5+ Kg6 9. Bc2+ Kxh5
          6. Rf3+
           6... Kg4 7. Re4+ Nf4
              8. Rexf4+ Kh5 9. Rg3#
              8. Rfxf4+ Kg3
                9. Rf3#
                9. Rg4#
           6... Kxh4 7. Rh3+ Kg5
         5... Kxh4
        5. Bf5+ Kg3
          6. Re3+ Kxh4 7. Rh3+ Kg5 8. Rxh5+ Kxh5
          6. Rf3+ Kxh4 7. Rh3+ Kg5
        5. Re4+
         5... Kg3
          6. Re3+ Kg4
            7. Bd1+ Kxh4 8. Rh3+ Kg5 9. Rxh5+ Kg6 10. Bc2+ Kxh5
            7. Bf5+ Kxh4 8. Rh3+ Kg5 9. Rxh5+ Kxh5
          6. Rf3#
          6. Rg4+ Kxg4
         5... Nf4
          6. Rexf4+
           6... Kg3
            7. R1f3#
            7. Rg4+ Kxg4
           6... Kh5
            7. Bd1+ Kg6 8. Bc2+ Kh5
                9. Bd1+ Kg6 10. Bc2+ Kh5
                    11. Bd1+ Kg6 12. Bc2+ Kh5
                        13. Bd1+ Kg6 14. Bc2+ Kh5
                        13. Bg6+ Kxg6
                        13. g4+ Kxh4
                    11. Bg6+ Kxg6
                    11. g4+ Kxh4
                9. Bg6+ Kxg6
                9. g4+ Kxh4
            7. Bg6+ Kxg6
            7. g4+ Kxh4
          6. Rfxf4+
           6... Kg3
            7. Re3+ Kxf4 8. Rf3+ Kg4
            7. Rf3#
            7. Rg4#
           6... Kh5 7. Bd1+ Kg6
       4... Kxh4
 1... g6 2. Qxg6#
Allard Siemelink
Posts: 297
Joined: Fri Jun 30, 2006 9:30 pm
Location: Netherlands

Re: Symbolic: First results with whole-tree mate search

Post by Allard Siemelink »

sje wrote:Symbolic: First results with whole-tree mate search

There are a number of bugs in the code and redundancies in the search, to be sure. But it does seem to work. It was able to solve WAC.163 with just a 660 node search, and BWTC.0031 fell after only 130 nodes:
Interesting, my engine bright needs 692k and 132k nodes for these problems.
So, nodewise, your algorithm is 1000x more effective than bright's search, amazing!
What nps do you get?
Uri Blass
Posts: 10269
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Symbolic: First results with whole-tree mate search

Post by Uri Blass »

Allard Siemelink wrote:
sje wrote:Symbolic: First results with whole-tree mate search

There are a number of bugs in the code and redundancies in the search, to be sure. But it does seem to work. It was able to solve WAC.163 with just a 660 node search, and BWTC.0031 fell after only 130 nodes:
Interesting, my engine bright needs 692k and 132k nodes for these problems.
So, nodewise, your algorithm is 1000x more effective than bright's search, amazing!
What nps do you get?
I think that you cannot decide that his algorithm is 1000x more effective based on tactical problems.

There are search ideas that are productive for test suites but counter productive for positions when there is no tactics to solve.

pruning based on static evaluation when the remaining depth is small is productive for playing strength but counter productive for finding sacrifices.

Uri
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Symbolic: First results with whole-tree mate search

Post by sje »

Allard Siemelink wrote:Interesting, my engine bright needs 692k and 132k nodes for these problems.
So, nodewise, your algorithm is 1000x more effective than bright's search, amazing!
What nps do you get?
Node frequency ranges from the tens to hundreds per second.

Oh, and the WAC.163 (a mate in eleven) took 662 nodes, not 660.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

More comments on the first results of Symbolic's mate search

Post by sje »

More comments on the first results of Symbolic's mate search:

1. A big problem is that only the first move is coming back correctly, the PV return is having some trouble.

2. There is some redundancy in the routine that manufactures the next global threat. For example, it sometimes keeps trying threats along a line in which it's already gotten a forced checkmate from an earlier threat.

3. The productions that generate the metrics for mate attack/defend are woefully primitive. Newer productions will be much better overall, although slower and more complex. Getting BWTC.0031 in 130 nodes (and on the first try!) is not as good as Paradise's 109 nodes. On the other hand, Symbolic managed the search in under five seconds, a bit less than Paradise's twenty minutes. (ChessLisp on a 2006 MacPro Xeon vs MacLisp on a 1980 Digital PDP-10)

4. The threat generation scan is doing way more work than it would be doing if there were an incremental updating facility for the threat list. I'm talking O(N*N) vs O(N*log N) here.

5. There's still a huge amount of work remaining for the implementation of the planning generation and elaboration subsystem.

6. Time control is not yet implemented. At the moment, there's a hard coded limit of 1000 threat generations per problem.

7. In spite of the above glaring deficiencies, the mate search is surprisingly effective with locating the key move for a good number of tricky checkmating problems. For all of the problems tried, it was able to locate the key move and a proof in under a thousand nodes and usually in under a hundred nodes.