The idea is simple: In normal condicions we add a bonus/malus for each evaluation term. What I have been testing is have a counter for each weakness I found (currently only for pawn and king-safety weakness). At the end of the evaluation part I add a malus depending how many weakness I have. I add zero if only 0 or 1 weakness, and a few centipawns for each weakness more than zero.
The idea is than having two weakness is worse than the addition of both, but having cero or only one has no addition effect;
I dont know If I am explaining this well. In code it would be:
Code: Select all
int deb[20] = { 0, 0, -5, -10, -16, -22, -29, ....etc }
int n_w = 0; /* counter for weakness */
if (double_pawns) n_w++;
if (isolated_pawn) n_w++;
if (king_is_not_safe) n_w++;
etc....
final_score += deb[n_w];
return final_score;Have anyone tried this before? what your opinion about this idea?.
Best regards,
Fermín
