Pros and cons of ...

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Michael Sherwin
Posts: 3015
Joined: Fri May 26, 2006 1:00 am
Location: WY, USA
Full name: Michael Sherwin

Pros and cons of ...

Post by Michael Sherwin » Tue May 07, 2019 4:06 pm

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?
I hate if statements. Pawns demand if statements. Therefore I hate pawns.

User avatar
hgm
Posts: 23150
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Pros and cons of ...

Post by hgm » Tue May 07, 2019 8:23 pm

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.

Michael Sherwin
Posts: 3015
Joined: Fri May 26, 2006 1:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Pros and cons of ...

Post by Michael Sherwin » Tue May 07, 2019 10:30 pm

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.
I hate if statements. Pawns demand if statements. Therefore I hate pawns.

Philipp Bach
Posts: 2
Joined: Thu Jan 01, 2015 11:21 am

Re: Pros and cons of ...

Post by Philipp Bach » Tue May 07, 2019 11:49 pm

It will likely be blind to stalemates, since they will often (always?) be followed by king captures.

User avatar
hgm
Posts: 23150
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Pros and cons of ...

Post by hgm » Wed May 08, 2019 6:54 am

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.

User avatar
Nordlandia
Posts: 2213
Joined: Fri Sep 25, 2015 7:38 pm
Location: Sortland, Norway

Re: Pros and cons of ...

Post by Nordlandia » Wed May 08, 2019 10:25 am

Is it possible to align the king a fighting value of 3 in the endgame for engines?

Post Reply