bishbosh-0.0.0.5: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Attribute.CriterionValue

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines the value of a single criterion, which quantifies the significance of some concept; many such criteria may exist, & their weighted-mean drives automated selection of moves.
  • Each criterion-value is normalised into the signed closed unit-interval.
CAVEAT
  • While this data-type could implement the classes Num, Fractional & Real, these interfaces would allow one to construct invalid instances.
Synopsis

Types

Data-types

data CriterionValue criterionValue Source #

Quantifies some criterion; the larger the signed value, the better.

Instances
Num criterionValue => Bounded (CriterionValue criterionValue) Source # 
Instance details

Defined in BishBosh.Attribute.CriterionValue

Methods

minBound :: CriterionValue criterionValue #

maxBound :: CriterionValue criterionValue #

Eq criterionValue => Eq (CriterionValue criterionValue) Source # 
Instance details

Defined in BishBosh.Attribute.CriterionValue

Methods

(==) :: CriterionValue criterionValue -> CriterionValue criterionValue -> Bool #

(/=) :: CriterionValue criterionValue -> CriterionValue criterionValue -> Bool #

Show criterionValue => Show (CriterionValue criterionValue) Source # 
Instance details

Defined in BishBosh.Attribute.CriterionValue

Methods

showsPrec :: Int -> CriterionValue criterionValue -> ShowS #

show :: CriterionValue criterionValue -> String #

showList :: [CriterionValue criterionValue] -> ShowS #

Constants

zero :: Num criterionValue => CriterionValue criterionValue Source #

Constant.

Functions

calculateWeightedMean :: (Fractional weightedMean, Real criterionValue, Real criterionWeight) => [(CriterionValue criterionValue, CriterionWeight criterionWeight)] -> WeightedMeanAndCriterionValues weightedMean criterionValue Source #

  • Calculates the weighted mean of the specified CriterionValues using the corresponding criterion-weights.
  • Also writes individual unweighted CriterionValues, to facilitate post-analysis; if the corresponding weight is 0, evaluation of the criterion is, for efficiency, avoided.
  • CAVEAT: if all weights are 0, then the result is indeterminate.

Constructor

mkCriterionValue :: (Num criterionValue, Ord criterionValue) => criterionValue -> CriterionValue criterionValue Source #

Smart constructor.