]> git.sesse.net Git - stockfish/commitdiff
Reduce history 4 times instead of 2 when reach the maximum
authorMarco Costalba <mcostalba@gmail.com>
Mon, 18 May 2009 07:51:46 +0000 (09:51 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 20 May 2009 07:03:15 +0000 (09:03 +0200)
This gives more weight to newer entries.

After 999 games at 1'+ 0" we have:

Mod vs Orig +233/-208/=558 51.25% +9 ELO

Confirmed by another session of 437 games:

Mod vs Orig +109/-92/=236 51.95% +14 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/history.cpp

index 6fe222feb4dfe7bec169d177bbb4b985ff350bc7..edd5cdb7c500a6e86166705c3eb47097db982fb1 100644 (file)
@@ -64,7 +64,7 @@ void History::success(Piece p, Square to, Depth d) {
   if (history[p][to] >= HistoryMax)
       for (int i = 0; i < 16; i++)
           for (int j = 0; j < 64; j++)
   if (history[p][to] >= HistoryMax)
       for (int i = 0; i < 16; i++)
           for (int j = 0; j < 64; j++)
-              history[i][j] /= 2;
+              history[i][j] /= 4;
 }
 
 
 }