diff --git a/NineChess/src/ninechessai_ab.cpp b/NineChess/src/ninechessai_ab.cpp index 5c554590..62624997 100644 --- a/NineChess/src/ninechessai_ab.cpp +++ b/NineChess/src/ninechessai_ab.cpp @@ -437,6 +437,59 @@ void NineChessAi_ab::setChess(const NineChess &chess) #endif } +// 评估子力 +#ifdef EVALUATE_ENABLE + +#ifdef EVALUATE_MATERIAL +int NineChessAi_ab::evaluateMaterial(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_SPACE +int NineChessAi_ab::evaluateSpace(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_MOBILITY +int NineChessAi_ab::evaluateMobility(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_TEMPO +int NineChessAi_ab::evaluateTempo(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_THREAT +int NineChessAi_ab::evaluateThreat(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_SHAPE +int NineChessAi_ab::evaluateShape(Node *node) +{ + return 0; +} +#endif + +#ifdef EVALUATE_MOTIF +int NineChessAi_ab::evaluateMotif(Node *node) +{ + return 0; +} +#endif +#endif /* EVALUATE_ENABLE */ + int NineChessAi_ab::evaluate(Node *node) { // 初始评估值为0,对先手有利则增大,对后手有利则减小 diff --git a/NineChess/src/ninechessai_ab.h b/NineChess/src/ninechessai_ab.h index adcae781..6febe7fc 100644 --- a/NineChess/src/ninechessai_ab.h +++ b/NineChess/src/ninechessai_ab.h @@ -169,6 +169,29 @@ protected: // 评价函数 int evaluate(Node *node); +#ifdef EVALUATE_ENABLE +#ifdef EVALUATE_MATERIAL + int evaluateMaterial(Node *node); +#endif +#ifdef EVALUATE_SPACE + int evaluateSpace(Node *node); +#endif +#ifdef EVALUATE_MOBILITY + int evaluateMobility(Node *node); +#endif +#ifdef EVALUATE_TEMPO + int evaluateTempo(Node *node); +#endif +#ifdef EVALUATE_THREAT + int evaluateThreat(Node *node); +#endif +#ifdef EVALUATE_SHAPE + int evaluateShape(Node *node); +#endif +#ifdef EVALUATE_MOTIF + int evaluateMotif(Node *node); +#endif +#endif /* EVALUATE_ENABLE */ // Alpha-Beta剪枝算法 int alphaBetaPruning(int depth, int alpha, int beta, Node *node);