Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the weight associated with each criterion.
Synopsis
- data CriteriaWeights
- tag :: String
- weightOfMaterialTag :: String
- weightOfPieceSquareValueTag :: String
- calculateWeightedMean :: CriteriaWeights -> CriterionValue -> CriterionValue -> CriterionValue -> CriterionValue -> CriterionValue -> CriterionValue -> CriterionValue -> CriterionValue -> WeightedMeanAndCriterionValues
- normalise :: Transformation
- mkCriteriaWeights :: CriterionWeight -> CriterionWeight -> CriterionWeight -> CriterionWeight -> CriterionWeight -> CriterionWeight -> CriterionWeight -> CriterionWeight -> CriteriaWeights
Types
Type-synonyms
Data-types
data CriteriaWeights Source #
- The weight of various criteria used to select a move from alternatives, at a specific point in the game.
- CAVEAT: these weights determine the effective value of isolated or doubled
Pawn
s, & this value shouldn't be less than their weighted normalised rank-value, otherwise sacrifice would be beneficial.
Instances
Bounded CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights | |
Eq CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights (==) :: CriteriaWeights -> CriteriaWeights -> Bool # (/=) :: CriteriaWeights -> CriteriaWeights -> Bool # | |
Show CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights showsPrec :: Int -> CriteriaWeights -> ShowS # show :: CriteriaWeights -> String # showList :: [CriteriaWeights] -> ShowS # | |
Default CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights def :: CriteriaWeights # | |
NFData CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights rnf :: CriteriaWeights -> () # | |
XmlPickler CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights | |
ShowFloat CriteriaWeights Source # | |
Defined in BishBosh.Input.CriteriaWeights showsFloat :: (Double -> ShowS) -> CriteriaWeights -> ShowS Source # |
Constants
weightOfMaterialTag :: String Source #
Used to qualify the XML.
weightOfPieceSquareValueTag :: String Source #
Used to qualify the XML.
Functions
calculateWeightedMean Source #
:: CriteriaWeights | |
-> CriterionValue | material: maximum if a player's move equals the maximum total piece value (including queened |
-> CriterionValue | mobility: maximum when the opponent is check-mated. |
-> CriterionValue | pieceSquareValue: maximum when this player occupies all the strategically important squares & the opponent none. |
-> CriterionValue | castlingPotential: maximum when this player either has castled or can, but the opponent has been permanently prevented. |
-> CriterionValue | defence: maximum when this player's pieces are fully utilised in defence, but none of the opponent's are. |
-> CriterionValue | doubledPawns: maximum when this player hasn't any doubled |
-> CriterionValue | isolatedPawns: maximum when this player hasn't any isolated |
-> CriterionValue | passedPawns: maximum when this player has 8 passed |
-> WeightedMeanAndCriterionValues | The individual criteria values, & their weighted mean. |
- Returns the weighted sum of the specified criteria, divided by the sum of the weights; https://www.chessprogramming.org/evaluation
- Each criterion increases in proportion to some desirable attribute of the proposed game.
- Each criterion should be in the same range of magnitudes, so that none dominates the total, thus making the total a clear measure of the value attributed to each.
- Also writes individual unweighted criterion-values, to facilitate post-analysis; if the corresponding weight is zero, for efficiency evaluation of the criterion is avoided.
Constructor
:: CriterionWeight | material. |
-> CriterionWeight | mobility. |
-> CriterionWeight | pieceSquareValue. |
-> CriterionWeight | castlingPotential. |
-> CriterionWeight | defence. |
-> CriterionWeight | doubledPawns. |
-> CriterionWeight | isolatedPawns. |
-> CriterionWeight | passedPawns. |
-> CriteriaWeights |
Smart constructor.