Underpromotion?

Discussion of chess software programming and technical issues.

Moderator: Ras

ethanara
Posts: 134
Joined: Mon May 16, 2011 6:58 pm
Location: Denmark

Underpromotion?

Post by ethanara »

Hi
In the code of viper, in the movgen, i did so that it does not generate rook and bishop promotion.
Would this be an improvement or a pain?
BTW how much elo does viper have?
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Underpromotion?

Post by Don »

ethanara wrote:Hi
In the code of viper, in the movgen, i did so that it does not generate rook and bishop promotion.
Would this be an improvement or a pain?
BTW how much elo does viper have?
It will improve the strength of the program since these promotions will make the tree larger. You know with 99.999 percent certainty that a queen promotion is better than a bishop or rook promotion and this is more reliable than just about any other selective rule you can have in your program.
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Underpromotion?

Post by JuLieN »

Don wrote: It will improve decrease the strength of the program since these promotions will make the tree larger. You know with 99.999 percent certainty that a queen promotion is better than a bishop or rook promotion and this is more reliable than just about any other selective rule you can have in your program.
Don, you need to get some sleep! :)
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Underpromotion?

Post by Don »

JuLieN wrote:
Don wrote: It will improve decrease the strength of the program since these promotions will make the tree larger. You know with 99.999 percent certainty that a queen promotion is better than a bishop or rook promotion and this is more reliable than just about any other selective rule you can have in your program.
Don, you need to get some sleep! :)
What he did will by removing promotions will improve the strength of the program.
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Underpromotion?

Post by JuLieN »

Oups, I thought he built his engine upon Viper and was considering adding underpromotions... my bad! :oops:
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Underpromotion?

Post by bob »

Don wrote:
JuLieN wrote:
Don wrote: It will improve decrease the strength of the program since these promotions will make the tree larger. You know with 99.999 percent certainty that a queen promotion is better than a bishop or rook promotion and this is more reliable than just about any other selective rule you can have in your program.
Don, you need to get some sleep! :)
What he did will by removing promotions will improve the strength of the program.
I am not convinced. I tried this a while back and found zero change. I think because of hashing where if d8=Q is no good, d8=R is a transposition once the rook is removed, ditto for B.

I am working on a draw score test, when that is finished, I'll run this again because it was trivial to do...
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: Underpromotion?

Post by jhaglund »

There will be a reduction of ~about 1.0805500982318271119842829076621% possible moves removed. This wouldn't be useful, unless used in some really low-probability-brute-force-pruning. :)

However, the main purpose of the promotions of rooks and bishops are to eliminate the possiblities of stalemate. The idea at first seems nice, and would indeed seem to be positive, but you'd need to make sure to check for a stalemate at time of promotion.
:wink:
Joshua D. Haglund
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Underpromotion?

Post by mcostalba »

jhaglund wrote: However, the main purpose of the promotions of rooks and bishops are to eliminate the possiblities of stalemate.
While watching on going games on my GUI I have found sometime that the engine underpromotes a pawn in case this can be captured, although defended. So that if you promote to a queen the opponent will take your queen with his minor, if you underpromote the opponent is more in trouble and sometime I have seen some rook underpromotion to survive even if the queening square was attacked.

I really don't know if it is useful or not, but it is nice to have ;-)
User avatar
hgm
Posts: 28395
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Underpromotion?

Post by hgm »

In Spartacus the move encoding scheme allows for 6 different promotion choices, 3 primary choices, (searched with the captures with the MVV sort key upped for the promotion value) and 3 under-promotion choices (sorted as if they are not special, with the captures or non-captures).

The move generator does not generate all of them, though. Normally I let it generate two primary choices, and one under-promotion. In orthodox Chess I limit the primary choice to Queen, however, and the under-promotion is to Knight. In 10x8 Chess the primary choices are Queen & Chancellor, and the under-promotion is Archbishop. In Spartan Chess the prmary choices are Warlord and General, and the under-promotion is King.

I guess it would be a good rule of thumb that you should cover all possibilities to promote with check. The 10x8 choices already do this with the primary choices (Chancellor moves as R+N), so I made ArchBishop (B+N) an under-promotion, despite the fact that it is hardly worth less. In Spartan I violate this rule, because I don't consider promotion to minors, and although these only capture along orthogonals and diagonals, which are covered by the much more valuable W and G, they have two-step jumps in those directions which could be blocked for the majors. I have never seen the Spartans promote to a minor in an actual game, though(but promotion to King ocasionally occurs).
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Underpromotion?

Post by Don »

mcostalba wrote:
jhaglund wrote: However, the main purpose of the promotions of rooks and bishops are to eliminate the possiblities of stalemate.
While watching on going games on my GUI I have found sometime that the engine underpromotes a pawn in case this can be captured, although defended. So that if you promote to a queen the opponent will take your queen with his minor, if you underpromote the opponent is more in trouble and sometime I have seen some rook underpromotion to survive even if the queening square was attacked.

I really don't know if it is useful or not, but it is nice to have ;-)
It might actually help your ELO due to psychological reasons. A queen gets captures but perhaps not a rook or bishop.

But Komodo does all under-promotions at the root. Recently I saw it underpromote to a rook which subsequently was captured of course.

The point I was making earlier is that an under-promotion (especially to a bishop or rook) is much more likely to NOT be the best move than almost any other pruning heuristic one can employ. If one want to be paranoid and still include it in the search, it could be seriously reduced. But it's silly to reduce some moves 3 full ply and yet protect these moves from being pruned or reduced because they are technically "captures."