Linear vs. Nonlinear Evalulation

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 23718
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Linear vs. Nonlinear Evalulation

Post by hgm » Thu Aug 27, 2009 9:50 am

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: 20555
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Linear vs. Nonlinear Evalulation

Post by bob » Thu Aug 27, 2009 4:35 pm

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: 2127
Joined: Wed Mar 08, 2006 7:47 pm
Location: Hattingen, Germany

Re: Linear vs. Nonlinear Evalulation

Post by Gerd Isenberg » Thu Aug 27, 2009 7:54 pm

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: 20555
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Linear vs. Nonlinear Evalulation

Post by bob » Thu Aug 27, 2009 8:23 pm

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. :)

Post Reply