Skip to main content

search_nonblocking

Function search_nonblocking 

Source
pub fn search_nonblocking<P, T>(
    game: P,
    mode: Mode,
    tt: Arc<TranspositionTable>,
    stopper: Arc<AtomicBool>,
    debug: bool,
    sender: Sender<T>,
) -> JoinHandle<()>
where T: 'static + Send + From<SearchResult>, P: Into<Game>,
Expand description

Blunders Engine non-blocking search function. This runs the search on a separate thread. When the search has been completed, it returns the value by sending it over the given Sender.

ยงArguments

  • game: State of the current active game
  • mode: Mode of search determines when the search stops and how deep it searches
  • tt: Shared Transposition table. This may or may not lock the table for the duration of the search
  • stopper: Tell search to stop early from an external source
  • debug: When true prints extra debugging information
  • sender: Channel to send search result over