Page **2** of **2**

### Re: Linear vs. Nonlinear Evalulation

Posted: **Thu Aug 27, 2009 9:50 am**

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?)

### Re: Linear vs. Nonlinear Evalulation

Posted: **Thu Aug 27, 2009 4:35 pm**

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.

### Re: Linear vs. Nonlinear Evalulation

Posted: **Thu Aug 27, 2009 7:54 pm**

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

### Re: Linear vs. Nonlinear Evalulation

Posted: **Thu Aug 27, 2009 8:23 pm**

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.