Closed dlbbld closed 2 years ago
After a comparison (now that we have test-vectors and benchmarks), it seems both versions give very similar results. The PDF one seems to behave slightly better on exotic positions and slightly worse (really not much) on Lichess game positions. Consequently, I lean towards using the PDF version and I made the C++ version mimic the PDF description in commit 8f0f259f013a72319c83de2439571eddf6adf0dd.
For the score calculation the specification uses early return (page 22):
The code uses fall-through:
This results in different variation calculations. For example for a pawn non-promotion capturing move, the PDF will return
REWARD
.The code first assigns
REWARD
, but then falls through and assignsPUNISH
in the last step.What is now the better way to go, the PDF or the code?