the single biggest imbalance raison d'evaluation is the difference in numbers between the side with the higher and side with the lower number of pieces.Evert wrote:I'm not sure I understand your general term. You can calculate the material part of the evaluation (simplifying to Queens and Knights only) asFor the case at hand (Q/N on one side only), that simplifies toCode: Select all
eval = Q * OwnQueens + N * OwnKnights + imbalance(OwnQueens, EnemyKnights) - (Own <=> Enemy).
So any terms in imbalance() that are simply proportional to OwnQueens or EnemyKnights can be absorbed in the piece value, so only cross terms and quadratic (or higher order) terms survive. So the lowest order form should be something likeCode: Select all
eval = Q * OwnQueens - N * EnemyKnights + imbalance(OwnQueens, EnemyKnights)
I'm not sure what to make of the quadratic terms, but since they don't depend on the other material present, I'm tempted to split those off from the imbalance, so we getCode: Select all
imbalance(OQ, EN) = C[0]*OQ*OQ + C[1]*EN*EN + C[2]*OQ*EN
This gets you something like the "redundancy" terms that Larry Kaufman talked about in his paper on imbalances. Ok, I guess those are the A and B term in your expression. Anyway, this leavesCode: Select all
eval = (Q + C[0]*OQ)*OQ + (N + C[1]*EN)*EN + imbalance'(OQ, EN)
for the imbalance proper.Code: Select all
imbalance'(OQ, EN) = C[2]*OQ*EN
Now, the interesting thing about all of this is that Stockfish actually uses a general quadratic form to evaluate material (which I think it inherited from Glaurung), but it clearly doesn't handle this extreme case correctly. I wonder if it can be tuned so that it does, without affecting the normal case (no more than two knights and one queen per side).
Of course, this assumes that higher order than quadratic terms are negligible.
For a mix of pieces, like in the opening position of regular chess, the minors are balanced on both sides, so they are fated to be traded against each other, leaving the Queens (and Rooks) mostly unaffected, as you say.
I have the feeling that I need to sit down and work all of this out into some sort of algorithm, but it's daunting. I would very much like to have something like this for SjaakII though.
second most important is the difference in strength between the more numerous lower-power pieces and the less numerous higher-power pieces.
so, knights gain more vs queens than they do vs rooks.
so maybe, something of the kind B(bonus)=(imbalance coefficient)*(difference in numbers)*(average difference of values)
something like that.
but all that is too general, it will all depend also on the specific constellation.