@@ -122,37 +122,8 @@ void update_all_stats(const Position& pos,
122122 int captureCount,
123123 Depth depth);
124124
125- // Utility to verify move generation. All the leaf nodes up
126- // to the given depth are generated and counted, and the sum is returned.
127- template <bool Root>
128- uint64_t perft (Position& pos, Depth depth) {
129-
130- StateInfo st;
131- ASSERT_ALIGNED (&st, Eval::NNUE::CacheLineSize);
132-
133- uint64_t cnt, nodes = 0 ;
134- const bool leaf = (depth == 2 );
135-
136- for (const auto & m : MoveList<LEGAL>(pos))
137- {
138- if (Root && depth <= 1 )
139- cnt = 1 , nodes++;
140- else
141- {
142- pos.do_move (m, st);
143- cnt = leaf ? MoveList<LEGAL>(pos).size () : perft<false >(pos, depth - 1 );
144- nodes += cnt;
145- pos.undo_move (m);
146- }
147- if (Root)
148- sync_cout << UCI::move (m, pos.is_chess960 ()) << " : " << cnt << sync_endl;
149- }
150- return nodes;
151- }
152-
153125} // namespace
154126
155-
156127Search::Worker::Worker (SharedState& sharedState,
157128 std::unique_ptr<ISearchManager> sm,
158129 size_t thread_id) :
@@ -173,13 +144,6 @@ void Search::Worker::start_searching() {
173144 return ;
174145 }
175146
176- if (limits.perft )
177- {
178- nodes = perft<true >(rootPos, limits.perft );
179- sync_cout << " \n Nodes searched: " << nodes << " \n " << sync_endl;
180- return ;
181- }
182-
183147 main_manager ()->tm .init (limits, rootPos.side_to_move (), rootPos.game_ply (), options);
184148 tt.new_search ();
185149
@@ -1035,10 +999,9 @@ Value Search::Worker::search(
1035999 if (lmrDepth < 6 && history < -4195 * depth)
10361000 continue ;
10371001
1038- history += 69 * thisThread->mainHistory [us][move.from_to ()] / 32 ;
1002+ history += 2 * thisThread->mainHistory [us][move.from_to ()];
10391003
10401004 lmrDepth += history / 6992 ;
1041- lmrDepth = std::max (lmrDepth, -1 );
10421005
10431006 // Futility pruning: parent node (~13 Elo)
10441007 if (!ss->inCheck && lmrDepth < 15
@@ -1070,7 +1033,7 @@ Value Search::Worker::search(
10701033 // so changing them requires tests at these types of time controls.
10711034 // Recursive singular search is avoided.
10721035 if (!rootNode && move == ttMove && !excludedMove
1073- && depth >= 4 - (thisThread->completedDepth > 31 ) + 2 * (PvNode && tte-> is_pv ())
1036+ && depth >= 4 - (thisThread->completedDepth > 31 ) + ss-> ttPv
10741037 && std::abs (ttValue) < VALUE_TB_WIN_IN_MAX_PLY && (tte->bound () & BOUND_LOWER)
10751038 && tte->depth () >= depth - 3 )
10761039 {
@@ -1088,7 +1051,7 @@ Value Search::Worker::search(
10881051 singularQuietLMR = !ttCapture;
10891052
10901053 // Avoid search explosion by limiting the number of double extensions
1091- if (!PvNode && value < singularBeta - 16 && ss->doubleExtensions <= 12 )
1054+ if (!PvNode && value < singularBeta - 2 && ss->doubleExtensions <= 12 )
10921055 {
10931056 extension = 2 ;
10941057 depth += depth < 15 ;
0 commit comments