//Check to see if the king has been forced to move and has trapped a rook at a1/b1/g1/h1, //if so, then penalize the trapped rook to help extricate it if FStage <= sMiddle then begin x := AllowedCols[col]; if (x > 0) and (aPiece.GetRank = 1) then begin //blocked up? if (FBoard.GetPiece(aPiece.Forward) <> nil) and //Blocked left or right (FBoard.GetPieceType(aPiece.Index + Deltas[x]) = Kings[me]) then Dec(pos, TRAPPED_ROOK_PENALTY); end;end;
That is new and also was having an unknown behaviour in 32 bits in the trapped rook scenario:
- Stage before ending
- Columns 1 or 2 or 7 or 8
- Next square occupied
- Left or right squares, occupied by own king
But this should only be checked in rank 1!!!, in the other ranks it does not make sense, but even worst on the last rank you can only get garbage since the piece is out of the board...
Well, I will upload a fix for this and also the brand new 64 bits version