src/eval.cpp
Centipawns_t eval_bishop(const Board &board, EvaluationState &es, bool verbose) {
        Bitboard w = board.piece_bb(W_BISHOP);
        Bitboard b = board.piece_bb(B_BISHOP);
        Centipawns_t ret{0};

#ifndef NDEBUG
        Centipawns_t w_b_pst{0};
        Centipawns_t b_b_pst{0};
#endif // NDEBUG


        /// Piece Square Tables --> Positioning
#ifndef NDEBUG
        w_b_pst = dot_product(w, &BISHOP_PST[0]);
        b_b_pst = -dot_product(flip_flop(b), &BISHOP_PST[0]);
#endif // NDEBUG
        ret += dot_product(w, &BISHOP_PST[0]);
        ret -= dot_product(flip_flop(b), &BISHOP_PST[0]);

#ifndef NDEBUG
        if (verbose) {
            es.printer.add("White Bishop PST", w_b_pst);
            es.printer.add("Black Bishop PST", b_b_pst);
        }
#endif // NDEBUG

        return ret;
    }
/**
     * computes the bishop differential in centipawns given a certain position
     * @param board instance of a Board object being scrutinized
     * @param es    instance of a EvaluationState object informing how to score
     * @return      the bishop score differential in centipawns
     */
computes the bishop differential in centipawns given a certain position
@param board instance of a Board object being scrutinized
@param es    instance of a EvaluationState object informing how to score
@return      the bishop score differential in centipawns
computes the bishop differential in centipawns given a certain position @param board instance of a Board object being scrutinized @param es instance of a EvaluationState object informing how to score @return the bishop score differential in centipawns
Centipawns_t eval_bishop(const Board &board, EvaluationState &es, bool verbose) {
        Bitboard w = board.piece_bb(W_BISHOP);
        Bitboard b = board.piece_bb(B_BISHOP);
        Centipawns_t ret{0};
#ifndef NDEBUG
        Centipawns_t w_b_pst{0};
        Centipawns_t b_b_pst{0};
#endif 
#ifndef NDEBUG
        w_b_pst = dot_product(w, &BISHOP_PST[0]);
        b_b_pst = -dot_product(flip_flop(b), &BISHOP_PST[0]);
#endif 
        ret += dot_product(w, &BISHOP_PST[0]);
        ret -= dot_product(flip_flop(b), &BISHOP_PST[0]);
#ifndef NDEBUG
        if (verbose) {
            es.printer.add("White Bishop PST", w_b_pst);
            es.printer.add("Black Bishop PST", b_b_pst);
        }
#endif 
        return ret;
    }
Centipawns_t eval_bishop ( const Board & board , EvaluationState & es , bool verbose ) { Bitboard w = board . piece_bb ( W_BISHOP ) ; Bitboard b = board . piece_bb ( B_BISHOP ) ; Centipawns_t ret { 0 } ; #ifndef NDEBUG Centipawns_t w_b_pst { 0 } ; Centipawns_t b_b_pst { 0 } ; #endif #ifndef NDEBUG w_b_pst = dot_product ( w , & BISHOP_PST [ 0 ] ) ; b_b_pst = - dot_product ( flip_flop ( b ) , & BISHOP_PST [ 0 ] ) ; #endif ret += dot_product ( w , & BISHOP_PST [ 0 ] ) ; ret -= dot_product ( flip_flop ( b ) , & BISHOP_PST [ 0 ] ) ; #ifndef NDEBUG if ( verbose ) { es . printer . add ( " " , w_b_pst ) ; es . printer . add ( " " , b_b_pst ) ; } #endif return ret ; }
computes the bishop differential in centipawns given a certain position
 @param board instance of a Board object being scrutinized
 @param es    instance of a EvaluationState object informing how to score
 @return      the bishop score differential in centipawns
computes the bishop differential in centipawns given a certain position @param board instance of a Board object being scrutinized @param es instance of a EvaluationState object informing how to score @return the bishop score differential in centipawns
// NDEBUG /// Piece Square Tables --> Positioning // NDEBUG // NDEBUG