Skip to content

Full Depth Threads

amchess edited this page Mar 5, 2026 · 1 revision

Full Depth Threads: Brute Force Precision

Modern chess engines like Stockfish owe their immense strength to aggressive pruning heuristics (LMR, Null Move Pruning, Razoring). These techniques allow the engine to ignore 99% of the search tree to focus on the most promising lines.

However, in extremely tactical positions or complex fortresses, these heuristics can sometimes discard the winning move because it looks bad at first glance (the "Horizon Effect").

ShashChess introduces the Full Depth Threads feature: a configurable mechanism that effectively creates a "Brute Force" component within the engine, ensuring that deep, complex truths are not missed due to over-optimization.


1. Technical Implementation

The feature functions by modifying the behavior of specific Worker threads, turning them into "truth-seekers" that refuse to take shortcuts.

Thread Configuration

The engine allows the user to specify how many threads should operate in this mode via the UCI option Full depth threads.

  • Logic: Threads are assigned from the end of the thread list.
  • Example: If you use 8 threads and set Full depth threads = 2, threads #6 and #7 will use Brute Force logic, while #0-#5 will use standard pruning.
// from thread.cpp
void ThreadPool::setFull(size_t requested) {
    int thisidx   = 0;
    int startfull = size() - requested;
    for (auto&& th : *this)
        th->worker->fullSearch = thisidx++ >= startfull;
}

Pruning Bypass

Inside the main search loop, the fullSearch flag acts as a master key to bypass standard reduction logic, specifically Late Move Reductions (LMR).

Normally, moves that are late in the move list are searched with reduced depth. Full Depth threads disable this for any move that isn't clearly a blunder.

// from search.cpp
bool doLMRStep = !fullSearch; // If FullSearch is active, LMR is disabled

if (depth >= 2 && moveCount > std::max(sibs, 1) && doLMRStep) {
    // Perform Standard LMR (Skipped by Full Depth Threads)
}

2. Usage and Strategic Value

This feature transforms ShashChess into a Hybrid Analyzer. It combines the massive depth of modern pruning algorithms with the reliability of classical brute force.

🛡️ The "Safety Net" for Correspondence When analyzing a critical position for days, the risk of missing a move due to pruning outweighs the cost of slower search speed. Allocating 1-2 threads to Full Depth ensures that if the main threads prune a winning sacrifice, the brute force threads will eventually find it.

⚔️ Tactical Sacrifices In positions where a piece sacrifice leads to a mate in 15 moves, standard LMR might prune the sacrifice because the static evaluation drops immediately. Full Depth threads will see through the material deficit.

🏰 Fortress Breaking In blocked positions, standard engines often prune non-progressing moves. Full Depth threads are more patient, potentially finding the subtle maneuver that breaks the fortress.

3. Performance & Recommendations

⚠️ Warning: Full Depth threads are significantly slower (lower Nodes Per Second) because they search much larger trees.

Do NOT set all threads to Full Depth for regular play. The engine will lose too much playing strength (Elo) due to lack of depth.

Recommendation: A balanced ratio is ideal. For example, 2 Full Depth threads out of 16 total threads.

Clone this wiki locally