bishbosh-0.0.0.3: Plays chess.

BishBosh.Types

Contents

Description

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

# Types

## Type-synonyms

The preferred type by which to weight criteria.

The preferred type by which to value criteria.

The preferred type by which to represent fitness.

type X = Int Source #

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

type Y = X Source #

The preferred type by which to represent the ordinate.

type Distance = X Source #

• 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.

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

• The preferred type by which to represent a piece-square value.
• CAVEAT: performance of interpolatePieceSquareValues suffers from use of Rational.

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

• 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.