Queen and pawn endgame

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Queen and pawn endgame

Post by Lyudmil Tsvetkov »

zullil wrote:
Lyudmil Tsvetkov wrote:
zullil wrote:
Lyudmil Tsvetkov wrote:
Qc5 and Qe3 lose too, and there are no other moves.

check better with your fish.
[d] 8/1p3Qpk/pq5p/4K2P/6P1/5P2/P1P5/8 b - - 12 48

Perhaps there was confusion. In the position above, which I think appeared in both games you posted, Black played Qb2+, which seems to lose (evaluation for White goes above +5).

What's wrong with Qb4, as suggested by asmFish? Or Qc5+ ? Qe3+ is certainly no good.
I don't know.

I am inputting those lines to SF and Komodo, especially Komodo seems to handle this better, and score only rises constantly after a while.

Komodo seems to like Qc5 less than Qb2, I have not checked Qb4.

really, I am very busy right now, have to finish one project of mine, when possible, will post some short input.
I don't know either. :wink: It is too easy to forget just how complex these positions are.

Even the high evaluation for White that I see after Qb2+ might just be an illusion. For example, in its line following Qb2+, asmFish has this position:
[d] 8/1K4pk/2P1q2p/8/1Q6/8/8/8 b - - 11 93
Searching this position to depth 93, asmFish shows 6.29 but no further progress. If this position is actually 0.00, then even Qb2+ might be OK to hold a draw for Black.

Maybe someone with access to 7-man tables can help here, at least with this one position!
well, seemingly on Qc5, white will be gradually avoiding checks and after f3-f4-f5 is pushed, going to win.

for example, from a position like this:

[d]8/6pk/7p/1p3P1P/3Q2P1/2PK4/8/2q5 b - - 0 35

I suggested to SF pushing f3-f4-f5, it does not see it, but then agrees.

PS. Warning: this 3-minute quick analysis is done with sleepy me and buggy SF...
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Queen and pawn endgame

Post by Lyudmil Tsvetkov »

Qb4, suggested by Louis SF(how I revel in refuting Louis' SF output :) ), should be losing too.

I get to a position like that one:

[d]7k/6p1/4Q2p/7P/1qP3P1/8/2K5/8 b - - 0 20

which is won for white,

but same f3-f4-f5 push should do as well.

PS. again, disclaimer, sleepy me and buggy SF, no warranties of any kind.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Queen and pawn endgame

Post by Lyudmil Tsvetkov »

lastly, Qe3 and Qb2 seem to transpose.
Rodolfo Leoni
Posts: 545
Joined: Tue Jun 06, 2017 4:49 pm
Location: Italy

Re: Queen and pawn endgame

Post by Rodolfo Leoni »

Maxwell86 wrote: So, your engine quickly sees that 35....Qxf3 loses (without the help of Gurevich! :-D). At which depth? Actually, what is "Stockfish PA GTB"?
I see Guenther gave you that answer. I'm rather happy because I had to make a long search elseway... Starting depth 30, because of technical reasons, as first step. If you read the file "About persistent hashes" you can understand it better. :)
Maxwell86 wrote:If I understand correctly, so far we have
*) 20 games (1 minute) of Lyudmil where white scored 80%.
*) 26 games (fixed depth 30) of Rodolfo where black drew all the games.
*) After 44.Kd3 Qd6+ 45.Kc3 Qe5+ 46.Kc4 Qb5+ 47.Kd4 Qb6+ 48.Ke5, 48....Qb2+ somehow loses, but 48....Qc5+ is probably(?) a draw.

I'm quite impressed how deep the analysis has gone. And this was only my first post :-D
Louis, Lyudmil and Rodolfo, thanks a lot for the effort!
For me, a pleasure. :)

To be precise, first 12 games AsmfishW always won with white. Last 14 games were all draws except one Stockfish PA GTB won with white.

