Page 2 of 4

Re: Still looking for the engine that can analyze this posit

Posted: Wed Dec 01, 2010 9:22 pm
by vladstamate
One of the reasons almost all engines crash is stack overflow. The QS in this position can go very deep. In Plisk it went to depth 69 before it exploded. Because all moves are captures

A brute force searcher will die even worse because the branching factor of this position increases with depth. Here is a perft

Code: Select all

1           22
2          562
3        18082
4       631076
5     25142756
Regards,
Vlad.

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 1:27 am
by MikeB
Dann Corbit wrote:[d]qqqqkqqq/qqqqqqqq/qqqqqqqq/qqqqqqqq/QQQQQQQQ/QQQQQQQQ/QQQQQQQQ/QQQQKQQQ w - -

What do you mean it's not a real chess position? I want to see it analyzed.

So far, every engine has crashed instantly except Rybka of all the engines that I tried, but Rybka refused to utter a single syllable after 15 mintues of thought. I think the slimy fish knows the answer, but he's not telling just to spite me.
slightly different twist -


max threads set to 1.
White(1): [d] 3qk3/qqqqqqqq/8/8/8/8/QQQQQQQQ/3QK3 w - - 0 0

Code: Select all

White(1): g
              time surplus   0.00  time limit 30:00 (+0.00) (30:00)
              depth   time  score   variation (1)
                1    13.11  12.68   1. Qaxf7+  (4.4Mnps)
                1->  13.14  12.68   1. Qaxf7+  (4.4Mnps)
                2    13.14  12.68   1. Qaxf7+ Qxf7 2. Qcxh7
                2->  13.17  12.68   1. Qaxf7+ Qxf7 2. Qcxh7
                3    13.19  12.68   1. Qaxf7+ Qxf7 2. Qcxh7
                3->  13.20  12.68   1. Qaxf7+ Qxf7 2. Qcxh7
                4    13.22     +1   1. Qaxf7+!
                4    13.22     +3   1. Qaxf7+!
                4    13.22     +M   1. Qaxf7+!
                4    13.22  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qhxf8#
                4->  13.25  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qhxf8#
                5    13.25  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
                5->  13.26  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
                6    13.28  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
                6->  13.30  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
                7    13.31  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
                7->  13.34  Mat04   1. Qaxf7+ Qxf7 2. Qh8+ Qxh8 3. Qxh8+
                                    Qf8 4. Qgg6#
              time=13.36  mat=0  n=58429045  fh=98%  nps=4.4M
              extensions=566 qchecks=10K reduced=959 pruned=18K
              predicted=0  evals=64K  50move=0  EGTBprobes=0  hits=0
              SMP->  splits=0  aborts=0  data=0/256  elap=13.36

mate in 4 moves.

White(1): Qaxf7+
              time used:  13.36
Black(1):
Crafty has no output for 13 seconds and then annouces mate-in-4. The position is not possibe from a real game of chess - but Crafty sees the 8+1 queens on both sides and is happy to oblige. One oddity whether I use four cores or one core, Crafty takes about the same amount of time with the about same # of nps.

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 1:32 am
by Kirk
Dann Corbit wrote:[d]qqqqkqqq/qqqqqqqq/qqqqqqqq/qqqqqqqq/QQQQQQQQ/QQQQQQQQ/QQQQQQQQ/QQQQKQQQ w - -

What do you mean it's not a real chess position? I want to see it analyzed.

So far, every engine has crashed instantly except Rybka of all the engines that I tried, but Rybka refused to utter a single syllable after 15 mintues of thought. I think the slimy fish knows the answer, but he's not telling just to spite me.
Chesspartner 5.4 did not collapse, but after ten plus minutes is sticking with its pick made at around two minutes :lol:

Engine was Hagrid 0.7.56

