ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmer bug hunt challenge
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Steffan Westcott



Joined: 11 Mar 2006
Posts: 28
Location: Midlands, England

PostPost subject: Re: Programmer bug hunt challenge    Posted: Sat May 05, 2007 11:17 am Reply to topic Reply with quote

Dann Corbit wrote:
I think that the standard should redo e.p. so that the square is not named unless capture is possible.

There is a potential difficulty with that, the clause "unless capture is possible" needs stricter definition. What if the en passant capture is a pseudo-legal move but not a genuinely legal move i.e. it leaves the moving side in check?
[D]1k6/3r4/8/3Pp3/8/3K4/8/6R1 w - e6 0 2
   BK    ::    ::    ::
::    :: BR ::    ::    
   ::    ::    ::    ::
::    :: WP BP    ::    
   ::    ::    ::    ::
::    :: WK ::    ::    
   ::    ::    ::    ::
::    ::    ::    WR    

At present, it is not necessary to check for legal moves (psuedo-legal or otherwise) to write a FEN string. If the proposed change is to only name the en passant square when genuinely legal en passant capture(s) are possible, then programs writing FEN strings must check for the legality of moves i.e. become more complex.

On a related issue, for the purposes of 3-time repetition, section 9.2 of the FIDE Laws of Chess deem that a position is repeated only if :
Quote:
if the same player has the move, pieces of the same kind and colour occupy the same squares, and the possible moves of all the pieces of both players are the same. Positions are not the same if a pawn that could have been captured en passant can no longer in this manner be captured or if the right to castle has been changed temporarily or permanently.


The part I want to draw attention to is the clause "the possible moves of all the pieces of both players are the same".

With the current FEN standard, it is possible to have 2 chess positions which are considered a repetition by the FIDE laws, but have different en passant square encoding in FEN. For example:
[D]r3k3/8/8/4p3/4P3/8/8/1R2K3 w - - 0 2
BR ::    :: BK ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
::    ::    BP    ::    
   ::    :: WP ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
:: WR ::    WK    ::    

[D]r3k3/8/8/4p3/4P3/8/8/1R2K3 w - e6 0 2
BR ::    :: BK ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
::    ::    BP    ::    
   ::    :: WP ::    ::
::    ::    ::    ::    
   ::    ::    ::    ::
:: WR ::    WK    ::    


If we imagine the FEN standard were changed to only name the en passant square when genuinely legal en passant capture(s) are available, the last example shown is not possible. The conditions for position repetition then become exactly equivalent to :
Quote:
if the corresponding first four fields of the FEN encoding for the positions are the same
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
Programmer bug hunt challenge ed Fri May 04, 2007 9:26 am
      Re: Programmer bug hunt challenge Reinhard Scharnagl Fri May 04, 2007 10:09 am
      Re: Programmer bug hunt challenge Rob Fri May 04, 2007 10:31 am
            Re: Programmer bug hunt challenge Tony Fri May 04, 2007 10:49 am
                  Re: Programmer bug hunt challenge Tony Fri May 04, 2007 10:55 am
                  Re: Programmer bug hunt challenge Rob Fri May 04, 2007 11:25 am
                        Re: Programmer bug hunt challenge Tony Fri May 04, 2007 12:02 pm
            Re: Programmer bug hunt challenge Reinhard Scharnagl Fri May 04, 2007 12:01 pm
            Re: Programmer bug hunt challenge ed Fri May 04, 2007 1:51 pm
                  Re: Programmer bug hunt challenge Uri Blass Fri May 04, 2007 4:46 pm
                        Re: Programmer bug hunt challenge H.G.Muller Fri May 04, 2007 4:54 pm
                              Re: Programmer bug hunt challenge Stan Arts Fri May 04, 2007 5:27 pm
                              Re: Programmer bug hunt challenge Steffan Westcott Fri May 04, 2007 7:24 pm
                                    Re: Programmer bug hunt challenge Robert Hyatt Fri May 04, 2007 8:22 pm
                                          Re: Programmer bug hunt challenge Steven Edwards Sat May 05, 2007 12:28 am
                                                Re: Programmer bug hunt challenge Dann Corbit Sat May 05, 2007 1:36 am
                                                      Re: Programmer bug hunt challenge mambofish Sat May 05, 2007 11:11 am
                                                            Re: Programmer bug hunt challenge Steven Edwards Sat May 05, 2007 11:13 am
                                                      Re: Programmer bug hunt challenge mambofish Sat May 05, 2007 11:15 am
                                                            Re: Programmer bug hunt challenge Robert Hyatt Mon May 07, 2007 10:58 pm
                                                      Re: Programmer bug hunt challenge Steffan Westcott Sat May 05, 2007 11:17 am
                                                            Re: Programmer bug hunt challenge Robert Hyatt Tue May 08, 2007 12:41 am
                                                                  Re: Programmer bug hunt challenge H.G.Muller Tue May 08, 2007 12:11 pm
                                                                        Re: Programmer bug hunt challenge Robert Hyatt Tue May 08, 2007 4:35 pm
                                                                              Re: Programmer bug hunt challenge H.G.Muller Tue May 08, 2007 4:50 pm
                                                                                    Re: Programmer bug hunt challenge Robert Hyatt Tue May 08, 2007 5:42 pm
                                                                                          Re: Programmer bug hunt challenge H.G.Muller Tue May 08, 2007 7:26 pm
                                                                                          Re: Programmer bug hunt challenge H.G.Muller Tue May 08, 2007 7:26 pm
                              Re: Programmer bug hunt challenge Robert Hyatt Fri May 04, 2007 8:20 pm
                        Re: Programmer bug hunt challenge Robert Hyatt Fri May 04, 2007 8:19 pm
                  Re: Programmer bug hunt challenge Peter Fendrich Fri May 04, 2007 5:34 pm
      Re: Programmer bug hunt challenge Steven Edwards Wed May 09, 2007 11:14 am
            Re: Programmer bug hunt challenge NKOTB Wed May 09, 2007 11:53 am
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads