bishbosh-0.1.2.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Component.PieceSquareByCoordinatesByRank

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the relative value of a specific rank of piece, occupying a specific coordinate on the board, at a specific stage in the game.
Synopsis

Types

Type-synonyms

Data-types

data PieceSquareByCoordinatesByRank pieceSquareValue Source #

The value for each type of piece of occupying each coordinate, at each stage in the lifetime of the game.

Instances

Instances details
Eq pieceSquareValue => Eq (PieceSquareByCoordinatesByRank pieceSquareValue) Source # 
Instance details

Defined in BishBosh.Component.PieceSquareByCoordinatesByRank

Methods

(==) :: PieceSquareByCoordinatesByRank pieceSquareValue -> PieceSquareByCoordinatesByRank pieceSquareValue -> Bool #

(/=) :: PieceSquareByCoordinatesByRank pieceSquareValue -> PieceSquareByCoordinatesByRank pieceSquareValue -> Bool #

Show pieceSquareValue => Show (PieceSquareByCoordinatesByRank pieceSquareValue) Source # 
Instance details

Defined in BishBosh.Component.PieceSquareByCoordinatesByRank

Methods

showsPrec :: Int -> PieceSquareByCoordinatesByRank pieceSquareValue -> ShowS #

show :: PieceSquareByCoordinatesByRank pieceSquareValue -> String #

showList :: [PieceSquareByCoordinatesByRank pieceSquareValue] -> ShowS #

NFData pieceSquareValue => NFData (PieceSquareByCoordinatesByRank pieceSquareValue) Source # 
Instance details

Defined in BishBosh.Component.PieceSquareByCoordinatesByRank

Methods

rnf :: PieceSquareByCoordinatesByRank pieceSquareValue -> () #

Constants

nPiecesBounds :: (NPieces, NPieces) Source #

The bounds of the number of pieces on the board, at the end-game & opening-game respectively.

gnuPlotComment :: Char Source #

The character used in GNUPlot to denote a comment.

Functions

findPieceSquareValue Source #

Arguments

:: PieceSquareByCoordinatesByRank pieceSquareValue 
-> NPieces

The progress through the game.

-> LogicalColour

The piece's logical colour.

-> Rank

The piece's rank.

-> Coordinates

The piece's location.

-> pieceSquareValue 

Find the piece-square value, at a stage in the game's lifetime defined by the total number of pieces remaining, for the specified rank & coordinates.

interpolatePieceSquareValues Source #

Arguments

:: Fractional pieceSquareValue 
=> pieceSquareValue

Opening-game.

-> pieceSquareValue

End-game.

-> PieceSquareValueByNPieces pieceSquareValue 

Given the bounds over which two piece-square values vary as the game progresses from opening to end, return linearly interpolated values for all stages.

formatForGNUPlot Source #

Arguments

:: (pieceSquareValue -> ShowS)

Format a pieceSquareValue.

-> ShowS

The column-delimiter.

-> (PieceSquareValueByNPieces pieceSquareValue -> pieceSquareValue)

Select one pieceSquareValue from interpolated values.

-> PieceSquareByCoordinatesByRank pieceSquareValue 
-> ShowS 

Format the data for input to GNUPlot.

Constructor

mkPieceSquareByCoordinatesByRank Source #

Arguments

:: (Rank -> EitherPieceSquareValueByNPiecesByCoordinates pieceSquareValue)

Convert a rank into either (a pieceSquareValue or a pieceSquareValue which linearly varies with the number of pieces remaining) by coordinates.

-> PieceSquareByCoordinatesByRank pieceSquareValue 

Constructor.