src/eval.cpp
void def_stage(const Board& board, EvaluationState& es) {
        auto m = material(board, es, WHITE, false) + material(board, es, BLACK, false);

        if (m > 6600) {
            es.stage = OPENING;
        } else if (m > 4000) {
            es.stage = MID_GAME;
        } else if (m > 2000) {
            es.stage = EARLY_END_GAME;
        } else {
            es.stage = LATE_END_GAME;
        }
    }
/**
     * defines the stage that we're in based on the current position
     * @param board instance of a Board object being scrutinized
     * @param es    instance of an EvaluationState object to be updated
     */
defines the stage that we're in based on the current position
@param board instance of a Board object being scrutinized
@param es    instance of an EvaluationState object to be updated
defines the stage that we ' re in based on the current position @param board instance of a Board object being scrutinized @param es instance of an EvaluationState object to be updated
void def_stage(const Board& board, EvaluationState& es) {
        auto m = material(board, es, WHITE, false) + material(board, es, BLACK, false);
        if (m > 6600) {
            es.stage = OPENING;
        } else if (m > 4000) {
            es.stage = MID_GAME;
        } else if (m > 2000) {
            es.stage = EARLY_END_GAME;
        } else {
            es.stage = LATE_END_GAME;
        }
    }
void def_stage ( const Board & board , EvaluationState & es ) { auto m = material ( board , es , WHITE , false ) + material ( board , es , BLACK , false ) ; if ( m > 6600 ) { es . stage = OPENING ; } else if ( m > 4000 ) { es . stage = MID_GAME ; } else if ( m > 2000 ) { es . stage = EARLY_END_GAME ; } else { es . stage = LATE_END_GAME ; } }
defines the stage that we're in based on the current position
 @param board instance of a Board object being scrutinized
 @param es    instance of an EvaluationState object to be updated
defines the stage that we ' re in based on the current position @param board instance of a Board object being scrutinized @param es instance of an EvaluationState object to be updated