Add Tord's polynomial material balance

Use a polynomial weighted evaluation to calculate
material value.

This is far more flexible and elegant then applying
a series of single euristic rules as before.

Also correct a design issue in which we returned two
values, one for middle game and one for endgame, while
instead, because game phase is a function of board
material itself, only one value should be calculated and
used both for mid and end game.

Verified it is equivalent to the tuning branch results with
parameter values sampled after 40.000 games.

After 999 games at 1+0

Mod vs Orig +277 =482 -240 51.85%  518.0/999  +13 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-07-20 09:56:21 +01:00
parent 5600d91cff
commit 044ad593b3
3 changed files with 52 additions and 39 deletions

View File

@@ -326,8 +326,8 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) {
// Probe the material hash table
ei.mi = MaterialTable[threadID]->get_material_info(pos);
ei.mgValue += ei.mi->mg_value();
ei.egValue += ei.mi->eg_value();
ei.mgValue += ei.mi->material_value();
ei.egValue += ei.mi->material_value();
// If we have a specialized evaluation function for the current material
// configuration, call it and return