mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user