I contend that if a program (or person) is not capable of detecting when its
opponent has played an illegal move, then that program (or person) isn't
playing chess, but rather a vaguely similar game that happens to use the same
pieces and gameboard. The rules of chess do not permit illegal moves. Period.
If you're playing a game in which moves that are not legal chess moves are
permissible (either explicitly or implicitly by default), then that game is
not chess.
Resigning is never an illegal move and is allowed at any point in the
game.
Some of the strongest chess programs in the world do not handle
underpromotion in their search.
Your contention is true if and only if that is a stated goal of the
program in question.
If the goal is to produce the smallest chess program that plays legal
chess, then the 'resign' program is it.
If the goal is to produce the smallest program that plays correctly,
that is another matter.
If the goal is to produce the smallest program that plays correctly
and uses a standard interface such as Xboard or UCI, then that is
another matter.
Along these lines: picoszachy, olithink, and microchess spring to
mind:
http://www.kalisz.mm.pl/~pic/nanochess/#pikoChess
http://www.mediafire.com/?2jptyjmtzxm
http://home.hccnet.nl/h.g.muller/dwnldpage.html
Olithink and MicroChess come with source (Olithink's source is quite
beautiful).
If you just want the strongest program that you don't have to pay
anything for, this is it:
http://www.rybkachess.com/index.php?auswahl=Demo+version
This is one of the programs I spoke about that will not try all legal
underpomotions.
Be that as it may, it will beat almost every other chess program in
the world, including some that you have to shell out over $100 for.
Here is a free GUI that allows you to play chess games with these
chess engines:
http://www.playwitharena.com/
IMO, the criteria for a minimal chess-playing program are:
1. Determine whether it is the program's, or the opponent's, turn to move..
2. On its turn, play a legal move, offer a draw, or resign.
3. On the opponent's turn, ensure that the opponent's move is legal.
4. Determine when the game has ended, declare the outcome, and cease playing.
(Note that #2 covers the question of responding to the opponent's offer of a
draw: while the offer of a draw must be accepted explicitly, it may be
declined implicitly by simply playing a move.)
That's fine, but it is not required by the rules of chess.
That's not playing chess, by any meaningful definition of the phrase.
Of course it is. It follows the rules of the game without mistake.
There are dozens of open source chess engines written in C. I guess
that none of them can play chess without any error (including the
IOCCC entry in this thread), though some are remarkably bug free. The
strongest open source chess engines are C++, though.