bishbosh-0.1.3.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

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

:: PieceSquareValue

Opening-game.

-> PieceSquareValue

End-game.

-> PieceSquareValueByNPieces 

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

:: PieceSquareByCoordinatesByRank 
-> (PieceSquareValue -> ShowS)

Format a pieceSquareValue.

-> ShowS

The column-delimiter.

-> (PieceSquareValueByNPieces -> PieceSquareValue)

Select one PieceSquareValue from interpolated values.

-> ShowS 

Format the data for input to GNUPlot.

Constructor

mkPieceSquareByCoordinatesByRank Source #

Arguments

:: (Rank -> EitherPieceSquareValueByNPiecesByCoordinates)

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

-> PieceSquareByCoordinatesByRank 

Constructor.