First games lasted about one hour each. Seems depth 30 takes much more time than 1 min/game. After awakening (and breakfast) I saw Stockfish PA GTB needed 10-15 mins while AsmfishW time was the same. The reason is that when lots of positions (deriving from a root) are stored in PHs search becomes faster. Engine skips all evaluation steps for the required depth, because all data are already available.

Next step (experimental, I don't know if I can do it) will be to let Stockfish PA GTB autoplaying the position with about 30 mins per game. I guess the two engines can't share the same PH, though... But I'll try.

Let me know if I can help in any way. :)

Rodolfo

P.S. Daniel Josè (Andscacs author) made a nice version of Andscacs with PHs, with the option to load/save the hashes if an analysys lasts several days. It works fine enough, but hash size should be 32-64 MB, at least. With little wash some positions and scores get lost quickly enough. Daniel looks interested to apply that system to a newer Stockfish version, if possible. And when possible, because he must think at his engine too....!
F.S.I. Chess Teacher
Rodolfo Leoni
Posts: 545
Joined: Tue Jun 06, 2017 4:49 pm
Location: Italy

Re: Queen and pawn endgame

Post by Rodolfo Leoni »

The link to Andscacs 0.91150. Be sure to set an hash name and to check the PH option on... :)

http://www.andscacs.com/downloads/andscacs091150.zip
F.S.I. Chess Teacher
Rodolfo Leoni
Posts: 545
Joined: Tue Jun 06, 2017 4:49 pm
Location: Italy

Re: Queen and pawn endgame

Post by Rodolfo Leoni »

Lyudmil Tsvetkov wrote: fixed depth makes no sense, Rodolpho does not know what he is doing:
Possibly, I exactly know what I do, and you have no idea. As usual.
F.S.I. Chess Teacher
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Queen and pawn endgame

Post by cdani »

Rodolfo Leoni wrote: P.S. Daniel Josè (Andscacs author) made a nice version of Andscacs with PHs, with the option to load/save the hashes if an analysys lasts several days. It works fine enough, but hash size should be 32-64 MB, at least. With little wash some positions and scores get lost quickly enough. Daniel looks interested to apply that system to a newer Stockfish version, if possible. And when possible, because he must think at his engine too....!
Done!

Source and executable:
www.andscacs.com/downloads/stockfish_x6 ... vehash.zip

It has the same added uci options than in Andscacs.

So I added to Stockfish the capability of saving the full hash to file, to allow the user to recover a previous analysis session and continue it.
The saved hash file will be of the same size of the hash memory, so if you defined 4 GB of hash, such will be the file size. Saving and loading such big files can take some time.

To be able to do it I have added 4 new uci parameters:

option name NeverClearHash type check default false
option name HashFile type string default hash.hsh
option name SaveHashtoFile type button
option name LoadHashfromFile type button

You can set the NeverClearHash option to avoid that the hash could be cleared by a Clear Hash or ucinewgame command.
The HashFile parameter is the full file name with path information. If you don't set the path, it will be saved in the current folder. It defaults to hash.hsh.
To save the hash, stop the analysis and press the SaveHashtoFile button in the uci options screen of the GUI.
To load the hash file, load the game you are interested in, load the engine withouth starting it, and press the LoadHashfromFile button in the uci options screen of the GUI. Now you can start the analysis.

I have not tested it much. Anything just tell me.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Queen and pawn endgame

Post by Lyudmil Tsvetkov »

Guenther wrote:
Lyudmil Tsvetkov wrote:
Guenther wrote:
Maxwell86 wrote:
Rodolfo Leoni wrote: But I'm happy enough. Stockfish PA GTB already learned Qxf3 is a blunder, and without GM Gurevich help.... It plays until Qxb2 about instantly. I'll let it run tonight....
So, your engine quickly sees that 35....Qxf3 loses (without the help of Gurevich! :-D). At which depth? Actually, what is "Stockfish PA GTB"?
Stockfish PA GTB is an old version of Stockfish (2013/11) with a Persistent hash feature, especially for analysis that was maintained by Jeremy Bernstein. It is still available for download.
It was suggested to Rodolfos' (after a long hiatus) request for a better analysis program in this thread:

