Page 1 of 1

Pros and cons of ...

Posted: Tue May 07, 2019 6:06 pm
by Michael Sherwin
If the kings are given a really high value and only one move at a time was generated and searched as well as legality not considered and only checkmate/stalemate situations were handled at the root would an engine be able to play well?

Re: Pros and cons of ...

Posted: Tue May 07, 2019 10:23 pm
by hgm
Not sure what you mean by 'only one move being generated'. Is that a 1-ply search without QS? Without QS it would never play well, no matter how you handle check.

Giving Kings a high value is no good for implementing the checking rules: it will start trading Kings, and 'resolve' a check by counter-checking with an equal or less-valuable piece. It has to know that capturing the King ends the game, so that it never gets to counter-strike at the other.

Re: Pros and cons of ...

Posted: Wed May 08, 2019 12:30 am
by Michael Sherwin
I mean not generating all moves and then playing one. Search would be to normal depth plus Qsearch. A test for capturing the king when a piece is taken. It would be cheap. Move ordering could still be done. Etc. The idea is fluid. The philosophy is not doing anything until needed.

Re: Pros and cons of ...

Posted: Wed May 08, 2019 1:49 am
by Philipp Bach
It will likely be blind to stalemates, since they will often (always?) be followed by king captures.

Re: Pros and cons of ...

Posted: Wed May 08, 2019 8:54 am
by hgm
This is sort of how micro-Max works; it does not maintain a move list, but just searches moves at it generates them. It searches the hash move before generating any move, however. But it assigns +INF score to capture of a King, rather than just adding a high value for the King to the incremental eval and searching that capture deeper. Because the latter would not lead to correct play, but to King trading, no matter how large the value of the King was. The +INF score is always good for a beta cutoff, as the root window = {-INF, +INF}.

BTW, it is not the adding of a high King value to the other eval that would cause problems, just the fact that you search on and allow the opponent to retaliate after your own Kin after his is gone. In fact not assigning absolute mate scores, but just adding a huge bonus for King capture would solve the flaw that engines start to play the worst possible moves when they can be checkmated.

Re: Pros and cons of ...

Posted: Wed May 08, 2019 12:25 pm
by Nordlandia
Is it possible to align the king a fighting value of 3 in the endgame for engines?