How do you handle this position ?

Discussion of chess software programming and technical issues.

Moderator: Ras

Carbec
Posts: 162
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

How do you handle this position ?

Post by Carbec »

Hi,
In my game against Pedantic, Zangdar failed this : [d]"2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28 "; There is a forced mate indeed, but it causes a lot of problems , like draw detection, quiescence with checks, aspiration window too small/large.
Of course programs like Stockfish have no such problem. But its still an interesting debug position.
But im just a noob)

Philippe

how do I display the diagram ???
User avatar
Ras
Posts: 2695
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: How do you handle this position ?

Post by Ras »

No big deal for my mid-range engine if it has around a second for thinking:

Code: Select all

info depth 2 seldepth 2 score cp -56 time 13 nodes 442 nps 34000 hashfull 0 pv h7b7 d8a5
info depth 3 seldepth 4 score cp -95 time 14 nodes 2493 nps 178071 hashfull 0 pv h7b7 c8c7 e1e5 g5h6
info depth 4 seldepth 5 score cp -32 time 17 nodes 8415 nps 495000 hashfull 0 pv e1e5 g5f6 h7b7 d8a5 b7h7
info depth 5 seldepth 6 score cp -79 time 23 nodes 22579 nps 981695 hashfull 0 pv e1g1 g5f4 h7b7 d8c7 b7a6 f4f5
info depth 6 seldepth 8 score cp -96 time 37 nodes 51984 nps 1404972 hashfull 0 pv e1g1 g5f4 h7b7 d8c7 b7a6 g6g5 c3e2 f4f3
info depth 7 seldepth 7 score cp -83 time 41 nodes 60467 nps 1474804 hashfull 1 pv e1g1 g5f4 h7b7 d8c7 b7a6 f4f5 g1g2
info depth 8 seldepth 8 score cp -86 time 85 nodes 150851 nps 1774717 hashfull 2 pv e1g1 g5f4 g1g6 c8c3 b2c3 d8e7 h7h5 f4e3
info depth 9 seldepth 10 score cp -47 time 121 nodes 226116 nps 1868727 hashfull 3 pv e1g1 g5f4 g1g6 f4e3 h7b7 d8e7 b7a6 e3d4 a6a4 d4c5
info depth 10 seldepth 10 score cp -30 time 400 nodes 808533 nps 2021332 hashfull 14 pv h7f7 e8g8 e1g1 g5h6 g1h1 h6g5 h1g1
info depth 11 seldepth 11 score cp -30 time 448 nodes 911898 nps 2035486 hashfull 15 pv h7f7 e8g8 e1g1 g5h6 g1h1 h6g5 h1g1
info depth 12 seldepth 12 score cp -30 time 751 nodes 1512681 nps 2014222 hashfull 25 pv h7f7 e8g8 e1g1 g5h6 g1h1 h6g5 h1g1
info depth 13 seldepth 13 score mate 6 time 940 nodes 1905856 nps 2027506 hashfull 33 pv e1g1 g5f4 h7h2 f4e3 g1g4 c8c3 h2h3 e3d2 g4g2 d2e1 h3h1
info time 1000 nodes 2026593 nps 2026593 hashfull 34 currmove h7e7 currmovenumber 38
info depth 14 seldepth 14 score mate 6 time 1001 nodes 2027373 nps 2025347 hashfull 34 pv e1g1 g5f4 h7h2 f4e3 g1g4 c8c3 h2h3 e3d2 g4g2 d2e1 h3h1
bestmove e1g1
Rasmus Althoff
https://www.ct800.net
User avatar
Ajedrecista
Posts: 2098
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: How do you handle this position?

Post by Ajedrecista »

Hello Philippe:
Carbec wrote: Sun Jul 30, 2023 5:56 pm Hi,
In my game against Pedantic, Zangdar failed this : [d]"2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28 "; There is a forced mate indeed, but it causes a lot of problems , like draw detection, quiescence with checks, aspiration window too small/large.
Of course programs like Stockfish have no such problem. But its still an interesting debug position.
But im just a noob)