http://talkchess.com/forum/viewtopic.php?t=64517

download link for SF PA GTB here:
http://www.open-chess.org/viewtopic.php?f=7&t=2663

Note that also as an offspring of that request Daniel Jose made a special
version of Andscacs and an SF with basic PH, but I haven't tested both yet.
I leave it to Rodolfo to tell about those ;-)

Guenther
excellent, so we now also use outdated software...
You are worse than Rolf ever was - stay out if you have no clue what we are talking about, or even better create your own forum...
who is Rolf?

no matter how persistent your hash is, the SF version is still from 2013.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Queen and pawn endgame

Post by Lyudmil Tsvetkov »

Rodolfo Leoni wrote:
Maxwell86 wrote: So, your engine quickly sees that 35....Qxf3 loses (without the help of Gurevich! :-D). At which depth? Actually, what is "Stockfish PA GTB"?
I see Guenther gave you that answer. I'm rather happy because I had to make a long search elseway... Starting depth 30, because of technical reasons, as first step. If you read the file "About persistent hashes" you can understand it better. :)
Maxwell86 wrote:If I understand correctly, so far we have
*) 20 games (1 minute) of Lyudmil where white scored 80%.
*) 26 games (fixed depth 30) of Rodolfo where black drew all the games.
*) After 44.Kd3 Qd6+ 45.Kc3 Qe5+ 46.Kc4 Qb5+ 47.Kd4 Qb6+ 48.Ke5, 48....Qb2+ somehow loses, but 48....Qc5+ is probably(?) a draw.

I'm quite impressed how deep the analysis has gone. And this was only my first post :-D
Louis, Lyudmil and Rodolfo, thanks a lot for the effort!
For me, a pleasure. :)

To be precise, first 12 games AsmfishW always won with white. Last 14 games were all draws except one Stockfish PA GTB won with white.

First games lasted about one hour each. Seems depth 30 takes much more time than 1 min/game. After awakening (and breakfast) I saw Stockfish PA GTB needed 10-15 mins while AsmfishW time was the same. The reason is that when lots of positions (deriving from a root) are stored in PHs search becomes faster. Engine skips all evaluation steps for the required depth, because all data are already available.

Next step (experimental, I don't know if I can do it) will be to let Stockfish PA GTB autoplaying the position with about 30 mins per game. I guess the two engines can't share the same PH, though... But I'll try.

Let me know if I can help in any way. :)

Rodolfo

P.S. Daniel Josè (Andscacs author) made a nice version of Andscacs with PHs, with the option to load/save the hashes if an analysys lasts several days. It works fine enough, but hash size should be 32-64 MB, at least. With little wash some positions and scores get lost quickly enough. Daniel looks interested to apply that system to a newer Stockfish version, if possible. And when possible, because he must think at his engine too....!
finally, 26 draws, or 12 white wins and then 13 draws?
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Queen and pawn endgame

Post by MikeB »

zullil wrote:
Uri Blass wrote:or maybe stockfish simply cannot find the win in a pawn endgame.
Did not check if b4 is the only winning move

[d]8/pp3p1k/6pp/7P/6P1/3K4/PPP5/8 w - - 0 38 bm b4
Latest asmFish can find b4, so surely Stockfish will too.

Code: Select all

