standard chess piece set

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Aleks Peshkov
Posts: 866
Joined: Sun Nov 19, 2006 8:16 pm
Location: Russia

standard chess piece set

Post by Aleks Peshkov » Tue Jul 17, 2007 11:09 am

I am playing with a board representation that can be greatly simplified in a case of max 1 queen, 2 rooks... per side. More general material state will need extra variables instead of immediate constants. I want to test simple version before implement "full chess rules". Rybka's beta did not know underpromotion, but was stable enough to win tournaments.

The question is:
can I hope to run limited chess version without great ELO drop in real games?
What is the probability to find two queens per side in Principal Variation?

User avatar
hgm
Posts: 23162
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: standard chess piece set

Post by hgm » Tue Jul 17, 2007 11:29 am

I noticed that almost all games are won though multiple Queens. Usually the checkmate is faster through promotion and then with two Queens than invoking the King from the other side of the board and K+Q.

Of course you don't really need the second Queen in such a case, a Rook would do almost as well. But the PV would still have the second Queen, if it were allowed.

Some QP vs QR positions might not be won if you could not promote to a second Q.

I don't expect it to matter much Elo, though.

Aleks Peshkov
Posts: 866
Joined: Sun Nov 19, 2006 8:16 pm
Location: Russia

Re: standard chess piece set

Post by Aleks Peshkov » Tue Jul 17, 2007 11:42 am

The reason of Elo drop if I ignore second queen moves by opponent, it will lead to illegal moves and immediate game lose unless this queen is captured soon.

Uri Blass
Posts: 8368
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: standard chess piece set

Post by Uri Blass » Tue Jul 17, 2007 11:42 am

Aleks Peshkov wrote:I am playing with a board representation that can be greatly simplified in a case of max 1 queen, 2 rooks... per side. More general material state will need extra variables instead of immediate constants. I want to test simple version before implement "full chess rules". Rybka's beta did not know underpromotion, but was stable enough to win tournaments.

The question is:
can I hope to run limited chess version without great ELO drop in real games?
What is the probability to find two queens per side in Principal Variation?
Rybka did not consider underpromotion in the search.

If your program does not consider promotion to queen when there is another queen it can win games because it may be strong enough
to prevent the opponent to promote to a queen when there is no queen.

If your program considers promotion to another queen and crash you may have a serious problem to win games because your program may crash against weak opponents.

Uri

Uri Blass
Posts: 8368
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: standard chess piece set

Post by Uri Blass » Tue Jul 17, 2007 11:47 am

Aleks Peshkov wrote:The reason of Elo drop if I ignore second queen moves by opponent, it will lead to illegal moves and immediate game lose unless this queen is captured soon.

Usually the opponent will win if he has 2 queens so you do not need to care about illegal moves in that case.

I think that the rating of your engine is not going to drop by much if you ignore possibilities when your engine promote a pawn to be second queen and simply consider promotion to a second queen by the opponent as winning for the opponent and resign as soon as the opponent promote a pawn to a second queen.

Uri

User avatar
hgm
Posts: 23162
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: standard chess piece set

Post by hgm » Tue Jul 17, 2007 1:04 pm

I agree with Uri. If you cannot prevent your opponent to promote to a second Queen, the game is likely to be lost anyway.

In stead of resigning when the opponent promotes, you could resign when he actually moves a Pawn from the last rank. That avoids you needlessly resigning in cases where you can immediately capture the new Queen.

I have some experience with uMax on this, which does not know under-promotion, and to avoid illegal moves (which would disqualify it with some testers) I let it resign when the opponent promotes to Knight. But there the search is not aware that it will resign. So sometimes it allows a promotion on (say) e8, when the enemy King is on e4, and it plans to win the Queen by, e.g. Re1+. But very often the opponent, seeing that the piece will be lost anyway, then selects to promote to Knight. uMax then executes its plan, and gives the check, but as he does not capture the promotion Knight (which uMax thinks is a Queen), the interface resigns for him (because there is no guarantee that the Knight is not delivering check, and the move would thus be illegal). This happens quite often, (~1% of the games) but mainly because the search is not aware that the opponent can get a win in this sneaky way, and thus allows the promotion where it could have easily pre-empted it.

To minimize the problem you could allow Pawns on the 1st or 8th rank to move as Amazons (for determining checks), and score any move with them as a checkmate. This means you can still afford to check the opponent before you capture them, as long as they cannot use the Amazon to evade the check (by interposing it or capturing the checker with it).

User avatar
Onno Garms
Posts: 224
Joined: Mon Mar 12, 2007 6:31 pm
Location: Bonn, Germany

Re: standard chess piece set

Post by Onno Garms » Tue Jul 17, 2007 9:34 pm

Aleks Peshkov wrote: can I hope to run limited chess version without great ELO drop in real games?
What is the probability to find two queens per side in Principal Variation?
You should scan a large set of pgn files to answer that question. During my "career" as a chess player without a computer I had a tournament game with two queens per side once. I don't know how tournament game I played. I think a few hundred.

You should also check the pgn file for games where one side has two queens (in most cases for one move only). If you take games of human grandmasters, you may assume that in a large portion of them the game is not decided at the moment where the two queens occur.

User avatar
Onno Garms
Posts: 224
Joined: Mon Mar 12, 2007 6:31 pm
Location: Bonn, Germany

Re: standard chess piece set

Post by Onno Garms » Tue Jul 17, 2007 9:42 pm

Aleks Peshkov wrote:The reason of Elo drop if I ignore second queen moves by opponent, it will lead to illegal moves and immediate game lose unless this queen is captured soon.
If your engine does not know that your opponent might get a second queen, your engine might allow that much more often than this happens in real games. So there might be a significant elo drop.

I suggest to consider oppentent's promotions as a loss when he still has his queen. Do so in the search instead of after that happened.

Post Reply