chmengine.engines.cmhmey2_pool_executor¶
Cmhmey Jr.’s Mad Scientist Uncle Who Likes to make clones of Cmhmey Jr.
Functions
|
Offloads eval calculations to another CMHMEngine2 instance. |
|
Offloads eval calculations to another CMHMEngine3 instance. |
Classes
|
- class chmengine.engines.cmhmey2_pool_executor.CMHMEngine2PoolExecutor(board: Optional[Board] = None, depth: int = 1, max_workers: Optional[int] = None, time_limit: Optional[float64] = None)¶
Bases:
object
- cache_dir: str = '.\\SQLite3Caches\\QTables'¶
- engine: CMHMEngine2¶
- executor: ProcessPoolExecutor¶
- pick_move(debug: bool = False) Pick ¶
Select the best move using conditional multithreaded evaluations.
- Parameters:
- debugbool, default: False
If True, prints debug information about the evaluations.
- Returns:
- Pick
The best move and its associated evaluation score.
- push(move: Move) None ¶
Helper method to update the internal board state with a pushed move.
- Parameters:
- moveMove
- shutdown() None ¶
Shut down the ProcessPoolExecutor.
- chmengine.engines.cmhmey2_pool_executor.evaluate_move(board: Board, depth: int = 1, debug: bool = False, cache_dir: str = '.\\SQLite3Caches\\QTables') Pick ¶
Offloads eval calculations to another CMHMEngine2 instance.
- Parameters:
- boardBoard
The chess board state to evaluate.
- depthint
The search depth for the evaluation.
- debugbool
Whether to enable debug output.
- cache_dirstr
The cache directory for the engine.
- Returns:
- Pick
The best move and its associated evaluation score.
- Raises:
- OperationalError
If the database remains locked after exhausting retries or for unexpected operational errors.
- chmengine.engines.cmhmey2_pool_executor.evaluate_move_until(time_limit: float64, board: Board, depth: int = 1, debug: bool = False, cache_dir: str = '.\\SQLite3Caches\\QTables') Pick ¶
Offloads eval calculations to another CMHMEngine3 instance.
- Parameters:
- time_limitfloat
Time to spend on the evaluation.
- boardBoard
The chess board state to evaluate.
- depthint
The search depth for the evaluation.
- debugbool
Whether to enable debug output.
- cache_dirstr
The cache directory for the engine.
- Returns:
- Pick
The best move and its associated evaluation score.
- Raises:
- OperationalError
If the database remains locked after exhausting retries or for unexpected operational errors.