Page 1 of 1

10383 - Queen vs Rook

Posted: Sun Jan 12, 2003 8:10 pm
by mmammel
Hi,

I was confident that my program solved all endgame positions but I get WA. Could anyone supply me with challenging input to see if I agree with you? Mine solves the sample input correctly...
Here's one piece of info I have determined:
(partial spoiler)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The maximum number of moves to checkmate is 35, any position not resolved by then is a draw.

Thanks,
Mark

Posted: Tue Jan 14, 2003 8:50 pm
by SnapDragon
I get 35 as well. It sounds like your search is correct; my guess is that you have some minor error when outputting the winning moves? Something cosmetic, anyway.

10383 Queen vs Rook: WA

Posted: Fri Jan 17, 2003 5:27 pm
by mmammel
Thanks for pointing me toward my output -- my table was correct but I was incorrectly rotating the best moves during output. Whew, good problem!

-Mark

Posted: Sun Jan 19, 2003 12:50 am
by Yarin
Whew, good problem
Thanks :) I'm surprised so many has taken time trying it. There can't be many problems on UVA which requires more _time_ in the actual coding phase.

Posted: Sat Jul 26, 2003 3:15 am
by kh9
Just wondering... is castling a valid move in this problem?

Posted: Tue Aug 05, 2003 5:24 am
by Yarin
From the problem statement:
You may also assume that castling will not be allowed anytime during the game for the player with king + rook.
Guess that should answer your question.

Posted: Sun Oct 23, 2005 7:51 pm
by Cho
In case anyone is still interested in this very old thread, pls clarify for me.
Why the output of the first sample "WKa1 BKa3 WRc2 BQd2 B" is not:

Code: Select all

Black mates in 1
Qxc1#
Do I need to know further rules of Chess to get the sample output?

Posted: Sun Oct 23, 2005 8:17 pm
by Per
Cho wrote:In case anyone is still interested in this very old thread, pls clarify for me.
Why the output of the first sample "WKa1 BKa3 WRc2 BQd2 B" is not:

Code: Select all

Black mates in 1
Qxc1#
Do I need to know further rules of Chess to get the sample output?
I'm guessing you mean "Qxc2#" rather than "Qxc1#".

Check mate can only occur if you are checked. If you cannot move, but are not checked, the game ends a draw.

(Incidentally, I learned this rule when solving this problem.)

Posted: Sun Oct 23, 2005 8:52 pm
by Cho
Per wrote:I'm guessing you mean "Qxc2#" rather than "Qxc1#"
Yes, exactly. Thanks. :)