In addition to its complex way of handling piece value, Stockfish includes something called the "quadratic imbalance terms". That is a phrase used by the chess programming community. Stockfish in the comments calls it "Polynomial material imbalance parameters"
github.com/official-stockfish/Stockfish/blob/master/src/material.cpp#L32
What that code is doing is computing an "imbalance" score.
There is a score for each pair (our piece, another of our pieces) and a score for each pair (our piece, their piece). But this is misleading because all such pairs are not considered! The supposed 6x6 matrix (bishop-pair, pawn, knight, bishop, rook, queen) is actually a triangle! Note that this includes the 'bishop pair' concept as well!
So where did this code come from?
It seems to have its beginnings in work done by Mark J. Sturman, a chess and computer chess researcher.
www.chessprogramming.org/Mark_Sturman
There is an interesting article by Larry Kaufman here
www.chess.com/article/view/the-evaluation-of-material-imbalances-by-im-larry-kaufman
This was first published in Chess Life, March 1999. The chess.com version is edited by Dan Heisman.
Kaufman references Sturman.
www.chessprogramming.org/Larry_Kaufman
en.wikipedia.org/wiki/Larry_Kaufman
Kaufman is an American GM who is a professional computer chess programmer.
github.com/official-stockfish/Stockfish/blob/master/src/material.cpp#L32
What that code is doing is computing an "imbalance" score.
There is a score for each pair (our piece, another of our pieces) and a score for each pair (our piece, their piece). But this is misleading because all such pairs are not considered! The supposed 6x6 matrix (bishop-pair, pawn, knight, bishop, rook, queen) is actually a triangle! Note that this includes the 'bishop pair' concept as well!
So where did this code come from?
It seems to have its beginnings in work done by Mark J. Sturman, a chess and computer chess researcher.
www.chessprogramming.org/Mark_Sturman
There is an interesting article by Larry Kaufman here
www.chess.com/article/view/the-evaluation-of-material-imbalances-by-im-larry-kaufman
This was first published in Chess Life, March 1999. The chess.com version is edited by Dan Heisman.
Kaufman references Sturman.
www.chessprogramming.org/Larry_Kaufman
en.wikipedia.org/wiki/Larry_Kaufman
Kaufman is an American GM who is a professional computer chess programmer.