Don Dailey you need to teach underpromotion to Komodo!

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

Moderator: Ras

User avatar
Houdini
Posts: 1471
Joined: Tue Mar 16, 2010 12:00 am

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by Houdini »

Interesting, can any other engine reproduce the mate in 33 announced by Rybka 4?

Looking at the position after 14.Kc4 in the main line produced by Rykba:
1.Bc4 Rff2 2.Rxh4 Rxh4 3.Bb3 Rb2 4.Ra5 Rh1+ 5.Bd1[] Rb1+ 6.Kc2[] Rh2+ 7.Kc3[] Rg2 8.Rc5[] Rg3+ 9.Kd2[] Rb2+ 10.Bc2[] Rxg7 11.c8Q[] Rg2+ 12.Kd3[] Rgxc2 13.Rc3[] Rd2+ 14.Kc4[] Rd1 15.Qh8 Kb1 16.Qh7+[]
+- (#33) Depth: 30 01:12:44 9148mN, tb=226216

[d]2Q5/8/8/8/2K5/2R5/pr1r4/k7 b - -

Is this really mate in 19?
Houdini seems to think this is mate in 34.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by Don »

hgm wrote:
Don wrote:An algorithm was proposed that says if you immediately find you are losing big during the last moments of the search, play the move you would have played just before the discovery!
Well, this seems just a kludgey way to determine how deep in the tree the critical loss will occur, by iterative deepening.
Yes, I think so too.
If you cannot see a loss at N-1 ply, but you do see it at N ply, there must be branches that keep the current eval upto the N-1 ply level, after which it drops in the Nth ply to the root value or lower.
The idea was probably better in those days than it would be today. Programs had very large branching factors and so if you saw a loss on your LAST iteration there is not a very good argument for not playing the previous iterations move - you are going to lose anyway. But I am sure there are ways to do better, perhaps with the idea you are proposing here.

IMO it would be better to account for that in the N-ply search itself, by discounting the eval drop when it occurs so deep in the tree. Losing a Queen in ply 2 (from an approximately balanced root position) is arguably worse than getting checkmated on ply 30 (but keeping the Queen until ply 28).
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
pichy
Posts: 2564
Joined: Thu Mar 09, 2006 3:04 am

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by pichy »

mcostalba wrote:
pichy wrote:Komodo it does not see Underpromotion as the best move :roll:
Because it is not the "best move".
[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:

PS: You realize that if White promote to a Queen After Black move to Rc4+ the Queen would be forced to take and the game will end in a stalemate, but instead of promoting to a Queen, an underpromotion to a Rook will guarantee White a Mate in 8 more moves :wink:
pichy
Posts: 2564
Joined: Thu Mar 09, 2006 3:04 am

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by pichy »

pichy wrote:
mcostalba wrote:
pichy wrote:Komodo it does not see Underpromotion as the best move :roll:
Because it is not the "best move".

[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:

PS: You realize that if White promote to a Queen After Black move to Rc4+ the Queen would be forced to take and the game will end in a stalemate, but instead of promoting to a Queen, an underpromotion to a Rook will guarantee White a Mate in 8 more moves :wink:
I believe that this video will help you understand better, and remember that in the time of Saavedra there were no Tablebase Nor Computers, only that most GMs used to promote to Queen and it was a known drawn position back then :wink:
Arpad Rusz
Posts: 273
Joined: Sat Apr 17, 2010 2:34 pm
Location: Budapest

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by Arpad Rusz »

Thanks, Robert. I am surely a better composer than programmer. :wink:

Actually there was a reason why I have shown this study in this topic. Who can discover why?
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by mcostalba »

pichy wrote:
mcostalba wrote:
pichy wrote:Komodo it does not see Underpromotion as the best move :roll:
Because it is not the "best move".
[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:
This is not the position you posted originally, this is the position reached after non-optimal play by black. If in this position (not the study's starting one) Komodo still doesn't see the rook underpromotion I agree with you, he misses that because it doesn't know how to underpromote.....but, again, this is the first time you come up with this position and is not the one we were talking about for all this thread.
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by hgm »

pichy wrote:[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:
Komodo dos see the under-promotion in this position, right? (Because it does consider them on ply 1, if I understood Don correctly.) If you now want to talk about this position, you have nothing to complain about!
Uri Blass
Posts: 11221
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by Uri Blass »

hgm wrote:
Don wrote:An algorithm was proposed that says if you immediately find you are losing big during the last moments of the search, play the move you would have played just before the discovery!
Well, this seems just a kludgey way to determine how deep in the tree the critical loss will occur, by iterative deepening. If you cannot see a loss at N-1 ply, but you do see it at N ply, there must be branches that keep the current eval upto the N-1 ply level, after which it drops in the Nth ply to the root value or lower.

IMO it would be better to account for that in the N-ply search itself, by discounting the eval drop when it occurs so deep in the tree. Losing a Queen in ply 2 (from an approximately balanced root position) is arguably worse than getting checkmated on ply 30 (but keeping the Queen until ply 28).
I think that the ply that you get checkmated is not the important factor for the evaluation and the question is if it is easy for the opponent to find the right moves.

It is possible that it is easy for the opponent to find the right moves even without finding the mate because the opponent simply lose the game by mate in 1 if he does not force mate and in this case getting checkmated on ply 30 is not better than losing the queen in ply 2 and there is some
way to get checkmated at ply 28 that is practically better because the opponent has no forced moves and may do a mistake.

Of course this is an extreme example but the point is that keeping material as long as possible when you are losing is not close to be
the optimal strategy even if it is better than the strategy that computers use today.
Uri Blass
Posts: 11221
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by Uri Blass »

hgm wrote:
pichy wrote:[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:
Komodo dos see the under-promotion in this position, right? (Because it does consider them on ply 1, if I understood Don correctly.) If you now want to talk about this position, you have nothing to complain about!
I do not know about komodo4 because I do not have it but komodo3 has some stalemate bug so it does not see the underpromtion.


New game
8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

Analysis by Komodo32 3 32bit:

1.c7-c8Q Rd4-a4 2.Qc8-c3+
+- (2.28) Depth: 1 00:00:00
1.c7-c8Q Rd4-a4 2.Qc8-c3+ Ka1-a2 3.Qc3-b2#
+- (#3) Depth: 2 00:00:00

(, 16.04.2012)
pichy
Posts: 2564
Joined: Thu Mar 09, 2006 3:04 am

Re: Don Dailey you need to teach underpromotion to Komodo!

Post by pichy »

Uri Blass wrote:
hgm wrote:
pichy wrote:[d]8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

So you are saying that if we play according to the Saavedra study after an engine or human reach this position that the best move for white is not to promote to a Rook, and instead you would promote to a Queen :shock:
Komodo dos see the under-promotion in this position, right? (Because it does consider them on ply 1, if I understood Don correctly.) If you now want to talk about this position, you have nothing to complain about!
I do not know about komodo4 because I do not have it but komodo3 has some stalemate bug so it does not see the underpromtion.


New game
8/2P5/8/8/3r4/8/2K5/k7 w - - 0 1

Analysis by Komodo32 3 32bit:

1.c7-c8Q Rd4-a4 2.Qc8-c3+
+- (2.28) Depth: 1 00:00:00
1.c7-c8Q Rd4-a4 2.Qc8-c3+ Ka1-a2 3.Qc3-b2#
+- (#3) Depth: 2 00:00:00

(, 16.04.2012)

Thanks Uri for showing what I bave been saying since my original post that Komodo 32 3 32bit has a stalemate bug which Don Dailey later on fixed for his next version which is not released yet. Anyway if Komodo 32 3 32bits did not have this stalemate bug it would have analyzed the correct move 1.c7-c8Q Rd4-c4+ forcing the stalemate instead of allowing Komodo to lose. and to prove my point, I even played out this ending starting from the original position versus Komodo 32 3 32bit.


[d]8/8/1KP5/3r4/8/8/8/k7 w - - 10 1
And here is the famous Saavedra ending study game that I played versus Komodo:

[Event " Rook vs Pawn-Ending"]
[Site "?"]
[Date "2012.03.29"]
[Round "?"]
[White "Pichy"]
[Black "Komodo3-64"]
[Result "1-0"]
[BlackElo "3000"]
[WhiteElo "2200"]
[SetUp "1"]
[FEN "8/8/1KP5/3r4/8/8/8/k7 w - - 0 1"]
[WhiteType "human"]
[BlackType "program"]

1. c7 Rd6+ 2. Kb5 Rd5+ 3. Kb4 Rd4+ 4. Kb3 Rd3+ 5. Kc2 Rd4 6. c8=R Rd2+ 7.
Kxd2 Kb2 8. Rc3 Kb1 9. Rb3+ Ka1 10. Kc3 Ka2 {Black resigns} 11. Kc2 Ka1
{Black resigns} 12. Ra3# *

Final position where Komodo played very similar to the Saavedra study but never realized that I was going to underpromote to a Rook instead of a Queen?.
[d]8/8/8/8/8/R7/2K5/k7 b - - 10 7

PS: Let me make this clear that Hannibal and Stockfish before the patch was made by Gary also felt for this, but Houdini, and Critter did not since they use the null prunning heuristic algorithm :wink:

And I play it Again versus Komodo, you can try it too and enjoy beating Komodo 32 3 32bit while you can since Don Dailey corrected this for his next version :wink:
[Event "?"]
[Site "?"]
[Date "2012.04.16"]
[Round "?"]
[White "Vet Admin"]
[Black "Komodo3-32"]
[Result "1-0"]
[BlackElo "3040"]
[Time "06:24:27"]
[WhiteElo "2200"]
[TimeControl "0+10"]
[SetUp "1"]
[FEN "8/8/1KP5/3r4/8/8/8/k7 w - - 10 1"]
[Termination "normal"]
[PlyCount "25"]
[WhiteType "human"]
[BlackType "program"]

1. c7 Rd6+ 2. Kb5 Rd5+ 3. Kb4 Rd4+ 4. Kb3 Rd3+ 5. Kc2 Rd4 6. c8=R Ra4 7.
Kb3 Rb4+ 8. Kxb4 Kb2 9. Rc3 Ka2 10. Rc2+ Ka1 {Black resigns} 11. Kb3 Kb1
{Black resigns} 12. Rc3 Ka1 {Black resigns} 13. Rc1# 1-0

And the final position for this latest ending that I recently played, WOW I am still enjoying beating Komodo
[d]8/8/8/8/8/1K6/8/k1R5 b - - 10 13