Philippe

how do I display the diagram ???
I use the following format to show boards:

Code: Select all

[d]2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28
[d]2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28

This is, the diagramme [d] tag with the FEN string without quotation marks and without [/d]. I guess that FEN tags also work, but get rid of the quotation marks (" ") and the semicolon (;).

Regards from Spain.

Ajedrecista.
User avatar
Ras
Posts: 2695
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: How do you handle this position?

Post by Ras »

Ajedrecista wrote: Sun Jul 30, 2023 7:28 pmI use the following format to show boards:
And then it still doesn't work because the Javascript is on HGM's server, and that is using a self-signed certificate so that the browser rejects it. At least, if you load TC over https.
Rasmus Althoff
https://www.ct800.net
User avatar
Ajedrecista
Posts: 2098
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: How do you handle this position?

Post by Ajedrecista »

Hello Rasmus:
Ras wrote: Sun Jul 30, 2023 7:30 pm
Ajedrecista wrote: Sun Jul 30, 2023 7:28 pmI use the following format to show boards:
And then it still doesn't work because the Javascript is on HGM's server, and that is using a self-signed certificate so that the browser rejects it. At least, if you load TC over https.
True, this is the known issue of not showing boards on https://. Browsing through the mobile phone, I am able to see correctly my board while Philippe's is wrong: the quotation marks and the semicolon make a change on the FEN string, showing an odd board looking like this, creating a fake a8 dark empty square, with the true a8-h8 file being b8-i8 and 'dark on right' instead 'light on right':

Code: Select all

  +---+---+---+---+---+---+---+---+---+
8 | · |   | · | r | q | r | · |   | · |
  +---+---+---+---+---+---+---+---+---+
7 | p | b |   | · |   | · |   | Q |
  +---+---+---+---+---+---+---+---+
6 | · |   | · |   | p |   | p |   |
  +---+---+---+---+---+---+---+---+
5 |   | P |   | p |   | · | k | · |
  +---+---+---+---+---+---+---+---+
4 | · |   | · | P | · |   | · |   |
  +---+---+---+---+---+---+---+---+
3 |   | · | N | · |   | · |   | · |
  +---+---+---+---+---+---+---+---+
2 | P | P | · |   | · |   | · |   |
  +---+---+---+---+---+---+---+---+
1 |   | K |   | · | R | · |   | · |
  +---+---+---+---+---+---+---+---+
    a   b   c   d   e   f   g   h   i
Hence my tip of only use the FEN string without other symbols.

Regards from Spain.

Ajedrecista.
alessandro
Posts: 52
Joined: Tue Aug 12, 2014 11:21 am
Location: Lund
Full name: Alessandro Iavicoli

Re: How do you handle this position ?

Post by alessandro »

Carbec wrote: Sun Jul 30, 2023 5:56 pm Hi,
In my game against Pedantic, Zangdar failed this : [d]"2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28 "; There is a forced mate indeed, but it causes a lot of problems , like draw detection, quiescence with checks, aspiration window too small/large.
Of course programs like Stockfish have no such problem. But its still an interesting debug position.
But im just a noob)

Philippe
What is the problem with this position, exactly?
AdaChess, which is a moderately weak engine, found the Mate in 6 in 2 seconds. Here's the output:

Code: Select all

AdaChess 3.9.8-dev - Smart Chess Engine
Total 0 opening book entries
AdaChess v.3.9.0-dev => setboard 2rqr3/pb5Q/4p1p1/1P1p2k1/3P4/2N5/PP6/1K2R3 w - - 0 28
AdaChess v.3.9.0-dev => memory 256
Allocated 256MB for Hash
AdaChess v.3.9.0-dev => bench 10


 . . r q r . . .    8
 p b . . . . . Q    7
 . . . . p . p .    6
 . P . p . . k .    5
 . . . P . . . .    4
 . . N . . . . .    3
 P P . . . . . .    2
 . K . . R . . .    1


  a b c d e f g h


