X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=204e5fc8b7440cf941c893fe3a4deafc68285d3c;hp=3f5be1a38efe7fb8f823fcf2bda610aa211f64b7;hb=e40b06a0503b44bae5508a371d961914828214b6;hpb=6b909b2343190f2989d21c8f69f40e9f09c530c0 diff --git a/src/search.cpp b/src/search.cpp index 3f5be1a3..204e5fc8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -92,7 +92,7 @@ namespace { int BestMoveChanges; int SkillLevel; bool SkillLevelEnabled, Chess960; - Value DrawValue[2]; + Value DrawValue[COLOR_NB]; History H; template @@ -802,7 +802,7 @@ split_point_start: // At split points actual search starts from here && type_of(pos.piece_on(to_sq(move))) != PAWN && type_of(move) == NORMAL && ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK) - - PieceValue[Mg][pos.piece_on(to_sq(move))] == VALUE_ZERO)); + - PieceValue[MG][pos.piece_on(to_sq(move))] == VALUE_ZERO)); // Step 12. Extend checks and, in PV nodes, also dangerous moves if (PvNode && dangerous) @@ -1184,7 +1184,7 @@ split_point_start: // At split points actual search starts from here && !pos.is_passed_pawn_push(move)) { futilityValue = futilityBase - + PieceValue[Eg][pos.piece_on(to_sq(move))] + + PieceValue[EG][pos.piece_on(to_sq(move))] + (type_of(move) == ENPASSANT ? PawnValueEg : VALUE_ZERO); if (futilityValue < beta) @@ -1315,7 +1315,7 @@ split_point_start: // At split points actual search starts from here while (b) { // Note that here we generate illegal "double move"! - if (futilityBase + PieceValue[Eg][pos.piece_on(pop_lsb(&b))] >= beta) + if (futilityBase + PieceValue[EG][pos.piece_on(pop_lsb(&b))] >= beta) return true; } @@ -1420,7 +1420,7 @@ split_point_start: // At split points actual search starts from here // Case 2: If the threatened piece has value less than or equal to the // value of the threatening piece, don't prune moves which defend it. if ( pos.is_capture(threat) - && ( PieceValue[Mg][pos.piece_on(tfrom)] >= PieceValue[Mg][pos.piece_on(tto)] + && ( PieceValue[MG][pos.piece_on(tfrom)] >= PieceValue[MG][pos.piece_on(tto)] || type_of(pos.piece_on(tfrom)) == KING) && pos.move_attacks_square(m, tto)) return true;