]> git.sesse.net Git - stockfish/blobdiff - src/psqt.cpp
Fix a crash issue when traversing PVs.
[stockfish] / src / psqt.cpp
index d8119306f097b93a5ad1bf3df4303ee195cf8b09..4703da35c8b754d237b47d562c44c7747127751f 100644 (file)
@@ -2,7 +2,7 @@
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
   Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
   Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-  Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+  Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -47,14 +47,14 @@ constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
    { S( -2, 1), S( 20,-12), S(-10, 6), S(-2,25) }
   },
   { // Knight
-   { S(-161,-105), S(-96,-82), S(-80,-46), S(-73,-14) },
-   { S( -83, -69), S(-43,-54), S(-21,-17), S(-10,  9) },
-   { S( -71, -50), S(-22,-39), S(  0, -7), S(  9, 28) },
-   { S( -25, -41), S( 18,-25), S( 43,  6), S( 47, 38) },
-   { S( -26, -46), S( 16,-25), S( 38,  3), S( 50, 40) },
-   { S( -11, -54), S( 37,-38), S( 56, -7), S( 65, 27) },
-   { S( -63, -65), S(-19,-50), S(  5,-24), S( 14, 13) },
-   { S(-195,-109), S(-67,-89), S(-42,-50), S(-29,-13) }
+   { S(-169,-105), S(-96,-74), S(-80,-46), S(-79,-18) },
+   { S( -79, -70), S(-39,-56), S(-24,-15), S( -9,  6) },
+   { S( -64, -38), S(-20,-33), S(  4, -5), S( 19, 27) },
+   { S( -28, -36), S(  5,  0), S( 41, 13), S( 47, 34) },
+   { S( -29, -41), S( 13,-20), S( 42,  4), S( 52, 35) },
+   { S( -11, -51), S( 28,-38), S( 63,-17), S( 55, 19) },
+   { S( -67, -64), S(-21,-45), S(  6,-37), S( 37, 16) },
+   { S(-200, -98), S(-80,-89), S(-53,-53), S(-32,-16) }
   },
   { // Bishop
    { S(-49,-58), S(- 7,-31), S(-10,-37), S(-34,-19) },
@@ -67,24 +67,24 @@ constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
    { S(-47,-55), S( -7,-32), S(-17,-36), S(-29,-17) }
   },
   { // Rook
-   { S(-25, 0), S(-16, 0), S(-16, 0), S(-9, 0) },
-   { S(-21, 0), S( -8, 0), S( -3, 0), S( 0, 0) },
-   { S(-21, 0), S( -9, 0), S( -4, 0), S( 2, 0) },
-   { S(-22, 0), S( -6, 0), S( -1, 0), S( 2, 0) },
-   { S(-22, 0), S( -7, 0), S(  0, 0), S( 1, 0) },
-   { S(-21, 0), S( -7, 0), S(  0, 0), S( 2, 0) },
-   { S(-12, 0), S(  4, 0), S(  8, 0), S(12, 0) },
-   { S(-23, 0), S(-15, 0), S(-11, 0), S(-5, 0) }
+   { S(-24, 0), S(-15, 3), S( -8, 0), S( 0, 3) },
+   { S(-18,-7), S( -5,-5), S( -1,-5), S( 1,-1) },
+   { S(-19, 6), S(-10,-7), S(  1, 3), S( 0, 3) },
+   { S(-21, 0), S( -7, 4), S( -4,-2), S(-4, 1) },
+   { S(-21,-7), S(-12, 5), S( -1,-5), S( 4,-7) },
+   { S(-23, 3), S(-10, 2), S(  1,-1), S( 6, 3) },
+   { S(-11,-1), S(  8, 7), S(  9,11), S(12,-1) },
+   { S(-25, 6), S(-18, 4), S(-11, 6), S( 2, 2) }
   },
   { // Queen
-   { S( 0,-71), S(-4,-56), S(-3,-42), S(-1,-29) },
-   { S(-4,-56), S( 6,-30), S( 9,-21), S( 8, -5) },
-   { S(-2,-39), S( 6,-17), S( 9, -8), S( 9,  5) },
-   { S(-1,-29), S( 8, -5), S(10,  9), S( 7, 19) },
-   { S(-3,-27), S( 9, -5), S( 8, 10), S( 7, 21) },
-   { S(-2,-40), S( 6,-16), S( 8,-10), S(10,  3) },
-   { S(-2,-55), S( 7,-30), S( 7,-21), S( 6, -6) },
-   { S(-1,-74), S(-4,-55), S(-1,-43), S( 0,-30) }
+   { S(  3,-69), S(-5,-57), S(-5,-47), S( 4,-26) },
+   { S( -3,-55), S( 5,-31), S( 8,-22), S(12, -4) },
+   { S( -3,-39), S( 6,-18), S(13, -9), S( 7,  3) },
+   { S(  4,-23), S( 5, -3), S( 9, 13), S( 8, 24) },
+   { S(  0,-29), S(14, -6), S(12,  9), S( 5, 21) },
+   { S( -4,-38), S(10,-18), S( 6,-12), S( 8,  1) },
+   { S( -5,-50), S( 6,-27), S(10,-24), S( 8, -8) },
+   { S( -2,-75), S(-2,-52), S( 1,-43), S(-2,-36) }
   },
   { // King
    { S(272,  0), S(325, 41), S(273, 80), S(190, 93) },