Inspired by this
Implement simple chess bot (with console or GUI) that has following features:
- [Pseudo-]graphically showing the board;
- Accepting user moves and making their own moves;
- Playing by basic chess rules (not doing illegal moves);
- Making at least minimally reasonable moves (no random moves, a player making random valid moves against the bot should lose most times).
In general, implement something like "SedChess" (linked above) in minimum number of bytes.
- Advances rules like castling, stalemate detection, en passant, etc;
- Checking validity of user inputs;
- Analysing more than 1 move in depth;
- No networking;
- No dependance on chess-specific libraries (unless they are included in the language and language's standard library) or programs;
- No lame tricks like showing two boards and requesting user play two games (with himself).