class

Experion::Searcher

Inherits Experion::Moves < Reference < Object

Constants

CAP_BASE = 8000000
CONTHIST_N = 49152
COUNTER_N = 4096
EVAL_CACHE_N = 262144

3 words/entry: hash, packed white-POV base, hang-overlay (or UNKNOWN). Overlay is STM-relative and position-only, so tree and qsearch share the base and the overlay is filled on first blend-100 request.

EVAL_OVERLAY_UNKNOWN = 2147483647_u64
FUTILITY = StaticArray[0, 0, 200, 280, 450]
HASH_SIZE = 4096
HIST_N = 768
INF = 1000000
KILLER_N = 256
KILLER_SCORE = 7000000
LMR_N = 4096
QUEEN_PROMO = 8900000
VICTIM = StaticArray[100, 300, 320, 500, 900, 10000, 0]

Constructors

new(tt : TT = TT.new, shared_stop : SearchStop | Nil = nil, worker_bias : Int32 = 0, tt_owner : Bool = true)
Source

Instance methods

clear_heuristics
Source
eval_for(pos : Position) : Int32

Public-facing eval: refresh the NNUE accumulator for pos and return the blend-applied value. Used by the UCI eval command.

Source
last_completed_depth
Source
last_score
Source
new_game
Source
nodes
Source
prepare_search
Source
pv_string(first : UInt16 = Moves::MOVE_NONE) : String
Source
raw_nnue(pos : Position) : Int32
Source
raw_output=(raw_output : Bool)

When true, info lines are written with raw LibC.write instead of Crystal IO. Required when searching inside a bare Thread (no execution context => Crystal IO raises).

Source
raw_output?

When true, info lines are written with raw LibC.write instead of Crystal IO. Required when searching inside a bare Thread (no execution context => Crystal IO raises).

Source
stop!
Source
stop_atom

The stop flag, so SMP workers can share one with the primary searcher.

Source
stopped?
Source
think(root : Position, game_hashes : Array(UInt64), limits : Limits, reset_stop : Bool = true) : UInt16

Returns the best move found; prints UCI info lines as iterations complete.

Source
think_smp(root : Position, game_hashes : Array(UInt64), limits : Limits, threads : Int32, reset_stop : Bool = true) : UInt16
Source
verbose=(verbose : Bool)
Source
verbose?
Source