Q: How to Detect a Draw?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw, Ras, hgm, chrisw, Rebel, Ras

syzygy
Posts: 5662
Joined: Tue Feb 28, 2012 11:56 pm

Re: Q: How to Detect a Draw?

Post by syzygy »

Steve Maughan wrote: Fri Jun 28, 2024 7:05 pm When Stockfish (or any other strong engine) plays it often gives a "0.00" draw score — sometimes in the middlegame. It's unlikely an evaluation function would come out exactly at 0.00. How does Stockfish do this?

In the early days of NNUE we had win-loss-draw probabilities. Is the evaluation assumed to be 0.00 if the draw probability is above a certain threshold?
In the majority of cases this will be Stockfish's search concluding that a draw by rep is the "optimal" outcome (which does not mean that it is).
User avatar
hgm
Posts: 28268
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Q: How to Detect a Draw?

Post by hgm »

syzygy wrote: Tue Jul 02, 2024 2:44 am It would not mean that a draw can be forced by either side. One or both players could potentially reach a winning position that is statically evaluated as negative for that player.
True, 'forcing' of a resuly is a relative notion; it usually doesn't exclude the possibility of a better result in case of sub-optimal defense. This can even happen in the case of checkmate; if you can force a mate-in-10 it will not exclude you will actually get a mate in 6. And to make the analogy even better: that you though the mate-in-6 would be a better result is likely to be a misevaluation; the opponent's defense that led to the mate-in-10 might be much poorer.