If you don't store illegal positions in the TT, there is no problem.mcostalba wrote:Also before TT move ?Fguy64 wrote:Well, I did end up doing move ordering so that any king captures are evaluated first, if that makes a difference.mcostalba wrote:What if THAT move is the fourth or fifth tried on that node ?Fguy64 wrote: My suggestion involves searching positions in which the king is in check. Thus one of the "legal" replies will be capturing the king, and when that move is searched, the first thing that happens is that the next occurrence of alphaBeta() will say Hey! this guy has no king, and return an extreme eval without considering any replies.
The position is illegal (because opponent king is under check) but you don't know it. Then, for instance, generate captures and start try them and after 4-5 moves you finally generate the king capture and discover position is illegal.
I would say really too late, you have spent time searching moves possibly at big depth for nothing.
On not leaving the King in check
Moderator: Ras
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am