module BishBosh.Search.SearchState(
SearchState(
getPositionHashQuantifiedGameTree,
getDynamicMoveData
),
euthanise,
mkSearchState,
initialise
) where
import qualified BishBosh.Component.Move as Component.Move
import qualified BishBosh.Evaluation.PositionHashQuantifiedGameTree as Evaluation.PositionHashQuantifiedGameTree
import qualified BishBosh.Input.SearchOptions as Input.SearchOptions
import qualified BishBosh.Property.Empty as Property.Empty
import qualified BishBosh.Search.DynamicMoveData as Search.DynamicMoveData
data SearchState x y positionHash criterionValue weightedMean = MkSearchState {
SearchState x y positionHash criterionValue weightedMean
-> PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
getPositionHashQuantifiedGameTree :: Evaluation.PositionHashQuantifiedGameTree.PositionHashQuantifiedGameTree x y positionHash criterionValue weightedMean,
SearchState x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
getDynamicMoveData :: Search.DynamicMoveData.DynamicMoveData x y positionHash
}
instance (
Enum x,
Enum y,
Ord x,
Ord y,
Show x,
Show y,
Show criterionValue,
Show positionHash,
Show weightedMean
) => Show (SearchState x y positionHash criterionValue weightedMean) where
showsPrec :: Int
-> SearchState x y positionHash criterionValue weightedMean
-> ShowS
showsPrec Int
_ SearchState x y positionHash criterionValue weightedMean
_ = String -> ShowS
showString String
"SearchState {...}"
mkSearchState
:: Evaluation.PositionHashQuantifiedGameTree.PositionHashQuantifiedGameTree x y positionHash criterionValue weightedMean
-> Search.DynamicMoveData.DynamicMoveData x y positionHash
-> SearchState x y positionHash criterionValue weightedMean
mkSearchState :: PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
-> SearchState x y positionHash criterionValue weightedMean
mkSearchState = PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
-> SearchState x y positionHash criterionValue weightedMean
forall x y positionHash criterionValue weightedMean.
PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
-> SearchState x y positionHash criterionValue weightedMean
MkSearchState
initialise :: Evaluation.PositionHashQuantifiedGameTree.PositionHashQuantifiedGameTree x y positionHash criterionValue weightedMean -> SearchState x y positionHash criterionValue weightedMean
initialise :: PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
-> SearchState x y positionHash criterionValue weightedMean
initialise PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
positionHashQuantifiedGameTree = MkSearchState :: forall x y positionHash criterionValue weightedMean.
PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
-> SearchState x y positionHash criterionValue weightedMean
MkSearchState {
getPositionHashQuantifiedGameTree :: PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
getPositionHashQuantifiedGameTree = PositionHashQuantifiedGameTree
x y positionHash criterionValue weightedMean
positionHashQuantifiedGameTree,
getDynamicMoveData :: DynamicMoveData x y positionHash
getDynamicMoveData = DynamicMoveData x y positionHash
forall a. Empty a => a
Property.Empty.empty
}
euthanise
:: Component.Move.NPlies
-> Input.SearchOptions.MaybeRetireAfterNMoves
-> Input.SearchOptions.MaybeRetireAfterNMoves
-> SearchState x y positionHash criterionValue weightedMean
-> SearchState x y positionHash criterionValue weightedMean
euthanise :: Int
-> MaybeRetireAfterNMoves
-> MaybeRetireAfterNMoves
-> SearchState x y positionHash criterionValue weightedMean
-> SearchState x y positionHash criterionValue weightedMean
euthanise Int
nPlies MaybeRetireAfterNMoves
maybeRetireKillerMovesAfter MaybeRetireAfterNMoves
maybeRetireTranspositionsAfter searchState :: SearchState x y positionHash criterionValue weightedMean
searchState@MkSearchState { getDynamicMoveData :: forall x y positionHash criterionValue weightedMean.
SearchState x y positionHash criterionValue weightedMean
-> DynamicMoveData x y positionHash
getDynamicMoveData = DynamicMoveData x y positionHash
dynamicMoveData } = SearchState x y positionHash criterionValue weightedMean
searchState {
getDynamicMoveData :: DynamicMoveData x y positionHash
getDynamicMoveData = Int
-> MaybeRetireAfterNMoves
-> MaybeRetireAfterNMoves
-> Transformation x y positionHash
forall x y positionHash.
Int
-> MaybeRetireAfterNMoves
-> MaybeRetireAfterNMoves
-> Transformation x y positionHash
Search.DynamicMoveData.euthanise Int
nPlies MaybeRetireAfterNMoves
maybeRetireKillerMovesAfter MaybeRetireAfterNMoves
maybeRetireTranspositionsAfter DynamicMoveData x y positionHash
dynamicMoveData
}