Skip to content

Commit db7f188

Browse files
committed
Gemini input feature 2
1 parent e7e7ea3 commit db7f188

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/nnue/features/half_ka_v2_hm.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,22 @@ class HalfKAv2_hm {
120120
for (uint8_t knight = 0; knight <= 2; ++knight)
121121
for (uint8_t cannon = 0; cannon <= 2; ++cannon)
122122
v[rook][knight][cannon] = [&] {
123-
if (rook != 0)
124-
if (knight > 0 && cannon > 0)
125-
return 0;
126-
else if (rook == 2 || knight + cannon > 1)
123+
if (cannon == 2) // 桶0: 双炮威胁
124+
return 0;
125+
if (cannon == 1) {
126+
if (rook > 0) // 桶1: 车炮组合
127127
return 1;
128-
else
128+
if (knight > 0) // 桶2: 马炮组合
129129
return 2;
130-
else if (knight > 0 && cannon > 0)
130+
}
131+
// 以下是无炮或只有单炮但无配合的情况
132+
if (rook == 2) // 桶3: 双车威力
131133
return 3;
132-
else if (knight + cannon > 1)
134+
if (rook == 1 && knight > 0) // 桶4: 车马组合
133135
return 4;
134-
else
135-
return 5;
136+
137+
// 桶5: 其他所有残子局面
138+
return 5;
136139
}();
137140
return v;
138141
}();

0 commit comments

Comments
 (0)