Uri Blass wrote:This is the way that all the engines work
There is no point in doing null move when the king is under threat
and the question if your program is a king capture engine is not relevant because it is obviousthat the when you threat the opponent king you have a threat.
I also do not think that a king capture engine is a good idea and I think that it is better to detect mate by evaluation.
Uri
Hi Uri,
do you mean evaluation or inCheck evasion?
Thus by generating an empty list of legal moves?
If one generates pseudo legal moves in a typical inCheck evasion move generator, it is likely that invalid moves may be introduced:
[diag]4r3/6k1/7b/8/2b1R3/5P2/1qB1KP2/2QNB3 w - -
[/diag]
Here engines may generate Kf1, Rxc4 and Bd3 and therefor must make the moves to determine they are all invalid.
Uri Blass wrote:Not detecting mate by evaluation means that you may need one more ply to see mate and I do not think that it is a good idea.
Uri
Whether this is done by ordinary and probably fast make/unmakeMove and an "opponent King" in check or already during a legal move generation is pragmatically the same... except - and may be that is what you mean with mate detection by evaluation - that one may prepare and use information about pinned pieces already in evaluation.
What i understand by mate detection in eval is finding a mate in one move statically.
Gerd