bishbosh-0.0.0.3: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Evaluation.QuantifiedGame

Contents

Description

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

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 used in that QuantifiedGame.

Instances

(Eq weightedMean, Eq criterionValue, Ord y, Ord x, Enum y, Enum x) => Eq (QuantifiedGame x y criterionValue weightedMean) Source # 

Methods

(==) :: QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Bool #

(/=) :: QuantifiedGame x y criterionValue weightedMean -> QuantifiedGame x y criterionValue weightedMean -> Bool #

(Show weightedMean, Show criterionValue, Show y, Show x, Ord y, Ord x, Enum y, Enum x) => Show (QuantifiedGame x y criterionValue weightedMean) Source # 

Methods

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 # 

Methods

rnf :: QuantifiedGame x y criterionValue weightedMean -> () #

Null (QuantifiedGame x y criterionValue weightedMean) Source # 

Methods

isNull :: QuantifiedGame x y criterionValue weightedMean -> Bool Source #

(Enum x, Enum y, Real criterionValue, Real weightedMean) => ShowNotationFloat (QuantifiedGame x y criterionValue weightedMean) Source # 

Methods

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

fromGame Source #

Arguments

:: (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.