Underpromotion percentage

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

Moderator: Ras

Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Underpromotion percentage

Post by Dann Corbit »

In a study of a certain collection of computer chess games, I found the following promotion statistics:

Code: Select all

83408 promotion to queen  = 91.82%
 4073 promotion to rook   =  4.48%
 2309 promotion to knight =  2.54%
 1049 promotion to bishop =  1.15%
----- -------------------
90839 promotions
Total plies in collection = 61,459,315
So promotions amount to only:
0.1478% of the total moves in the collection (about one out of every 677 half-moves).
User avatar
Ovyron
Posts: 4562
Joined: Tue Jul 03, 2007 4:30 am

Re: Underpromotion percentage

Post by Ovyron »

Were these underpromotions really necessary? In a previous study I recall that many underpromotions happened when the promoted piece was captured immediately and it didn't matter if it was a queen or not.
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Underpromotion percentage

Post by BubbaTough »

Were these underpromotions really necessary? In a previous study I recall that many underpromotions happened when the promoted piece was captured immediately and it didn't matter if it was a queen or not.
That is true, but is does have some effects in computer chess where it would not in a human game, such as messing with ponder. Or in the case of some lower level engines, causing crashes or resignation :).

-Sam
User avatar
Ovyron
Posts: 4562
Joined: Tue Jul 03, 2007 4:30 am

Re: Underpromotion percentage

Post by Ovyron »

Well, I recall that the rate of useful bishop promotions (where not promoting to bishop means draw instead of win or lose instead of draw/win) happened in something like 1 out of 1'000'000 games, that's several orders of magnitude less than the 1.15% shown.

The "useful" bishop underpromotion that causes win on forfeit or avoiding ponder hits should not count.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Underpromotion percentage

Post by Dann Corbit »

Ovyron wrote:Were these underpromotions really necessary? In a previous study I recall that many underpromotions happened when the promoted piece was captured immediately and it didn't matter if it was a queen or not.
Here they are:
http://cap.connx.com/EPD/under_bishop.epd.bz2
http://cap.connx.com/EPD/under_knight.epd.bz2
http://cap.connx.com/EPD/under_rook.epd.bz2

I am planning to analyze them. I will use Shredder, because Shredder seems to understand underpromotions well.

The thing that struck me was that I was told knight underpromotion is second most important to queen, but the rook underpromotion is a lot more popular. I guess that the rook underpromotions contain a lot of those "I don't want to lose a queen so I will underpromote to rook" decisions. I doubt if many of the bishop underpomotions are silly because they are computer games, but I might be surprised.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Underpromotion percentage

Post by Dann Corbit »

Dann Corbit wrote:
Ovyron wrote:Were these underpromotions really necessary? In a previous study I recall that many underpromotions happened when the promoted piece was captured immediately and it didn't matter if it was a queen or not.
Here they are:
http://cap.connx.com/EPD/under_bishop.epd.bz2
http://cap.connx.com/EPD/under_knight.epd.bz2
http://cap.connx.com/EPD/under_rook.epd.bz2

I am planning to analyze them. I will use Shredder, because Shredder seems to understand underpromotions well.

The thing that struck me was that I was told knight underpromotion is second most important to queen, but the rook underpromotion is a lot more popular. I guess that the rook underpromotions contain a lot of those "I don't want to lose a queen so I will underpromote to rook" decisions. I doubt if many of the bishop underpomotions are silly because they are computer games, but I might be surprised.
I just started analyzing, and it does appear that most bishop underpromotions are simply silly moves even in the computer generated games. I do hope to pull a few nice ones out of the mess, though.
User avatar
Marek Soszynski
Posts: 586
Joined: Wed May 10, 2006 7:28 pm
Location: Birmingham, England

Re: Underpromotion percentage

Post by Marek Soszynski »

I believe that several engines underpromote to a rook merely to momentarily confuse the opponent.

And isn't it true that Rybka 3 can't underpromote to a bishop at all?
Marek Soszynski
User avatar
Ovyron
Posts: 4562
Joined: Tue Jul 03, 2007 4:30 am

Re: Underpromotion percentage

Post by Ovyron »

Marek Soszynski wrote:And isn't it true that Rybka 3 can't underpromote to a bishop at all?
Probably. In this position:

[d]8/1P6/8/8/8/4k3/2KN2p1/8 w - - 0 1

b8(B) is the only move that wins, and I'm sure Rybka sees it, because even though in the PVs you see b8(Q) and if you force a move Rybka plays b8(Q), in the move list it's evident that Rybka is looking at b8(B).

So, Rybka knows b8(B) wins, she just cannot show it on her PV or play it, I guess that's what the glitch is about.
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Underpromotion percentage

Post by hgm »

I am only interested in promotions where the promotion piece is not taken on the next move. It should be easy to filter out these automatically.

Many engines pick the promotion piece randomly, if they see they are going to lose it anyway. I guess you see a predominance of Rook underpromotions because in many cases promoting to a minor pieces might be worse, because the opponent is better of not taking it. E.g. the very common situation of promotion in a Rook ending. The opponent will have to give its Rook for the new Queen. If you promote to Rook, he will still do that, or have the (score-wise equivalent) option of leaving both Rooks on the board. (Of course it is still stupid to give him the extra option, but minimax will not realize that.) But after promotion to Bishop or Knight, he will not sac the exchange, and will be off much better. So the engine will then exclude those.

Of course you wil still be left with the cases where the promoted piece was doomed through a longer tactic. These are the cases that make uMax resign if the opponent promotes to Knight. :wink: The mostly occur when, after promotion, the opponent has a skewer on King + promotion piece. It happens reasonably often that uMax is already a Queen ahead (obtained through promotion), busy gobbling up the opponent's remaining Pawns, and giving that priority over stopping a promotion doomed because of a skewer. The opponent than very often chooses a Knight, and after the uMax search then plays the skewer, the interface resigns for it. (Because the skewer might be illegal, as the Knight, which uMax sees as a Queen, might be delivering check.)

So it might still be worth filtering the cases where the (under-)promotion piece survived to the next move further. But my guess is that there will be so few of those (if any at all) that it can be easily done by hand.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Underpromotion percentage

Post by sje »

Ovyron wrote: [d]8/1P6/8/8/8/4k3/2KN2p1/8 w - - 0 1

b8(B) is the only move that wins, and I'm sure Rybka sees it, because even though in the PVs you see b8(Q) and if you force a move Rybka plays b8(Q), in the move list it's evident that Rybka is looking at b8(B).

So, Rybka knows b8(B) wins, she just cannot show it on her PV or play it, I guess that's what the glitch is about.
Symbolic sees it all immediately:

1 b8=B Kd4 2 Ba7+ Kd5 3 Kd3 Ke5 4 Bg1 Kd5 5 Nc4 Ke6 6 Kd4 Ke7 7 Bh2 Ke6 8 Ne3
g1=N 9 Bxg1 Kd6 10 Bh2+ Kc6 11 Nc4 Kb7 12 Kd5 Ka7 13 Kc6 Ka8 14 Be5 Ka7 15 Nb6
Ka6 16 Bb8 Ka5 17 Nd5 Ka4 18 Be5 Ka5 19 Bd4 Ka6 20 Nb4+ Ka5 21 Kc5 Ka4 22 Kc4
Ka5 23 Bc5 Ka4 24 Bb6 Ka3 25 Nd3 Ka4 26 Nb2+ Ka3 27 Kc3 Ka2 28 Nc4 Kb1 29 Be3
Ka2 30 Kc2 Ka1 31 Kb3 Kb1 32 Na3+ Ka1 33 Bd4# 1-0