@@ -638,12 +638,6 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
638
638
uint16_t oppo5 = board.p4Count (oppo, A_FIVE); // opponent five
639
639
uint16_t oppo4 = oppo5 + board.p4Count (oppo, B_FLEX4); // opponent straight four and five
640
640
641
- // Dive into vcf search when the depth reaches zero (~17 elo)
642
- if (depth <= 0 .0f ) {
643
- return oppo5 ? vcfdefend<Rule, NT>(board, ss, alpha, beta)
644
- : vcfsearch<Rule, NT>(board, ss, alpha, beta);
645
- }
646
-
647
641
int moveCount = 0 , nonMatedCount = 0 ;
648
642
Value bestValue = -VALUE_INFINITE, maxValue = VALUE_INFINITE, value;
649
643
Pos bestMove = Pos::NONE;
@@ -794,11 +788,7 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
794
788
Value eval = VALUE_NONE;
795
789
int improvement = 0 ; // Static eval change in the last two ply
796
790
797
- // Reset killer of grand-children
798
- (ss + 2 )->killers [0 ] = Pos::NONE;
799
- (ss + 2 )->killers [1 ] = Pos::NONE;
800
-
801
- if (oppo4) {
791
+ if (oppo4 && depth > 0 .0f ) {
802
792
// Use static evaluation from previous ply if opponent makes a four/five attack
803
793
ss->staticEval = -(ss - 1 )->staticEval ;
804
794
@@ -833,8 +823,16 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
833
823
}
834
824
835
825
improvement = ss->staticEval - (ss - 2 )->staticEval ;
826
+
827
+ // Return static eval when the depth reaches zero
828
+ if (depth <= 0 .0f )
829
+ return ss->staticEval ;
836
830
}
837
831
832
+ // Reset killer of grand-children
833
+ (ss + 2 )->killers [0 ] = Pos::NONE;
834
+ (ss + 2 )->killers [1 ] = Pos::NONE;
835
+
838
836
// Step 7. Razoring with VCF (~68 elo)
839
837
if (!PvNode
840
838
&& (alpha < VALUE_MATE_IN_MAX_PLY || !ttHit) // We are not searching for a short win
0 commit comments