1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Fix an issue with pawn ordering

A subtle one because at leat 3 leading pawns
are needed to uncover this bug.

Found by stuwph
This commit is contained in:
Marco Costalba 2016-05-10 17:50:51 +02:00
parent 2681419141
commit 72bb4695d1

View file

@ -690,7 +690,7 @@ uint64_t probe_table(const Position& pos, Entry* entry, WDLScore wdl = WDLDraw,
idx = Pawnidx[leadPawnsCnt - 1][23 - MapToEdges[squares[0]] / 2];
for (int i = 1; i < leadPawnsCnt; ++i)
idx += Binomial[i][MapToEdges[squares[i]]];
idx += Binomial[i][MapToEdges[squares[leadPawnsCnt- i]]];
next = leadPawnsCnt;
goto encode_remaining; // With pawns we have finished special treatments