Line data Source code
1 : #include "score.hpp"
2 :
3 : #include "dynamicConfig.hpp"
4 : #include "evalConfig.hpp"
5 : #include "position.hpp"
6 :
7 : #pragma GCC diagnostic push
8 : #pragma GCC diagnostic ignored "-Wconversion"
9 :
10 3715484 : EvalScore EvalFeatures::SumUp() const {
11 3715484 : EvalScore score = scores[F_material] + scores[F_positional] + scores[F_development] + scores[F_mobility] + scores[F_pawnStruct] + scores[F_attack];
12 3715484 : score += scores[F_complexity] * sgn(score[MG]);
13 3715484 : return score;
14 : }
15 :
16 : #pragma GCC diagnostic pop
17 :
18 1 : void EvalFeatures::callBack() {
19 : DynamicConfig::stylized = false;
20 1 : DynamicConfig::stylized |= DynamicConfig::styleComplexity != 50;
21 1 : DynamicConfig::stylized |= DynamicConfig::styleMaterial != 50;
22 1 : DynamicConfig::stylized |= DynamicConfig::stylePositional != 50;
23 1 : DynamicConfig::stylized |= DynamicConfig::styleDevelopment != 50;
24 1 : DynamicConfig::stylized |= DynamicConfig::styleMobility != 50;
25 1 : DynamicConfig::stylized |= DynamicConfig::styleAttack != 50;
26 1 : DynamicConfig::stylized |= DynamicConfig::stylePawnStruct != 50;
27 1 : DynamicConfig::stylized |= DynamicConfig::styleForwardness != 50;
28 1 : }
29 :
30 1 : void displayEval(const EvalData& data, const EvalFeatures& features) {
31 1 : Logging::LogIt(Logging::logInfo) << "Game phase " << data.gp;
32 1 : Logging::LogIt(Logging::logInfo) << "ScalingFactor " << features.scalingFactor;
33 1 : Logging::LogIt(Logging::logInfo) << "Material " << features.scores[F_material];
34 1 : Logging::LogIt(Logging::logInfo) << "Positional " << features.scores[F_positional];
35 1 : Logging::LogIt(Logging::logInfo) << "Development " << features.scores[F_development];
36 1 : Logging::LogIt(Logging::logInfo) << "Mobility " << features.scores[F_mobility];
37 1 : Logging::LogIt(Logging::logInfo) << "Pawn " << features.scores[F_pawnStruct];
38 1 : Logging::LogIt(Logging::logInfo) << "Attack " << features.scores[F_attack];
39 1 : Logging::LogIt(Logging::logInfo) << "Complexity " << features.scores[F_complexity];
40 1 : }
|