File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1089,9 +1089,9 @@ Value do_evaluate(const Position& pos, Value& margin) {
10891089 assert (eg_value (v) > -VALUE_INFINITE && eg_value (v) < VALUE_INFINITE);
10901090 assert (ph >= PHASE_ENDGAME && ph <= PHASE_MIDGAME);
10911091
1092- int ev = (eg_value (v) * int (sf)) / SCALE_FACTOR_NORMAL;
1093- int result = (mg_value (v) * int (ph) + ev * int (128 - ph)) / 128 ;
1094- return Value ((result / GrainSize) * GrainSize); // Sign independent
1092+ int e = (eg_value (v) * int (sf)) / SCALE_FACTOR_NORMAL;
1093+ int r = (mg_value (v) * int (ph) + e * int (PHASE_MIDGAME - ph)) / PHASE_MIDGAME ;
1094+ return Value ((r / GrainSize) * GrainSize); // Sign independent
10951095 }
10961096
10971097 // apply_weight() weights score v by score w trying to prevent overflow
You can’t perform that action at this time.
0 commit comments