2 Stockfish, a UCI chess playing engine derived from Glaurung 2.1
3 Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
4 Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
6 Stockfish is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Stockfish is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #if !defined(PSQTAB_H_INCLUDED)
22 #define PSQTAB_H_INCLUDED
32 //// Values tuned by Joona Kiiski
35 static const int MgPST[][64] = { // [piece][square]
38 4, 5, 7, 8, 8, 7, 5, 4,
39 162, 183, 194, 204, 204, 194, 183, 162,
40 164, 185, 201, 227, 227, 201, 185, 164,
41 165, 186, 210, 247, 247, 210, 186, 165,
42 166, 187, 211, 229, 229, 211, 187, 166,
43 167, 188, 204, 209, 209, 204, 188, 167,
44 168, 189, 200, 210, 210, 200, 189, 168,
45 8, 9, 11, 12, 12, 11, 9, 8
48 675, 709, 742, 759, 759, 742, 709, 675,
49 721, 752, 785, 802, 802, 785, 752, 721,
50 765, 797, 827, 841, 841, 827, 797, 765,
51 794, 823, 853, 869, 869, 853, 823, 794,
52 808, 834, 865, 881, 881, 865, 834, 808,
53 807, 833, 864, 879, 879, 864, 833, 807,
54 764, 794, 823, 837, 837, 823, 794, 764,
55 624, 752, 783, 799, 799, 783, 752, 624
58 795, 792, 796, 800, 800, 796, 792, 795,
59 824, 845, 841, 844, 844, 841, 845, 824,
60 830, 841, 855, 848, 848, 855, 841, 830,
61 835, 844, 848, 867, 867, 848, 844, 835,
62 834, 843, 847, 866, 866, 847, 843, 834,
63 827, 838, 852, 845, 845, 852, 838, 827,
64 821, 841, 837, 840, 840, 837, 841, 821,
65 821, 820, 824, 830, 830, 824, 820, 821
68 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
69 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
70 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
71 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
72 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
73 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
74 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258,
75 1258, 1263, 1268, 1272, 1272, 1268, 1263, 1258
78 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
79 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
80 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
81 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
82 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
83 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
84 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529,
85 2529, 2529, 2529, 2529, 2529, 2529, 2529, 2529
88 287, 311, 262, 214, 214, 262, 311, 287,
89 262, 287, 238, 190, 190, 238, 287, 262,
90 214, 238, 190, 142, 142, 190, 238, 214,
91 190, 214, 167, 119, 119, 167, 214, 190,
92 167, 190, 142, 94, 94, 142, 190, 167,
93 142, 167, 119, 69, 69, 119, 167, 142,
94 119, 142, 94, 46, 46, 94, 142, 119,
95 94, 119, 69, 21, 21, 69, 119, 94
99 static const int EgPST[][64] = { // [piece][square]
102 2, 0, -2, -4, -4, -2, 0, 2,
103 253, 251, 249, 247, 247, 249, 251, 253,
104 253, 251, 249, 247, 247, 249, 251, 253,
105 253, 251, 249, 247, 247, 249, 251, 253,
106 254, 252, 250, 248, 248, 250, 252, 254,
107 254, 252, 250, 248, 248, 250, 252, 254,
108 254, 252, 250, 248, 248, 250, 252, 254,
109 4, 2, 0, -2, -2, 0, 2, 4
112 741, 765, 791, 806, 806, 791, 765, 741,
113 766, 790, 818, 834, 834, 818, 790, 766,
114 790, 816, 844, 858, 858, 844, 816, 790,
115 803, 830, 855, 873, 873, 855, 830, 803,
116 803, 830, 855, 873, 873, 855, 830, 803,
117 790, 816, 844, 858, 858, 844, 816, 790,
118 766, 790, 818, 834, 834, 818, 790, 766,
119 741, 765, 791, 806, 806, 791, 765, 741
122 798, 816, 826, 836, 836, 826, 816, 798,
123 814, 831, 841, 849, 849, 841, 831, 814,
124 820, 838, 847, 856, 856, 847, 838, 820,
125 829, 845, 855, 865, 865, 855, 845, 829,
126 830, 846, 856, 866, 866, 856, 846, 830,
127 821, 840, 850, 859, 859, 850, 840, 821,
128 815, 833, 844, 853, 853, 844, 833, 815,
129 798, 817, 828, 839, 839, 828, 817, 798
132 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
133 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
134 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
135 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
136 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
137 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
138 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281,
139 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281
142 2478, 2504, 2516, 2528, 2528, 2516, 2504, 2478,
143 2504, 2528, 2540, 2552, 2552, 2540, 2528, 2504,
144 2516, 2540, 2552, 2564, 2564, 2552, 2540, 2516,
145 2528, 2552, 2564, 2576, 2576, 2564, 2552, 2528,
146 2528, 2552, 2564, 2576, 2576, 2564, 2552, 2528,
147 2516, 2540, 2552, 2564, 2564, 2552, 2540, 2516,
148 2504, 2528, 2540, 2552, 2552, 2540, 2528, 2504,
149 2478, 2504, 2516, 2528, 2528, 2516, 2504, 2478
152 18, 77, 105, 135, 135, 105, 77, 18,
153 77, 135, 165, 193, 193, 165, 135, 77,
154 105, 165, 193, 222, 222, 193, 165, 105,
155 135, 193, 222, 251, 251, 222, 193, 135,
156 135, 193, 222, 251, 251, 222, 193, 135,
157 105, 165, 193, 222, 222, 193, 165, 105,
158 77, 135, 165, 193, 193, 165, 135, 77,
159 18, 77, 105, 135, 135, 105, 77, 18
163 #endif // !defined(PSQTAB_H_INCLUDED)