public class Search extends Object implements Runnable, Future<SearchResults>
Constructor and Description |
---|
Search(Position pos,
DetroidParameters params,
Evaluator eval,
EndGameTableBase egtb,
DetroidSearchInformation info,
int numOfSearchThreads,
Cache<TTEntry> transTable,
byte hashEntryGen,
boolean analysisMode,
boolean ponder,
int maxDepth,
long maxNodes,
Set<Move> moves)
Constructs a new instance using the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
SearchResults |
get() |
SearchResults |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
public Search(Position pos, DetroidParameters params, Evaluator eval, EndGameTableBase egtb, DetroidSearchInformation info, int numOfSearchThreads, Cache<TTEntry> transTable, byte hashEntryGen, boolean analysisMode, boolean ponder, int maxDepth, long maxNodes, Set<Move> moves)
pos
- The root position to search.params
- The engine parameters.eval
- The evaluator object.egtb
- The endgame tablebase object to use.info
- The object to update with search information.numOfSearchThreads
- The number of search threads to use.transTable
- The transposition table to use.hashEntryGen
- The current hash entry generation.analysisMode
- Whether the search is to be run in analysis mode (e.g. no EGTB moves and even single response root positions are
searched).ponder
- Whether the search should run in ponder mode.maxDepth
- The maximum depth to search to.maxNodes
- The maximum number of positions to search.moves
- The only moves from the root position that should be searched. If it is null
, all moves are to be searched.public SearchResults get() throws InterruptedException, ExecutionException
get
in interface Future<SearchResults>
InterruptedException
ExecutionException
public SearchResults get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException
get
in interface Future<SearchResults>
InterruptedException
ExecutionException
public boolean isDone()
isDone
in interface Future<SearchResults>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<SearchResults>
public boolean isCancelled()
isCancelled
in interface Future<SearchResults>
Copyright © 2020. All rights reserved.