You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: this issue was originally posted in the old stockfish repo here: zhelyabuzhsky#125
Some discussion of this function in PR zhelyabuzhsky#124. If possible, would be good to make this function more accurate, although this may be challenging. The function works by checking if the fen syntax is valid, and also by giving a temporary SF executable the FEN and seeing if it crashes. This seems to work well for most use cases but it's not completely accurate.
See the discussion in zhelyabuzhsky#124 for a test case that the function is inconsistent with (it's a position with both kings next to each other: 8/8/8/3k4/3K4/8/8/8 b - - 0 1). If some improvements can be made for the function, this test case should ideally pass for any version of Stockfish being used.
In addition, the 2k2q2/8/8/8/8/8/8/2Q2K2 w - - 0 1 test case now fails for a recent Stockfish development build (May 30), since the is_fen_valid function incorrectly returns True. This is because SF now gives a bestmove, even though the position is illegal. See #41.
The text was updated successfully, but these errors were encountered:
Note: this issue was originally posted in the old stockfish repo here: zhelyabuzhsky#125
Some discussion of this function in PR zhelyabuzhsky#124. If possible, would be good to make this function more accurate, although this may be challenging. The function works by checking if the fen syntax is valid, and also by giving a temporary SF executable the FEN and seeing if it crashes. This seems to work well for most use cases but it's not completely accurate.
See the discussion in zhelyabuzhsky#124 for a test case that the function is inconsistent with (it's a position with both kings next to each other: 8/8/8/3k4/3K4/8/8/8 b - - 0 1). If some improvements can be made for the function, this test case should ideally pass for any version of Stockfish being used.
In addition, the
2k2q2/8/8/8/8/8/8/2Q2K2 w - - 0 1
test case now fails for a recent Stockfish development build (May 30), since theis_fen_valid
function incorrectly returns True. This is because SF now gives a bestmove, even though the position is illegal. See #41.The text was updated successfully, but these errors were encountered: