Inspired by this

Implement simple chess bot (with console or GUI) that has following features:

  1. [Pseudo-]graphically showing the board;
  2. Accepting user moves and making their own moves;
  3. Playing by basic chess rules (not doing illegal moves);
  4. 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.


  1. Advances rules like castling, stalemate detection, en passant, etc;
  2. Checking validity of user inputs;
  3. Analysing more than 1 move in depth;


  1. No networking;
  2. No dependance on chess-specific libraries (unless they are included in the language and language's standard library) or programs;
  3. No lame tricks like showing two boards and requesting user play two games (with himself).
  • 4
    \$\begingroup\$ Do you think anyone can compete with this? \$\endgroup\$
    – ugoren
    Commented Aug 25, 2013 at 13:59
  • 3
    \$\begingroup\$ You describe a major undertaking, not a puzzle. \$\endgroup\$
    – DavidC
    Commented Aug 25, 2013 at 14:27
  • 2
    \$\begingroup\$ There are other major undertakings like golfing an x86 emulator here. \$\endgroup\$
    – Vi.
    Commented Aug 25, 2013 at 14:35
  • 1
    \$\begingroup\$ This looks rather like an extension of Calculate all legal moves, which so far has no submissions. If you want anyone to attempt an answer, you might be better off restricting the question to the half which that one doesn't cover - i.e. estimating a board's value. \$\endgroup\$ Commented Aug 25, 2013 at 15:28
  • 1
    \$\begingroup\$ [This one posted by ugoren][1] doesn't recognize checkmate or castling or en passant. [1]: js1k.com/2010-first/demo/435 \$\endgroup\$ Commented May 14, 2017 at 19:00


Browse other questions tagged or ask your own question.