Benchmarking current displayed position for 10 seconds
Depth   Time        Nodes  Score  Principal Variation
 1/2    0.00           82  -1.13  15. Qxb7
 2/3    0.00          333  -1.03  15. Qxb7 Qc7
 3/4    0.01         2174  -1.14  15. Re5+ Kf6 16. Qxb7
 4/5    0.02        10130  -1.06  15. Qxb7 Rc7 16. Qa6 Kf6
 5/7    0.10        46968  -0.73  15. Rg1+ Kf4 16. Qxb7 Rc7 17. Rf1+ Ke3
 5/8    0.12        58883   0.00  15. Qf7 Rg8 16. Rg1+ Kh6 17. Rh1+ Kg5 18. Rg1+ {1/2 - 1/2} (Perpetual check)
 6/8    0.31       163215   0.00  15. Qf7 Rg8 16. Rg1+ Kh6 17. Rh1+ Kg5 18. Rg1+ {1/2 - 1/2} (Perpetual check)
 7/8    0.36       192414   0.00  15. Qf7 Rg8 16. Rg1+ Kh6 17. Rh1+ Kg5 18. Rg1+ {1/2 - 1/2} (Perpetual check)
 7/8    0.65       346530   0.35  15. Qf7 Rg8 16. Rg1+ Kh6 17. Rh1+ Kg5 18. Rg1+ {1/2 - 1/2} (Perpetual check)
 7/8    0.66       349662   0.00  15. Qf7 Rg8 16. Rg1+ Kh6 17. Rh1+ Kg5 18. Rg1+ {1/2 - 1/2} (Perpetual check)
 7/12   0.71       373152   1.90  15. Rg1+ Kf4 16. Ne2+ Ke4 17. Rg3 Rc1+ 18. Nxc1 Qe7 19. Rg4+ Ke3 20. Qxg6
 7/12   2.41      1274863   1.90  15. Rg1+ Kf4 16. Ne2+ Ke4 17. Rg3 Rc1+ 18. Nxc1 Qe7 19. Rg4+ Ke3 20. Qxg6
 8/1    2.57      1358368   2.23  15. Rg1+
 8/12   2.97      1620360    +M6  15. Rg1+ Kf4 16. Qh2+ Ke3 17. Rg4 Rxc3 18. Qh3+ Kd2 19. Rg2+ Ke1 20. Qh1#
 8/12   4.21      2287764    +M6  15. Rg1+ Kf4 16. Qh2+ Ke3 17. Rg4 Rxc3 18. Qh3+ Kd2 19. Rg2+ Ke1 20. Qh1#
 9/12   5.18      2739867    +M6  15. Rg1+ Kf4 16. Qh2+ Ke3 17. Rg4 Rxc3 18. Qh3+ Kd2 19. Rg2+ Ke1 20. Qh1#
 9/12   8.02      4082358    +M6  15. Rg1+ Kf4 16. Qh2+ Ke3 17. Rg4 Rxc3 18. Qh3+ Kd2 19. Rg2+ Ke1 20. Qh1#
 1/1   10.01      5045395    +M1  15. Rg1+
Nodes/Qnodes: 3620222/ 1425173
Deeper depth: 37
Total nodes : 5045395
NPS: 504539

AdaChess v.3.9.0-dev => quit
Thanks for playing with AdaChess!
--
AdaChess - Smart Chess Engine - https://github.com/adachess/AdaChess

Image
Carbec
Posts: 162
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: How do you handle this position ?

Post by Carbec »

Hi,
The problem was not in the position, but in my code... In fact, there was several problems, all fixed now.
JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

Re: How do you handle this position ?

Post by JoAnnP38 »

Carbec wrote: Sun Aug 06, 2023 11:58 am Hi,
The problem was not in the position, but in my code... In fact, there was several problems, all fixed now.
Darn it! :wink: :lol: