Merge pull request 'SEE decides the capture bonus in the policy' (#11) from policy-see into main

SPRT https://bench.rektdie.com/test/5292/
Elo   | 222.16 +- 49.14 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 3.59 (-2.94, 2.94) [0.00, 10.00]
Games | N: 248 W: 178 L: 38 D: 32
Penta | [2, 4, 32, 24, 62]

Bench: 552832
This commit was merged in pull request #11.
This commit is contained in:
claude committed 2026-11-15 15:28:50 +01:00
commit 4f3c0ba2b3
1 file changed
+4 -1
+4 -1
View File
@@ -227,7 +227,10 @@ void policy(const Position& pos, const MoveList& moves, float temperature, const
const int type = piece_type(pos.piece_on(from)); const int type = piece_type(pos.piece_on(from));
float s = 0.0f; float s = 0.0f;
if (m.is_capture()) s += 1.0f + 0.004f * SEE_VALUE[victim_type(pos, m)] - 0.0015f * SEE_VALUE[type]; // Captures are tried early, unless the exchange on the square loses material.
if (m.is_capture())
s += (see_ge(pos, m, 0) ? 1.0f : -1.0f) + 0.004f * SEE_VALUE[victim_type(pos, m)] -
0.0015f * SEE_VALUE[type];
if (m.is_promotion()) s += m.promo_type() == QUEEN ? 2.5f : -2.5f; if (m.is_promotion()) s += m.promo_type() == QUEEN ? 2.5f : -2.5f;
if (m.is_castle()) s += 0.8f; if (m.is_castle()) s += 0.8f;