Skip to content

Commit b9aa720

Browse files
committed
remove vcf search
test f15
1 parent ed79856 commit b9aa720

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

Rapfi/search/ab/search.cpp

+9-11
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,6 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
638638
uint16_t oppo5 = board.p4Count(oppo, A_FIVE); // opponent five
639639
uint16_t oppo4 = oppo5 + board.p4Count(oppo, B_FLEX4); // opponent straight four and five
640640

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-
647641
int moveCount = 0, nonMatedCount = 0;
648642
Value bestValue = -VALUE_INFINITE, maxValue = VALUE_INFINITE, value;
649643
Pos bestMove = Pos::NONE;
@@ -794,11 +788,7 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
794788
Value eval = VALUE_NONE;
795789
int improvement = 0; // Static eval change in the last two ply
796790

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) {
802792
// Use static evaluation from previous ply if opponent makes a four/five attack
803793
ss->staticEval = -(ss - 1)->staticEval;
804794

@@ -833,8 +823,16 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
833823
}
834824

835825
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;
836830
}
837831

832+
// Reset killer of grand-children
833+
(ss + 2)->killers[0] = Pos::NONE;
834+
(ss + 2)->killers[1] = Pos::NONE;
835+
838836
// Step 7. Razoring with VCF (~68 elo)
839837
if (!PvNode
840838
&& (alpha < VALUE_MATE_IN_MAX_PLY || !ttHit) // We are not searching for a short win

0 commit comments

Comments
 (0)