No functional change for standard chess.
Shatranj STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 82 W: 63 L: 1 D: 18
score += bonus + PassedFile[file_of(s)];
}
+ // Scale by maximum promotion piece value
+ Value maxMg = VALUE_ZERO, maxEg = VALUE_ZERO;
+ for (PieceType pt : pos.promotion_piece_types())
+ {
+ maxMg = std::max(maxMg, PieceValue[MG][pt]);
+ maxEg = std::max(maxEg, PieceValue[EG][pt]);
+ }
+ score = make_score(mg_value(score) * int(maxMg) / QueenValueMg,
+ eg_value(score) * int(maxEg) / QueenValueEg);
+
if (T)
Trace::add(PASSED, Us, score);
File max_file() const;
const std::string piece_to_char() const;
Rank promotion_rank() const;
- std::vector<PieceType> promotion_piece_types() const;
+ const std::vector<PieceType>& promotion_piece_types() const;
bool double_step_enabled() const;
bool castling_enabled() const;
bool checking_permitted() const;
return var->promotionRank;
}
-inline std::vector<PieceType> Position::promotion_piece_types() const {
+inline const std::vector<PieceType>& Position::promotion_piece_types() const {
assert(var != nullptr);
return var->promotionPieceTypes;
}