Thank you for the reply. This is what I was thinking, but I was looking for a sort of proof (I like to respect standards :) ).
So engine, or board viewer, must take care of rules 2. and 3. from themselves, i suppose. Il Mercoledì 12 Febbraio 2014 17:21, Drew Ferguson <d...@afccommercial.co.uk> ha scritto: Hi I think for FEN, the castling marker are indicators only that the associated Rook or King have not moved and so there is a potential for castling. Remember this is a report of the position not of the rules for castling. For example, suppose a Black piece attacks f1 from b5 then if FEN were following the rules of chess, the marker would be Qkq say. Lets say White interposes a piece on e2 so now FEN could say KQkq again but according to the previous FEN, K-side castling is no longer permitted and so FEN would have to continue with Qkq - which in this case is not correct. In other words, FEN's castling marker can only satisfy your first rule. See this for a more authoritative statement https://chessprogramming.wikispaces.com/Castling+rights On Wed, 12 Feb 2014 15:53:33 +0000 (GMT) pietro grandinetti <ilcecchino2...@yahoo.it> wrote: > Hello Scidb users, > > I have a general question about FEN strings, but I would like to know > how this is done in Scidb. > > It is well-known that a FEN string contains a field about castling > possibilities. > > It is also well-known that castle is possibile iff (i hope to be right! ) > > 1. King and interested Rook had never moved in the previous moves; > 2. There is none piece between the King and the interested Rook; > 3. None of the square through which the King should pass must be > attacked by an enemy piece (or pawn). This includes the starting square > (e1 or e8), i.e. the King must not be under check. > > Now my doubt is: what of these three rules are included in the FEN? I > am confused becouse I found in some reference that the FEN for the > initial position is > > [rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1] > > but in the initial position the rule 2. is not satisfied. > > From another point of view: If I give the initial FEN to an engine, it > will look for 0-0 or 0-0-0 ? Or the engines check themselves the > fulfillment of the rules 2. and 3. ? > > From a third point of view (the main, for me): While doing a game > Parser/Viewer, to make a step forward (i.e. go ahead of one ply), the > FEN must be updated, but with respect of what castling-rules? (Or, if > you prefer, how this is handled in Scidb?) > > > > Regards > -- Drew Ferguson AFC Commercial http://www.afccommercial.co.uk