amitkumar3968 / raptor-chess-interface

Automatically exported from code.google.com/p/raptor-chess-interface
0 stars 0 forks source link

Won't Make Legal King Move #627

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On FICS, examine Enpassant %1
2. Forward to white's move 11, using the mouse try to move the king 11. Kc1

This is a FR game.  Raptor will not accept this move.  During play, I had to 
manually input the move by typing "Kc1" into the console.

I'm version .98 on 2.6.38-11-generic #50-Ubuntu x86_64 x86_64 x86_64 GNU/Linux 

Original issue reported on code.google.com by mdrmike...@gmail.com on 9 Oct 2011 at 12:26

GoogleCodeExporter commented 9 years ago
Just to clarify: in order to castle you have to move the king to g1?

Original comment by bvk...@gmail.com on 9 Oct 2011 at 7:13

GoogleCodeExporter commented 9 years ago
This is the position: 

r1bk1r2/ppp4p/3p2p1/n2q1p2/4nP2/2P1B1P1/PPP2N1P/R2K1RQB w KQkq - 4 11

Castling is not legal in the above position as white is in check.  Otherwise, 
A-side castling would be Kc1/Rd1 (the king and rook always end up the same as 
in FIDE chess).

In FR, castling by moving the king should not be allowed as there is ambiguity 
in some positions e.g. could either be a simple king move or a castle.  This is 
why CDay added the castle buttons (I think).  Some interfaces also allow 'K 
takes rook' as a means to indicate castling intentions.

Original comment by mdrmike...@gmail.com on 9 Oct 2011 at 8:19

GoogleCodeExporter commented 9 years ago
So the bug here is the following as I understand: Raptor sends long castle when 
you make move to c1, but other interfaces castle after king move to b1. So the 
fix would be to reassign castling trigger from king move to c1 to king move to 
b1? 

Original comment by bvk...@gmail.com on 14 Oct 2011 at 6:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The bug is raptor won't make the move, instead it "illegal move" beeps and 
moves the king back to d1. It never sends the move to FICS, obviously it thinks 
it's illegal.

You can duplicate the bug by following the steps in comment 1 above.  Remember 
to move the king with a mouse instead of just hitting the arrow button.  For 
instance, using the mouse, you can move the king to e1 just fine but you CAN'T 
move the king to c1.  However, both moves are legal and in examine mode you 
should be able to make either move just fine.

Debugging hint: 

Can you paste a FEN into Raptor?   Try pasting two FEN's one with castling 
perms set and won with castling perms unset.  In each case try to make the move 
Kcl.

Original comment by mdrmike...@gmail.com on 15 Oct 2011 at 8:50

GoogleCodeExporter commented 9 years ago
PS Possibly, I'm wrong in assuming "Raptor never sends the move to FICS". If it 
does send a move, it's sending the WRONG one.   It's either not sending a move 
or sending a wrong move to FICS.  Pehaps it's sending "o-o-o". 

Original comment by mdrmike...@gmail.com on 15 Oct 2011 at 9:26

GoogleCodeExporter commented 9 years ago
Don't reassign any castling triggers. Simplest would be to only allow castling 
via the castling buttons.  I assumed Raptor was already coded this way.

The only other reasonable castling trigger would be "white king takes white A 
rook" for A side castling and "white king takes B side rook for B side 
castling.  By rule the king is always between the rooks on a FR setup.  In some 
positions the king does not even move at all on castling, only the appropriate 
rook!  In other positions the king only slides one square presenting an 
ambiguity problem.  Don't change any code unless you thoroughly understand all 
this.

Finally, on the comment(s) I made above.  I wasn't sure whether or not Raptor 
did it's own legality checking before sending a move to FICS.  Never looked a 
the code.  I'm a c++ guy.

Original comment by mdrmike...@gmail.com on 15 Oct 2011 at 10:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry to be so wordy on this but I think there's been some confusion.  We're
talking about a simple king move here which is not the same as a castle.
 Hence "Kc1"  or king to any square is a completely different move than
"o-o-o".   In Fischer Random (FR), just like FIDE chess, you can either move
the king or castle.   In both variations, you still must have castling perms
and it must be legal in the given position.  When castling,  you can't move
the king through check, etc.

I could not make a *simple king move *in the alluded to game.  Raptor, for
what ever reason, does not send "Kc1" to FICS, at least not from mouse input
on the graphical chess board. .

Original comment by mdrmike...@gmail.com on 20 Oct 2011 at 1:54

GoogleCodeExporter commented 9 years ago
I've overridden the board castling triggers, so the only way to castle in FR 
now is to press castling button. You may check if it works properly using 
newest package found here http://dl.dropbox.com/u/46373738/raptor-0.98u2.deb 

Original comment by bvk...@gmail.com on 21 Oct 2011 at 3:38