Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines configurable options related to the process of searching for the optimal move.
Synopsis
- type SearchDepth = NMoves
- type PreferMovesTowardsCentre = Bool
- type SortOnStandardOpeningMoveFrequency = Bool
- type HammingDistance = Int
- type MaybeRetireAfterNMoves = Maybe NMoves
- type TrapRepeatedPositions = Bool
- type MaybeUseTranspositions = Maybe (NMoves, SearchDepth)
- type Reader = Reader SearchOptions
- data SearchOptions
- tag :: String
- searchDepthTag :: String
- minimumSearchDepth :: SearchDepth
- defaultSearchDepth :: SearchDepth
- mkSearchOptions :: PreferMovesTowardsCentre -> SortOnStandardOpeningMoveFrequency -> Maybe CaptureMoveSortAlgorithm -> Maybe HammingDistance -> MaybeRetireAfterNMoves -> TrapRepeatedPositions -> UsePondering -> MaybeUseTranspositions -> StandardOpeningOptions -> SearchDepthByLogicalColour -> SearchOptions
- getSearchDepth :: SearchOptions -> SearchDepth
- maybeRetireTranspositionsAfter :: SearchOptions -> MaybeRetireAfterNMoves
- maybeMinimumTranspositionSearchDepth :: SearchOptions -> Maybe SearchDepth
- setSearchDepth :: SearchDepth -> Transformation
- swapSearchDepth :: Transformation
- recordKillerMoves :: SearchOptions -> RecordKillerMoves
Types
Type-synonyms
type SearchDepth = NMoves Source #
The number of plies to search for the optimal move.
type PreferMovesTowardsCentre = Bool Source #
Whether to prefer moves which progress towards the centre of the board.
type SortOnStandardOpeningMoveFrequency = Bool Source #
Sort moves on the decreasing frequency of occurrence in standard openings.
type HammingDistance = Int Source #
The optional minimum Hamming-distance between the random numbers from which Zobrist-hashes are composed.
type MaybeRetireAfterNMoves = Maybe NMoves Source #
The number of full moves (one for each player) after which to retire killer moves.
type TrapRepeatedPositions = Bool Source #
Whether to short-circuit the fitness-evaluation of positions which have been visited before in the current game.
type MaybeUseTranspositions = Maybe (NMoves, SearchDepth) Source #
The number of full moves (one for each player) after which to retire transpositions & the search-depth beneath which they aren't recorded at all.
type Reader = Reader SearchOptions Source #
Self-documentation.
Data-types
data SearchOptions Source #
Defines options related to searching for a move.
Instances
Eq SearchOptions Source # | |
Defined in BishBosh.Input.SearchOptions (==) :: SearchOptions -> SearchOptions -> Bool # (/=) :: SearchOptions -> SearchOptions -> Bool # | |
Show SearchOptions Source # | |
Defined in BishBosh.Input.SearchOptions showsPrec :: Int -> SearchOptions -> ShowS # show :: SearchOptions -> String # showList :: [SearchOptions] -> ShowS # | |
NFData SearchOptions Source # | |
Defined in BishBosh.Input.SearchOptions rnf :: SearchOptions -> () # | |
Default SearchOptions Source # | |
Defined in BishBosh.Input.SearchOptions def :: SearchOptions # | |
XmlPickler SearchOptions Source # | |
Defined in BishBosh.Input.SearchOptions xpickle :: PU SearchOptions # |
Constants
searchDepthTag :: String Source #
Used to qualify XML.
minimumSearchDepth :: SearchDepth Source #
The minimum permissible search-depth.
defaultSearchDepth :: SearchDepth Source #
- The default search-depth.
- CAVEAT: this is rather arbitrary.
Functions
Constructor
:: PreferMovesTowardsCentre | |
-> SortOnStandardOpeningMoveFrequency | |
-> Maybe CaptureMoveSortAlgorithm | |
-> Maybe HammingDistance | The optional lower bound on the Hamming-distance between the random numbers used to compose Zobrist hashes from positions. |
-> MaybeRetireAfterNMoves | The number of full moves back from the current position, after which to retire killer-moves. |
-> TrapRepeatedPositions | |
-> UsePondering | |
-> MaybeUseTranspositions | The number of full moves after which to retire transpositions, & the search-depth beneath which transpositions aren't recorded. |
-> StandardOpeningOptions | |
-> SearchDepthByLogicalColour | |
-> SearchOptions |
Smart constructor.
Accessors
getSearchDepth :: SearchOptions -> SearchDepth Source #
Get either player's search-depth, using a default value when none are defined.
maybeRetireTranspositionsAfter :: SearchOptions -> MaybeRetireAfterNMoves Source #
When to retire transpositions.
maybeMinimumTranspositionSearchDepth :: SearchOptions -> Maybe SearchDepth Source #
The search-depth beneath which transpositions aren't recorded.
Mutators
setSearchDepth :: SearchDepth -> Transformation Source #
Mutator.
swapSearchDepth :: Transformation Source #
Swap the logical colour associated with any searchDepth currently assigned.
Predicates
recordKillerMoves :: SearchOptions -> RecordKillerMoves Source #
Whether killer-moves are to be recorded.