Hello, when I input certain positions (from copying and pasting moves from an online correspondence game which allows computer analysis), the board shows up a big black cross on one (seemingly random) square - this affects the computer analysis for the next move that the program gives me - when I enter the position manually so it doesn’t show up the cross - it gives a totally different suggested move - any ideas?
The X on the board means that the square is vulnerable to en passant capture. The reason it’s present while importing PGN is simply because that’s how the library I use to parse PGN (chess.js, an excellent library BTW) reports it. (If a pawn moves two squares, chess.js automatically marks the skipped square as vulnerable to en passant even if there are no pieces attacking said square.) I’m positive chess.js has good reasons for doing this, but I think NCM should be filtering out these non-attacked en passant squares.
However, with Stockfish on NCM, it should not affect the engine’s calculations, and here’s why:
Whenever NCM invokes Stockfish to calculate a move, it looks at the entire history of the board (the same history you can view with the undo/redo buttons) and does its best to reconstruct a starting position and sequence of legal moves to arrive at the position for which the move is being calculated.
(Normally this would be trivial, but in NCM’s case, because ad-hoc movements are allowed, we have to account for some wrinkles to get the best results; e.g., one piece being moved and then moved immediately back.)
You can see this in the engine logs:
position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 moves e2e4 e7e5 g1f3
So, even if there is an X in the position(s) resulting from a PGN import, it won’t affect Stockfish, because the position is communicated to Stockfish as an initial position (likely the starting position) followed a sequence of moves. This allows Stockfish to make its own (and correct) determination as to which square if any is vulnerable to an en passant capture.