Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Defines suitable concrete types with which to specialise type-parameters.
- CAVEAT: use of the narrow set of numeric types, results in marginally slower performance without any reduction in space-requirements.

## Synopsis

- type CriterionWeight = Double
- type CriterionValue = CriterionWeight
- type WeightedMean = CriterionValue
- type X = Int
- type Y = X
- type Distance = X
- type RankValue = CriterionValue
- type PieceSquareValue = CriterionValue
- type PositionHash = Word
- type RadiusSquared = Double

# Types

## Type-synonyms

type CriterionWeight = Double Source #

The preferred type by which to weight criteria.

type CriterionValue = CriterionWeight Source #

The preferred type by which to value criteria.

type WeightedMean = CriterionValue Source #

The preferred type by which to represent fitness.

The preferred type by which to represent the abscissa. CAVEAT: while conceptually unsigned, various unguarded calls to `pred`

prevent this.

- The preferred type by which to represent the signed distance of a move.
- N.B.: since
*distance*is used to represent only the horizontal or vertical component of a move, rather than a diagonal length, it can be represented by an integral value.

type RankValue = CriterionValue Source #

The preferred type by which to represent the value of a *rank*.

type PieceSquareValue = CriterionValue Source #

- The preferred type by which to represent a
*piece-square*value. - CAVEAT: performance of
`interpolatePieceSquareValues`

suffers from use of`Rational`

.

type PositionHash = Word Source #

The type of the hash used to uniquely represent a *position*.

type RadiusSquared = Double Source #

- The preferred type by which to represent the square of the radius of a coordinate, from the centre of the board.
- N.B. for efficiency,
`radius ^ 2`

is measured, to avoid the need to call`sqrt`

.