Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Quantifies a game, & therefore the sequence of moves applied.
- The fitness & its breakdown into constituent criterion-values, are also recorded.
Synopsis
- type OpenInterval x y criterionValue weightedMean = (Maybe (QuantifiedGame x y criterionValue weightedMean), Maybe (QuantifiedGame x y criterionValue weightedMean))
- data QuantifiedGame x y criterionValue weightedMean
- unboundedInterval :: OpenInterval x y criterionValue weightedMean
- compareFitness :: Ord weightedMean => QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Ordering
- getFitness :: QuantifiedGame x y criterionValue weightedMean -> weightedMean
- fromGame :: (NFData criterionValue, Enum x, Enum y, Fractional criterionValue, Fractional pieceSquareValue, Fractional rankValue, Fractional weightedMean, Ord x, Ord y, Real criterionValue, Real criterionWeight, Real pieceSquareValue, Real rankValue, Show x, Show y) => Maybe pieceSquareValue -> Game x y -> Reader criterionWeight pieceSquareValue rankValue x y (QuantifiedGame x y criterionValue weightedMean)
- getLastTurn :: QuantifiedGame x y criterionValue weightedMean -> Turn x y
- getLatestTurns :: NPlies -> QuantifiedGame x y criterionValue weightedMean -> [Turn x y]
- negateFitness :: Num weightedMean => QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean
- negateInterval :: Num weightedMean => OpenInterval x y criterionValue weightedMean -> OpenInterval x y criterionValue weightedMean
Types
Type-synonyms
type OpenInterval x y criterionValue weightedMean = (Maybe (QuantifiedGame x y criterionValue weightedMean), Maybe (QuantifiedGame x y criterionValue weightedMean)) Source #
- The open interval in which to search for better solutions.
- N.B.:
Nothing
is interpreted as unbounded.
Data-types
data QuantifiedGame x y criterionValue weightedMean Source #
The selected game & the criteria against which it was quantified.
Instances
(Enum x, Enum y, Ord x, Ord y, Eq weightedMean, Eq criterionValue) => Eq (QuantifiedGame x y criterionValue weightedMean) Source # | |
Defined in BishBosh.Evaluation.QuantifiedGame (==) :: QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Bool # (/=) :: QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Bool # | |
(Enum x, Enum y, Ord x, Ord y, Show x, Show y, Show weightedMean, Show criterionValue) => Show (QuantifiedGame x y criterionValue weightedMean) Source # | |
Defined in BishBosh.Evaluation.QuantifiedGame showsPrec :: Int -> QuantifiedGame x y criterionValue weightedMean -> ShowS # show :: QuantifiedGame x y criterionValue weightedMean -> String # showList :: [QuantifiedGame x y criterionValue weightedMean] -> ShowS # | |
NFData weightedMean => NFData (QuantifiedGame x y criterionValue weightedMean) Source # | |
Defined in BishBosh.Evaluation.QuantifiedGame rnf :: QuantifiedGame x y criterionValue weightedMean -> () # | |
Null (QuantifiedGame x y criterionValue weightedMean) Source # | |
Defined in BishBosh.Evaluation.QuantifiedGame isNull :: QuantifiedGame x y criterionValue weightedMean -> Bool Source # | |
(Enum x, Enum y, Real criterionValue, Real weightedMean) => ShowNotationFloat (QuantifiedGame x y criterionValue weightedMean) Source # | |
Defined in BishBosh.Evaluation.QuantifiedGame showsNotationFloat :: MoveNotation -> (Double -> ShowS) -> QuantifiedGame x y criterionValue weightedMean -> ShowS Source # |
Constants
unboundedInterval :: OpenInterval x y criterionValue weightedMean Source #
Constant.
Functions
compareFitness :: Ord weightedMean => QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Ordering Source #
Compares fitness.
Accessors
getFitness :: QuantifiedGame x y criterionValue weightedMean -> weightedMean Source #
Accessor.
Constructors
:: (NFData criterionValue, Enum x, Enum y, Fractional criterionValue, Fractional pieceSquareValue, Fractional rankValue, Fractional weightedMean, Ord x, Ord y, Real criterionValue, Real criterionWeight, Real pieceSquareValue, Real rankValue, Show x, Show y) | |
=> Maybe pieceSquareValue | The value for the specified game. |
-> Game x y | The current state of the game. |
-> Reader criterionWeight pieceSquareValue rankValue x y (QuantifiedGame x y criterionValue weightedMean) |
Like fromGame
except that the caller determines the piece-square value.
Accessors
getLastTurn :: QuantifiedGame x y criterionValue weightedMean -> Turn x y Source #
Retrieve the turn used to generate the selected game.
getLatestTurns :: NPlies -> QuantifiedGame x y criterionValue weightedMean -> [Turn x y] Source #
Drop the specified number of old turns from the start of the chronological sequence, leaving the most recent.
Mutators
negateFitness :: Num weightedMean => QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean Source #
Represent the fitness of the game resulting from a future move by the opponent, from the perspective of the current player.
negateInterval :: Num weightedMean => OpenInterval x y criterionValue weightedMean -> OpenInterval x y criterionValue weightedMean Source #
Reflect the interval about zero.