Linear vs. Nonlinear Evalulation

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Linear vs. Nonlinear Evalulation

Post by hgm »

I thought most strong programs have a very non-linear King-Safety term (the danger being assessed as a quadratic, or even quartic function of the enemy material attacking squares next to the King).

I would certainly count that as "non-linear evaluation". (I mean, if that would not count, what could possibly count?)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Linear vs. Nonlinear Evalulation

Post by bob »

Pradu wrote:
Gerd Isenberg wrote:I have a question about the definition of linear versus nonlinear evaluation.
Is there any advantage to having a linear vs non-linear evaluation function? Would it make analyzing an evaluation function significantly easier if it was linear?
I don't particularly like the term. I prefer first-order, second-order, etc.

A first-order evaluation looks at specific features, one at a time, and sums the scores. A second-order evaluation looks at some specific features, as above, but then some features are combined as a product, such as pawn-shelter for the king and pieces attacking squares around the king. Obviously the weaker the pawns around the king, the more valuable it is to have your pieces around that king since there will be more attacking chances. So second-order uses two significant evaluation terms and combines them into one score, whether it be by simple multiplication, or by some sort of two-dimensional table look-up (I do this in Crafty) or whatever.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Linear vs. Nonlinear Evalulation

Post by Gerd Isenberg »

bob wrote:
Pradu wrote:
Gerd Isenberg wrote:I have a question about the definition of linear versus nonlinear evaluation.
Is there any advantage to having a linear vs non-linear evaluation function? Would it make analyzing an evaluation function significantly easier if it was linear?
I don't particularly like the term. I prefer first-order, second-order, etc.

A first-order evaluation looks at specific features, one at a time, and sums the scores. A second-order evaluation looks at some specific features, as above, but then some features are combined as a product, such as pawn-shelter for the king and pieces attacking squares around the king. Obviously the weaker the pawns around the king, the more valuable it is to have your pieces around that king since there will be more attacking chances. So second-order uses two significant evaluation terms and combines them into one score, whether it be by simple multiplication, or by some sort of two-dimensional table look-up (I do this in Crafty) or whatever.
I agree with that. Definition taken. Also have to think about Tord's elaboration a bit. Puhh, those math guys ;-)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Linear vs. Nonlinear Evalulation

Post by bob »

Gerd Isenberg wrote:
bob wrote:
Pradu wrote:
Gerd Isenberg wrote:I have a question about the definition of linear versus nonlinear evaluation.
Is there any advantage to having a linear vs non-linear evaluation function? Would it make analyzing an evaluation function significantly easier if it was linear?
I don't particularly like the term. I prefer first-order, second-order, etc.

A first-order evaluation looks at specific features, one at a time, and sums the scores. A second-order evaluation looks at some specific features, as above, but then some features are combined as a product, such as pawn-shelter for the king and pieces attacking squares around the king. Obviously the weaker the pawns around the king, the more valuable it is to have your pieces around that king since there will be more attacking chances. So second-order uses two significant evaluation terms and combines them into one score, whether it be by simple multiplication, or by some sort of two-dimensional table look-up (I do this in Crafty) or whatever.
I agree with that. Definition taken. Also have to think about Tord's elaboration a bit. Puhh, those math guys ;-)
I try to avoid reading some ofTord's posts until I have wrapped my head with duct tape, so that my head won't explode. However, I must say, some of yours fit that category as well when you get into the Kogge-stone tricks of the trade and such. :)