|
io-chess
UCI chess engine
|
Thread-safe shared state for search coordination and Lazy SMP. More...
#include <ISearch.h>

Classes | |
| struct | SearchConfig |
| Runtime tunable parameters for the search algorithm. More... | |
| struct | VizNode |
| Represents a single node in the search tree for export and visualization. More... | |
Public Types | |
| enum class | PruneReason : uint8_t { NONE = 0 , LMP , FUTILITY , SEE , DRAW , RAZOR , REVERSE_FUTILITY , NULL_MOVE , INTERNAL , LAZY_EVAL , TB_CUTOFF , TT_CUTOFF , BETA_CUTOFF , DEPTH_LIMIT , SINGULAR_SKIP } |
| Enumeration of reasons why a node might be pruned (used for tree visualization). More... | |
Public Attributes | |
| std::atomic< bool > | stop {false} |
| Global flag to immediately stop all search threads. | |
| std::atomic< bool > | disableTablebase {false} |
| Disables tablebase probing (e.g., when Syzygy coverage is incomplete). | |
| std::atomic< uint64_t > | totalNodes {0} |
| Global node count across all threads. | |
| std::atomic< int > | selDepth {0} |
| Maximum selective depth reached by any thread. | |
| std::atomic< uint64_t > | tbHits {0} |
| Total tablebase hits across all threads. | |
| std::atomic< uint64_t > | ttHits {0} |
| Total transposition table hits across all threads. | |
| std::atomic< int > | mainThreadScore {0} |
| Main thread's current score (used by helpers for aspiration windows). | |
| std::atomic< int > | mainThreadDepth {0} |
| Main thread's completed depth (used by helpers for early termination). | |
| std::atomic< int > | targetDepth {0} |
| Target search depth (set by main thread at search start). | |
| int | numThreads {1} |
| Total number of active search threads. | |
| std::atomic< int64_t > | startTimeNs {0} |
| Search start time in steady_clock nanoseconds (atomic for ponderhit updates). | |
| int64_t | softLimit = 0 |
| Soft time limit in milliseconds. | |
| int64_t | hardLimit = 0 |
| Hard time limit in milliseconds. | |
| struct SearchSharedData::SearchConfig | config |
| int | lazyEvalMaxDepth = 6 |
| Maximum depth to apply lazy evaluation. | |
| int | lazyEvalBaseMargin = 350 |
| Base margin for lazy evaluation (approx 1 Sigma of residual error). | |
| int | lazyEvalDepthMargin = 60 |
| Depth multiplier margin for lazy evaluation. | |
| int | lazyEvalMinMargin = 200 |
| Absolute minimum margin for lazy evaluation. | |
| bool | enableLazyEval = false |
| Flag to enable or disable lazy evaluation. | |
| std::vector< VizNode > | vizTree |
| Stores edges for top layers of the search tree. | |
| bool | exportTree = false |
| Flag to enable tree export visualization. | |
| int | exportTreeDepth = 4 |
| Maximum depth to record nodes for tree visualization. | |
Thread-safe shared state for search coordination and Lazy SMP.
This struct holds the atomic variables used to coordinate multiple search threads, manage time limits, and collect statistics across the entire engine.
|
strong |
Enumeration of reasons why a node might be pruned (used for tree visualization).
| Enumerator | |
|---|---|
| NONE | Not pruned - fully searched. |
| LMP | Late Move Pruning. |
| FUTILITY | Futility Pruning. |
| SEE | Static Exchange Evaluation pruning. |
| DRAW | Draw by repetition or 50-move rule. |
| RAZOR | Razoring (drop to qsearch). |
| REVERSE_FUTILITY | Reverse Futility / Static Null Move. |
| NULL_MOVE | Null Move Pruning cutoff. |
| INTERNAL | Internal Node Pruning (Eval Margin). |
| LAZY_EVAL | Lazy Eval skip (fast score sufficient). |
| TB_CUTOFF | Tablebase cutoff. |
| TT_CUTOFF | Transposition table cutoff. |
| BETA_CUTOFF | Normal beta cutoff. |
| DEPTH_LIMIT | Beyond exportTreeDepth and not PV. |
| SINGULAR_SKIP | Skipped during singular extension search. |
| struct SearchSharedData::SearchConfig SearchSharedData::config |
| std::atomic<bool> SearchSharedData::disableTablebase {false} |
Disables tablebase probing (e.g., when Syzygy coverage is incomplete).
| bool SearchSharedData::enableLazyEval = false |
Flag to enable or disable lazy evaluation.
| bool SearchSharedData::exportTree = false |
Flag to enable tree export visualization.
| int SearchSharedData::exportTreeDepth = 4 |
Maximum depth to record nodes for tree visualization.
| int64_t SearchSharedData::hardLimit = 0 |
Hard time limit in milliseconds.
| int SearchSharedData::lazyEvalBaseMargin = 350 |
Base margin for lazy evaluation (approx 1 Sigma of residual error).
| int SearchSharedData::lazyEvalDepthMargin = 60 |
Depth multiplier margin for lazy evaluation.
| int SearchSharedData::lazyEvalMaxDepth = 6 |
Maximum depth to apply lazy evaluation.
| int SearchSharedData::lazyEvalMinMargin = 200 |
Absolute minimum margin for lazy evaluation.
| std::atomic<int> SearchSharedData::mainThreadDepth {0} |
Main thread's completed depth (used by helpers for early termination).
| std::atomic<int> SearchSharedData::mainThreadScore {0} |
Main thread's current score (used by helpers for aspiration windows).
| int SearchSharedData::numThreads {1} |
Total number of active search threads.
| std::atomic<int> SearchSharedData::selDepth {0} |
Maximum selective depth reached by any thread.
| int64_t SearchSharedData::softLimit = 0 |
Soft time limit in milliseconds.
| std::atomic<int64_t> SearchSharedData::startTimeNs {0} |
Search start time in steady_clock nanoseconds (atomic for ponderhit updates).
| std::atomic<bool> SearchSharedData::stop {false} |
Global flag to immediately stop all search threads.
| std::atomic<int> SearchSharedData::targetDepth {0} |
Target search depth (set by main thread at search start).
| std::atomic<uint64_t> SearchSharedData::tbHits {0} |
Total tablebase hits across all threads.
| std::atomic<uint64_t> SearchSharedData::totalNodes {0} |
Global node count across all threads.
| std::atomic<uint64_t> SearchSharedData::ttHits {0} |
Total transposition table hits across all threads.
| std::vector<VizNode> SearchSharedData::vizTree |
Stores edges for top layers of the search tree.