Here's one I've been thinking about, but have thus far ignored.
What do you do about the eval function if STM is in check. At the moment, I ignore, but that doesn't feel right. I could score it as 0 or some lower score, but that doesn't sound right either. What do others do when calling the eval function when in check?
Evaluation function query - scoring when in check
Moderators: hgm, Rebel, chrisw
-
- Posts: 327
- Joined: Sat Mar 27, 2010 7:15 pm
-
- Posts: 360
- Joined: Thu Jan 22, 2015 3:21 pm
- Location: Zurich, Switzerland
- Full name: Jonathan Rosenthal
Re: Evaluation function query - scoring when in check
If the side to move is in check I don't call the evaluation function in such positions and do not reduce search depth in such positions either. I feel this is necessary for tactical stability.
qIf your evaluation function can deal with short tactics like a neural network can for example, there is little reason to care about checks specifically. Unfortunately, classical feature based models can't typically do that.
qIf your evaluation function can deal with short tactics like a neural network can for example, there is little reason to care about checks specifically. Unfortunately, classical feature based models can't typically do that.
-Jonathan
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Evaluation function query - scoring when in check
Nothing special, but in main search, I don't enter QS when in check, and in QS, I generate evasions.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Evaluation function query - scoring when in check
I never enter QS when in check also.
Maybe the question was what to do with static scoring when in check. And for this question I see many engine setting static score to mate. Here is xiphos line about that
Code: Select all
if (pos->in_check)
static_score = -MATE_SCORE + ply;
else
// ...
-
- Posts: 327
- Joined: Sat Mar 27, 2010 7:15 pm
Re: Evaluation function query - scoring when in check
Yes, the question would have been better phrased as 'what to do with static scoring when in check'. Thanks for your feedback, I *think* your response makes sense.xr_a_y wrote: ↑Tue Jan 22, 2019 7:40 amI never enter QS when in check also.
Maybe the question was what to do with static scoring when in check. And for this question I see many engine setting static score to mate. Here is xiphos line about that
I guess this avoid check for isInCheck bool at many places.Code: Select all
if (pos->in_check) static_score = -MATE_SCORE + ply; else // ...