Expand description
Search functions.
Structs§
- History
- History primary use is for tracking repeated moves to prevent threefold repetition. It is stateful, in that functions assume the next interaction comes from the next possible move in a played game.
- Search
Result - The results found from running a search on some root position.
Functions§
- alpha_
beta - Base alpha_beta call. This function assumes that the current player in the passed position is the engine. It returns the best move and score for the position in the search tree.
- ids
- Run Iterative Deepening search on a root position to depth “ply” using a persistent transposition table. It returns the best move and score for the position in the search tree. TODO: Bug fix, returns invalid result in case where stopper was set too quickly.
- iterative_
negamax - Iterative fail-soft Negamax implementation with alpha-beta pruning and transposition table lookup.
- minimax
- Base minimax call. This function assumes that the current player in the passed position is the engine. It returns the best move and score for the position in the search tree.
- negamax
- Negamax implementation of Minimax with alpha-beta pruning. Negamax searches to a given depth and returns the best move found. Internally, Negamax treats the active player as the maxing player, however the final centipawn score of the position returned is absolute with White as maxing and Black as minning.
- quiescence
- notes: Quiescence search returns a score relative to active player. It can be given any max depth to limit its search. A depth of 0 is the same as the stand pat evaluation. Quiescence is guaranteed to have a short runtime because it only evaluates captures, and there are a limited number of captures to be had for any position.
- search
- Blunders Engine primary position search function. WIP.
- search_
nonblocking - 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.