info depth 43 seldepth 50 multipv 1 time 30982 nps 70710489 score cp 0 nodes 2190752398 tbhits 0 hashfull 145 pv d3e3 f7f5 e3f4 f5g4 f4g4 h7g7 a2a4 g6h5 g4h5 a7a5 c2c3 g7f6 b2b4 a5b4 c3b4 f6e5 a4a5 e5d5 b4b5 d5c5 a5a6 b7a6 b5a6 c5b6 a6a7 b6a7 h5g6 h6h5 g6g5 a7b6 g5f4 b6a6 f4f3 a6b5 f3f4 b5a6
info depth 44 currmove d3e3 currmovenumber 1
info depth 44 currmove h5g6 currmovenumber 2
info depth 44 currmove d3e4 currmovenumber 3
info depth 44 currmove c2c4 currmovenumber 4
info depth 44 currmove a2a4 currmovenumber 5
info depth 44 currmove b2b4 currmovenumber 6
info depth 44 seldepth 50 multipv 1 time 59142 nps 71668168 score cp 7 lowerbound nodes 4238598822 tbhits 0 hashfull 308 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 62530 nps 71477333 score cp 14 lowerbound nodes 4469477655 tbhits 0 hashfull 331 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 64836 nps 71393852 score cp 25 lowerbound nodes 4628891838 tbhits 0 hashfull 346 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 66376 nps 71438851 score cp 40 lowerbound nodes 4741825215 tbhits 0 hashfull 354 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 68620 nps 71377407 score cp 61 lowerbound nodes 4897917682 tbhits 0 hashfull 365 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 70602 nps 71446546 score cp 89 lowerbound nodes 5044269079 tbhits 0 hashfull 371 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 72766 nps 71449291 score cp 127 lowerbound nodes 5199079180 tbhits 0 hashfull 377 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 75108 nps 71481010 score cp 175 lowerbound nodes 5368795754 tbhits 0 hashfull 390 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 77706 nps 71726407 score cp 237 lowerbound nodes 5573572243 tbhits 0 hashfull 394 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 82051 nps 71931424 score cp 317 lowerbound nodes 5902045348 tbhits 0 hashfull 406 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 88173 nps 72685179 score cp 419 lowerbound nodes 6408870344 tbhits 0 hashfull 426 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 97930 nps 74597062 score cp 548 lowerbound nodes 7305290352 tbhits 0 hashfull 460 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 108381 nps 75959788 score cp 711 lowerbound nodes 8232597850 tbhits 0 hashfull 484 pv b2b4
info depth 44 currmove b2b4 currmovenumber 1
info depth 44 seldepth 60 multipv 1 time 135651 nps 79064144 score cp 917 lowerbound nodes 10725130221 tbhits 0 hashfull 558 pv b2b4
latest dev-SF-McB - ..interestiingly match your evals precisely , except I left my run a little longer - your machine is obviously mush faster than mine.

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 41	+19.12!	13.5G	5:29.26	b4! 
 41	+15.02!	12.2G	4:57.34	b4! 
 41	+11.77!	9.29G	3:50.80	b4! 
 41	+9.17!	5.27G	2:19.68	b4! 
 41	+7.11!	4.42G	1:59.17	b4! 
 41	+5.48!	3.96G	1:47.80	b4! 
 41	+4.19!	3.62G	1:38.91	b4! 
 41	+3.17!	3.30G	1:30.14	b4! 
 41	+2.37!	3.07G	1:23.59	b4! 
 41	+1.75!	2.88G	1:17.85	b4! 
 41	+1.27!	2.67G	1:11.70	b4! 
 41	+0.89!	2.55G	1:08.47	b4! 
 41	+0.61!	2.40G	1:04.07	b4! 
 41	+0.40!	2.27G	1:00.17	b4! 
 41	+0.25!	2.20G	0:58.18	b4! 
 41	+0.14!	2.12G	0:55.78	b4! 
 41	+0.07!	2.02G	0:52.84	b4! 
 40	  0.00 	903.8M	0:22.28	Ke4 f5+ Kf4 fxg4 Kxg4 gxh5+ Kxh5 b5 c3 Kg7 b3 a5 c4 bxc4 bxc4 
 39	  0.00 	730.6M	0:18.06	Ke4 f5+ Kf4 fxg4 Kxg4 gxh5+ Kxh5 b5 c3 Kg7 b3 a5 c4 bxc4 bxc4