The null table was not explicitly initialized, and was contaminated by
earlier initialization with another board size.
\r
// piece-square tables\r
for(i=0; i<BH; i++) for(j=0; j<BH; j++) {\r
- int s = BW*i + j, d = BH*(BH-2) - (2*i - BH + 1)*(2*i - BH + 1) - (2*j - BH + 1)*(2*j - BH + 1);\r
+ int s = BW*i + j, d = BH*(BH-2) - abs(2*i - BH + 1)*(BH-1) - (2*j - BH + 1)*(2*j - BH + 1);\r
+ PST[s] = 0;\r
PST[BH+s] = d/4 - (i == 0 || i == BH-1 ? 15 : 0) - (j == 0 || j == BH-1 ? 15 : 0);\r
PST[BH*BW+s] = d/6;\r
PST[BH*BW+BH+s] = d/12;\r