00:00:00.0 -3.35 1 10 Qaxb5
00:00:00.0 0.13 2 655 Qaxb5 Qhxg4
00:00:00.0 -3.04 3 902 Qaxb5 Qaxb5 Qgxh5
00:00:00.2 -2.94 4 98369 Qaxb5 Qaxb5 Qgxh5 Qaa4 Qbxa4
00:00:01.5 -3.18 5 742710 Qaxb5 Qaxb5 Qgxh5 Qaa4 Qgg4
00:00:02.3 -3.04 6 1229579 Qaxb5 Qaxb5 Qgxh5 Qaa4 Qgg4 Q7a5 Qgxf5 Qgxf5
00:00:04.5 -3.16 7 2618359 Qaxb5 Qaxb5 Qgxh5 Qaa4 Qgg4 Q7a5 Qgxf5 Q6xf5
00:00:12.7 -3.07 8 7692353 Qaxb5 Qaxb5 Qgxh5 Qaa6 Qgg4 Q8a7 Qaa4 Qaa8 Qbxa5 Q6xa5 Qgxf5 Qgxf5
00:00:55.6 -3.16 9 31651366 Qaxa5 Q6xa5 Qgxh5 Qbb6 Qaa4 Q8b7 Qgg4 Qba8 Qgg3
00:02:16.2 -3.02 10 76775070 Qaxa5 Q6xa5 Qgxh5 Qbb6 Qgg4 Qbb7 Qgxf5 Qaxb4 Qhxg5 Qxc3 Q2xc3 Qgxf5

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 1:33 am
by Milos
MikeB wrote: The position is not possibe from a real game of chess - but Crafty sees the 8+1 queens on both sides and is happy to oblige.
Why it is not possible???
It's quite possible, it's however highly improbable.

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 1:55 am
by Dann Corbit
My move would be Qe4xe5

I'm boring a hole straight towards the enemy king.
I have no idea if it would work, but it seems like it would be fun and full of fireworks.

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 2:18 am
by mhalstern
The fritz12 Gui dosen't understand the illegality of the position and will let any engine play from it. It only considers illegal positions as those with more extra pieces than pawns could have been promoted to.

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 2:21 am
by mhalstern
At first, I thought stockfish crashed, as it took a while to display any output, but it then "instantly" announced the mate in 4.

New game
3qk3/qqqqqqqq/8/8/8/8/QQQQQQQQ/3QK3 w - - 0 1

Analysis by Stockfish 1.9 JA 64bit:

