Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Performs an https://www.chessprogramming.org/Alpha-Beta search, implemented using https://www.chessprogramming.org/Negamax.
- Moves are dynamically re-ordering using the killer-heuristic.
- https://www.chessprogramming.org/Repetitions & https://www.chessprogramming.org/Transpositions are detected.
Synopsis
- extractSelectedTurns :: NPlies -> Result x y positionHash criterionValue weightedMean -> (DynamicMoveData x y positionHash, [Turn x y], NMoves)
- negaMax :: (Enum x, Enum y, Eq criterionValue, Num weightedMean, Ord weightedMean, Ord positionHash, Ord x, Ord y) => SearchDepth -> SearchState x y positionHash criterionValue weightedMean -> Reader (Result x y positionHash criterionValue weightedMean)
Types
Type-synonyms
Data-types
Functions
extractSelectedTurns :: NPlies -> Result x y positionHash criterionValue weightedMean -> (DynamicMoveData x y positionHash, [Turn x y], NMoves) Source #
- Remove any turns made before starting the search.
- N.B.: abandons the fitness of the game.
:: (Enum x, Enum y, Eq criterionValue, Num weightedMean, Ord weightedMean, Ord positionHash, Ord x, Ord y) | |
=> SearchDepth | The depth to which the tree should be searched; i.e. the number of plies to look-ahead. |
-> SearchState x y positionHash criterionValue weightedMean | |
-> Reader (Result x y positionHash criterionValue weightedMean) |
Implements a depth-first search (implemented as nega-max), with alpha-beta pruning.