Refactor: Simplify pawn structure indexing

Refactoring the mechanism for calculating pawn structure hash indices and make it consistent with the rest.

closes https://github.com/official-stockfish/Stockfish/pull/6205

No functional change
This commit is contained in:
FauziAkram
2025-08-04 14:56:03 +02:00
committed by Joost VandeVondele
parent a6e34f128f
commit 8e733d68fd
3 changed files with 14 additions and 18 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ ExtMove* MovePicker::score(MoveList<Type>& ml) {
{
// histories
m.value = 2 * (*mainHistory)[us][m.from_to()];
m.value += 2 * (*pawnHistory)[pawn_structure_index(pos)][pc][to];
m.value += 2 * (*pawnHistory)[pawn_history_index(pos)][pc][to];
m.value += (*continuationHistory[0])[pc][to];
m.value += (*continuationHistory[1])[pc][to];
m.value += (*continuationHistory[2])[pc][to];