1.Qaxf7+ Qgxf7 2.Qh8+ Qxh8 3.Qxh8+ Qff8 4.Qhxf8#
+- (#4) Depth: 6 00:00:00 3434kN

(Doe, 01.12.2010)

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 2:23 am
by Graham Banks
Milos wrote:
MikeB wrote: The position is not possibe from a real game of chess - but Crafty sees the 8+1 queens on both sides and is happy to oblige.
Why it is not possible???
It's quite possible, it's however highly improbable.
Wouldn't the last move have had to have been a pawn promoting to a queen, in which case the square from which it had moved would be empty?

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 2:48 am
by bob
George Tsavdaris wrote:
bob wrote: Crafty won't crash. But it will produce the correct error messages:

illegal position, too many white queens
illegal position, too many white pieces
illegal position, too many black queens
illegal position, too many black pieces
bad string = "qqqqkqqq/qqqqqqqq/qqqqqqqq/qqqqqqqq/QQQQQQQQ/QQQQQQQQ/QQQQQQQQ/QQQQKQQQ"
Illegal position, using normal initial chess position

Which is what a reasonable program ought to produce.
A reasonable Chess program i guess you mean, because a reasonable general program for Chess variations should produce analysis. :D
IMHO we are talking _legal_ chess positions. Which means no more than 8 white or black pawns, no more than 9 white or black queens, no more than 10 white or black knights, bishops and rooks, and total pawns + total pieces <= 16.

Anything else is simply illegal. If you want a program to accept illegal input and analyze illegal "chess" positions, that is a different issue. Certainly "problem composition" contests and such require legal positions. I do not check to see if a position is perfectly legal, which means that there must have been a move by the side not on move that could actually reach this position, backing up all the way to the original starting position. That is a bit much to compute...



But as you put it, a reasonable Chess program should also produce an error message for the above position too. Does Crafty produces it or analyzes the position?
If the latter happens then Crafty is selective in analyzing non-Chess positions. and i guess the latter happens.

So instead of being selective in what positions to analyze it should just analyze them all, if the board is 8x8 and the pieces are all Chess pieces.
At least i find this better behavior than being selective. :D

[d]5r2/2k1p3/1bnp4/2p2N2/p3KP2/6P1/P1P5/1B2R3 w - - 0 1

Re: Still looking for the engine that can analyze this posit

Posted: Thu Dec 02, 2010 2:51 am
by bob
zullil wrote:
George Tsavdaris wrote: But as you put it, a reasonable Chess program should also produce an error message for the above position too. Does Crafty produces it or analyzes the position?

[d]5r2/2k1p3/1bnp4/2p2N2/p3KP2/6P1/P1P5/1B2R3 w - - 0 1
Crafty finds this impossible position acceptable:

Code: Select all

Crafty v23.4 &#40;16 cpus&#41;

White&#40;1&#41;&#58; setboard 5r2/2k1p3/1bnp4/2p2N2/p3KP2/6P1/P1P5/1B2R3 w - - 0 1
White&#40;1&#41;&#58; st 180
search time set to 180.00.
White&#40;1&#41;&#58; display

       +---+---+---+---+---+---+---+---+
    8  |   | . |   | . |   |<R>|   | . |
       +---+---+---+---+---+---+---+---+
    7  | . |   |<K>|   |<P>|   | . |   |
       +---+---+---+---+---+---+---+---+
    6  |   |<B>|<N>|<P>|   | . |   | . |
       +---+---+---+---+---+---+---+---+
    5  | . |   |<P>|   | . |-N-| . |   |
       +---+---+---+---+---+---+---+---+
    4  |<P>| . |   | . |-K-|-P-|   | . |
       +---+---+---+---+---+---+---+---+
    3  | . |   | . |   | . |   |-P-|   |
       +---+---+---+---+---+---+---+---+
    2  |-P-| . |-P-| . |   | . |   | . |
       +---+---+---+---+---+---+---+---+
    1  | . |-B-| . |   |-R-|   | . |   |
       +---+---+---+---+---+---+---+---+
         a   b   c   d   e   f   g   h

White&#40;1&#41;&#58; display stats
display statistics at end of each search.
White&#40;1&#41;&#58; go
              time limit 3&#58;00 (+0.00&#41; &#40;3&#58;00&#41;
              depth   time  score   variation &#40;1&#41;
starting thread 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <done>
               11->   0.06   0.42   1. Ne3 e6 2. c4 Rh8 3. g4 Nd4 4. g5
                                    Ba5 5. Rd1 Rh2 6. g6
               12     0.09   0.38   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2
               12->   0.09   0.38   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2
               13     0.11   0.25   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2 7. a3
               13->   0.12   0.25   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2 7. a3 &#40;s=2&#41;
               14     0.16   0.35   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2 7. Ra7 Kb6
               14->   0.18   0.35   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Ba5 5. Bd3 Rb8 6. g4 Rb2 7. Ra7 Kb6
               15     0.24   0.15   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Bc7 5. Bd3 Rb8 6. f5 exf5+ 7. Nxf5
                                    Rb2 8. Nxd4+ cxd4
               15->   0.32   0.15   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Bc7 5. Bd3 Rb8 6. f5 exf5+ 7. Nxf5
                                    Rb2 8. Nxd4+ cxd4 &#40;s=2&#41;
               16     0.45   0.00   1. Ne3 e6 2. c4 Nd4 3. Rh1 Kc6 4. Rh7
                                    Bc7 5. Bd3 Rb8 6. Nc2 Rb2 7. Nxd4+
                                    cxd4 8. g4 e5
               16     0.86   0.33   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. Kf3 Ne5+ 6. Kg3 Rf7 7. fxe5
                                    Rxg7 8. exd6 Bxd6+ 9. Kf3 Rf7+ 10.
                                    Ke4
               16->   0.89   0.33   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. Kf3 Ne5+ 6. Kg3 Rf7 7. fxe5
                                    Rxg7 8. exd6 Bxd6+ 9. Kf3 Rf7+ 10.
                                    Ke4
               17     1.04   0.24   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. f5 d5+ 6. Kf3 Ne5+ 7. Ke2 exf5
                                    8. Bxf5+ Kd6 9. Ne6 Rf7 10. Nxc7 Rxc7
               17->   1.12   0.24   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. f5 d5+ 6. Kf3 Ne5+ 7. Ke2 exf5
                                    8. Bxf5+ Kd6 9. Ne6 Rf7 10. Nxc7 Rxc7
               18     1.37   0.02   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. Kf3 Ne5+ 6. Kg3 Nxg4 7. Kxg4
                                    Rg8 8. Rxe6 Rxg7+ 9. Rg6 Rxg6+ 10.
                                    Bxg6
               18->   2.20   0.02   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. g4
                                    Bc7 5. Kf3 Ne5+ 6. Kg3 Nxg4 7. Kxg4
                                    Rg8 8. Rxe6 Rxg7+ 9. Rg6 Rxg6+ 10.
                                    Bxg6 &#40;s=4&#41;
               19     2.56   0.11   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. Kf3
                                    Ne5+ 5. Ke2 Ng4 6. Rxe6 Bxc3 7. Rg6
                                    Nf6 8. Bc2 a3 9. Kd3 Bd4 10. Ba4+ Ke7
                                    11. Nf5+ Kf7 &#40;s=3&#41;
               19->   3.28   0.11   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. Kf3
                                    Ne5+ 5. Ke2 Ng4 6. Rxe6 Bxc3 7. Rg6
                                    Nf6 8. Bc2 a3 9. Kd3 Bd4 10. Ba4+ Ke7
                                    11. Nf5+ Kf7 &#40;s=3&#41;
               20     4.34   0.14   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. Kf3
                                    Ne5+ 5. Ke2 Rb8 6. Bc2 Ng4 7. Re4 Rb2
                                    8. Kd2 Rxa2 9. Rxa4 Rxa4 10. Bxa4+
                                    Ke7 11. Kd3 &#40;s=2&#41;
               20->   5.22   0.14   1. c3 Ba5 2. Re3 e6 3. Ng7 Kd7 4. Kf3
                                    Ne5+ 5. Ke2 Rb8 6. Bc2 Ng4 7. Re4 Rb2
                                    8. Kd2 Rxa2 9. Rxa4 Rxa4 10. Bxa4+
                                    Ke7 11. Kd3
               21     9.28   0.06   1. c3 Ba5 2. Re3 Kd7 3. g4 e6 4. Ng7
                                    Bc7 5. Kf3 Ne5+ 6. Kg3 Nxg4 7. Kxg4
                                    Rg8 8. Rxe6 Rxg7+ 9. Rg6 Rxg6+ 10.
                                    Bxg6 Ke6 11. c4 Kf6
               21    20.10   0.33   1. c4 e6 2. Ne3 Nd4 3. Rh1 Kc6 4. Rh6
                                    Ba5 5. Bd3 Be1 6. Rg6 Bf2 7. Nc2 Re8
                                    8. Nxd4+ cxd4 9. g4 Re7 10. Rg8 Rh7
                                    11. Rc8+ Kb6
               21->  20.79   0.33   1. c4 e6 2. Ne3 Nd4 3. Rh1 Kc6 4. Rh6
                                    Ba5 5. Bd3 Be1 6. Rg6 Bf2 7. Nc2 Re8
                                    8. Nxd4+ cxd4 9. g4 Re7 10. Rg8 Rh7
                                    11. Rc8+ Kb6 &#40;s=3&#41;
               22    25.17   0.36   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. g4 Kc6 6. Nc2 d5+ 7. Ke3 Bc3
                                    8. Nxd4+ Bxd4+ 9. Kf3 Rb2 10. Rh6 Kd7
                                    11. a3 Rf2+ 12. Kg3 Rb2 13. Rh7+ Kd6
                                    &#40;s=2&#41;
               22->  27.35   0.36   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. g4 Kc6 6. Nc2 d5+ 7. Ke3 Bc3
                                    8. Nxd4+ Bxd4+ 9. Kf3 Rb2 10. Rh6 Kd7
                                    11. a3 Rf2+ 12. Kg3 Rb2 13. Rh7+ Kd6
               23    34.03   0.39   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. g4 Kc6 6. f5 exf5+ 7. gxf5 Rb2
                                    8. f6 Rxa2 9. f7 Ne6 10. Rh5 Rb2 11.
                                    Nd1 Rg2 12. Ne3
               23->  36.94   0.39   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. g4 Kc6 6. f5 exf5+ 7. gxf5 Rb2
                                    8. f6 Rxa2 9. f7 Ne6 10. Rh5 Rb2 11.
                                    Nd1 Rg2 12. Ne3
               24    45.77   0.19   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Nc2
                                    Ne2 5. Kf3 Nc3 6. Ne3 Nxb1 7. Rxb1
                                    Kc6 8. g4 Rh8 9. g5 Bd2 10. Ke4 Bxe3
                                    11. Kxe3 Rh3+ 12. Ke4 Rc3 13. f5 Rxc4+
                                    14. Kd3
               24->  53.60   0.19   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Nc2
                                    Ne2 5. Kf3 Nc3 6. Ne3 Nxb1 7. Rxb1
                                    Kc6 8. g4 Rh8 9. g5 Bd2 10. Ke4 Bxe3
                                    11. Kxe3 Rh3+ 12. Ke4 Rc3 13. f5 Rxc4+
                                    14. Kd3
               25     1&#58;05   0.19   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Nc2
                                    Ne2 5. Kf3 Nc3 6. Ne3 Nxb1 7. Rxb1
                                    Kc6 8. g4 Bc3 9. Ke4 Rh8 10. Rc1 Bd4
                                    11. g5 Bxe3 12. Kxe3 Rh2 13. Ra1
               25->   1&#58;16   0.19   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Nc2
                                    Ne2 5. Kf3 Nc3 6. Ne3 Nxb1 7. Rxb1
                                    Kc6 8. g4 Bc3 9. Ke4 Rh8 10. Rc1 Bd4
                                    11. g5 Bxe3 12. Kxe3 Rh2 13. Ra1
               26     1&#58;58   0.33   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. Rh7+ Kc6 6. Ra7 Bc7 7. Ra6+
                                    Kb7 8. Rxa4 Kc6 9. Nc2 Rg8 10. Nxd4+
                                    cxd4 11. Kf3 e5 12. Rb4 Rh8 13. a4
                                    Rh2 14. Rb5 Ra2 15. Be4+ Kd7
               26->   2&#58;18   0.33   1. c4 e6 2. Ne3 Nd4 3. Rh1 Ba5 4. Bd3
                                    Rb8 5. Rh7+ Kc6 6. Ra7 Bc7 7. Ra6+
                                    Kb7 8. Rxa4 Kc6 9. Nc2 Rg8 10. Nxd4+
                                    cxd4 11. Kf3 e5 12. Rb4 Rh8 13. a4
                                    Rh2 14. Rb5 Ra2 15. Be4+ Kd7
              time=3&#58;00  mat=0  n=4141454327  fh=89%  nps=23.0M       
              extensions=99.8M qchecks=247.2M reduced=407.2M pruned=767.2M
              predicted=0  evals=1707.5M  50move=0  EGTBprobes=1K  hits=1K
              SMP->  splits=351522  aborts=52237  data=91/1024  elap=3&#58;00
terminating SMP processes.
White&#40;1&#41;&#58; c4
              time used&#58;   3&#58;00
Black&#40;1&#41;&#58; quit
All I try to do is to verify that the position appears legal to a cursory look, by counting total pieces and pawns. To be strictly correct, a position must be reachable from the starting position, which is beyond computationally tractable.

One could catch your case with two unmoved pawns and a bishop on an impossible starting square, although that position could be legal for FR chess. But no position with more than 9 queens on one side can be legal, either in regular or FRC variations.