Do I need to consider checks in evaluation ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

MahmoudUthman
Posts: 234
Joined: Sat Jan 17, 2015 11:54 pm

Do I need to consider checks in evaluation ?

Post by MahmoudUthman »

As far as I know evaluation shouldn't be called from Qsearch while in check or giving checks , but it can be called from other places for example to guide pruning decisions .
So is there anyplace form which it may be called while I'm in check or giving check ?and if there was would not considering checks in evaluation result in an incorrect/bad pruning decision especially since I'm assigning high weights for mobility and not considering checks should/may result in a huge difference in the returned value?
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Do I need to consider checks in evaluation ?

Post by Sven »

MahmoudUthman wrote:As far as I know evaluation shouldn't be called from Qsearch while in check or giving checks , but it can be called from other places for example to guide pruning decisions .
So is there anyplace form which it may be called while I'm in check or giving check ?and if there was would not considering checks in evaluation result in an incorrect/bad pruning decision especially since I'm assigning high weights for mobility and not considering checks should/may result in a huge difference in the returned value?
If the engine is aware of the moving side currently being in check then there should better be no pruning at all. So I would not care much about evaluation in in-check positions.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Do I need to consider checks in evaluation ?

Post by Ferdy »

MahmoudUthman wrote:As far as I know evaluation shouldn't be called from Qsearch while in check or giving checks , but it can be called from other places for example to guide pruning decisions .
So is there anyplace form which it may be called while I'm in check or giving check ?and if there was would not considering checks in evaluation result in an incorrect/bad pruning decision especially since I'm assigning high weights for mobility and not considering checks should/may result in a huge difference in the returned value?
You can call the evaluation function at any time, in fact you can use your evaluation to detect if you are in check or not. When you are in check and your evaluation is already bad or something that your king safety is not good and you don't have a promising passer and you cannot capture the king attacker for example, this is actually the best time for you to decide to prune or not.