Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More FEN validation for lenient CECP interfaces #2

Closed
unserializable opened this issue Nov 21, 2020 · 1 comment
Closed

More FEN validation for lenient CECP interfaces #2

unserializable opened this issue Nov 21, 2020 · 1 comment
Assignees
Labels
1.0 1.0 branch 1.0.2 Present in release bundle 1.0.2 enhancement New feature or request
Projects

Comments

@unserializable
Copy link
Owner

From: https://www.gnu.org/software/xboard/engine-intf.html

Illegal positions: Note that either setboard or edit can be used to send an illegal position to the engine. The user can create any position with xboard's Edit Position command (even, say, an empty board, or a board with 64 white kings and no black ones). If your engine receives a position that it considers illegal, I suggest that you send the response "tellusererror Illegal position", and then respond to any attempted move with "Illegal move" until the next new, edit, or setboard command.

Variant capable interfaces like XBoard are quite lenient on what they allow on the board. Engine however should not process such positions. Besides lack of both kings, one thing that would definitely prevent normal engine play would be the presence of pawns on either 1st or 8th rank, so reject such positions too.

Couple of FENS that will be considered illegal, with pawn on 1st / 8th rank:

  • 8/8/7N/1k3K2/8/8/8/3P4 w - - 0 1
  • 5P2/8/7N/1k3K2/8/8/8/8 w - - 0 1
  • 4p3/8/7N/1k3K2/8/8/8/8 w - - 0 1
  • 8/8/7N/1k3K2/8/8/8/p7 w - - 0 1
@unserializable unserializable added enhancement New feature or request 1.0 1.0 branch labels Nov 21, 2020
@unserializable unserializable self-assigned this Nov 21, 2020
@unserializable
Copy link
Owner Author

Done in commit 7aa9d6a

@unserializable unserializable added 1.0.1 Present in release bundle 1.0.1 1.0.2 Present in release bundle 1.0.2 and removed 1.0.1 Present in release bundle 1.0.1 labels Jan 24, 2021
@unserializable unserializable added this to Done in 1.0.2 Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 1.0 branch 1.0.2 Present in release bundle 1.0.2 enhancement New feature or request
Projects
1.0.2
Done
Development

No branches or pull requests

1 participant