I cannot find an old post talking deeply about mvv/lva implementation. I know there are some, but the search gives very few entries with "mvv lva".
I know some engine do table by hand and other uses formulas like
Code: Select all
mvv*queenValue - lva
Code: Select all
MvvLvaScores[Victim][Attacker] = VictimScore[Victim] + 6 - ( VictimScore[Attacker] / 100);
My question is do we have a more or less optimized MVVLVA table out there, without taking into account any recapture knowledge ?
I was surprise to find a bug in Weini this afternoon affecting MVVLVA table. When I switch ScoreType from float to int a couple of weeks ago a self-test between the two versions told me nothing went wrong. But something was, the MVVLVA table was not good anymore, the MvvLvaScore were more or less egal to Mvv (the fact this had no impact is a little bit scary ...). So I give it a thought today and start using this simple thing (don't worry about the two K entries) :
Code: Select all
const ScoreType MvvLvaScores[15][15] = {
// K, K, Q, R, B, N, P, 0, P, N, B, R, Q, K, K
/*K*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/*K*/ { 0, 0, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 0, 0},
/*Q*/ { 0, 3, 4, 5, 6, 7, 8, 0, 8, 7, 6, 5, 4, 3, 0},
/*R*/ { 0, 1,-5, 2, 3, 4, 5, 0, 5, 4, 3, 2,-5, 1, 0},
/*B*/ { 0, 1,-6,-2, 1, 1, 3, 0, 3, 1, 1,-2,-6, 1, 0},
/*N*/ { 0, 1,-6,-2, 0, 1, 2, 0, 2, 1, 0,-2,-6, 1, 0},
/*P*/ { 0, 1,-9,-5,-3,-2, 0, 0, 0,-2,-3,-5,-9, 1, 0},
/*0*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/*P*/ { 0, 1,-9,-5,-3,-2, 0, 0, 0,-2,-3,-5,-9, 1, 0},
/*N*/ { 0, 1,-6,-2, 0, 1, 2, 0, 2, 1, 0,-2,-6, 1, 0},
/*B*/ { 0, 1,-6,-2, 1, 1, 3, 0, 3, 1, 1,-2,-6, 1, 0},
/*R*/ { 0, 1,-5, 2, 3, 4, 5, 0, 5, 4, 3, 2,-5, 1, 0},
/*Q*/ { 0, 3, 4, 5, 6, 7, 8, 0, 8, 7, 6, 5, 4, 3, 0},
/*K*/ { 0, 0, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 0, 0},
/*K*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};