Asymmetric evaluation function

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Fabio Gobbato
Posts: 217
Joined: Fri Apr 11, 2014 10:45 am
Full name: Fabio Gobbato

Asymmetric evaluation function

Post by Fabio Gobbato »

Studying the errors of my evaluation function I have found that most of them are caused by a threatened queen by the side to move.

For example:
[d]8/7k/r5p1/2P1B2p/3P1p2/5Qr1/8/6RK b - - 0 65

With a symmetric evaluation of attacks a threatened queen couldn't have a big bonus because if it is on move it could move on a safe square.
But with an asymmetric evaluation of attacks we could give a big bonus because most of the times the queen will be captured.

So I have tried to change the attacks evalutation only adding a big bonus (about 500cp) for a threatened queen by the side to move. I have made a short test and I have seen about a +10ELO improvement.

Of course an asymetrical approach could be used also in other parts of the evaluation.
So my question is: why in most of engines is used a symmetric evaluation?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Asymmetric evaluation function

Post by hgm »

Because they use quiescence search. A position where the stm can capture the Queen is not quiet, so the static evaluation does not have to work for it. The capture will be tried, and if it was sound, the evaluation after it will notice you have one less Queen. If the Queen was poisoned, and capturing it leads to disaster, then there would also be little jjustification for giving a bonus for the attack on it.
User avatar
Fabio Gobbato
Posts: 217
Joined: Fri Apr 11, 2014 10:45 am
Full name: Fabio Gobbato

Re: Asymmetric evaluation function

Post by Fabio Gobbato »

Of course the quiescence solve the position but if I put the knowledge in the static evaluation the quiescence will cut on the stand pat, else it will generate all the captures try the move and evaluate another time the resulting position
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Asymmetric evaluation function

Post by hgm »

Statically judging whether an attacked Queen can indeed be taken, and results in the gain of a Queen, is either very complex or very unreliable (and likely both). This is why engines nowadays use QS.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Asymmetric evaluation function

Post by bob »

Fabio Gobbato wrote:Of course the quiescence solve the position but if I put the knowledge in the static evaluation the quiescence will cut on the stand pat, else it will generate all the captures try the move and evaluate another time the resulting position
Static evaluation doesn't understand this stuff very well. How can you statically determine if the queen can safely be captured or not? You would have to handle pin detection, overloaded piece detection, mate threats, etc...

That's what the search is for.