bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Input.CriteriaWeights

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the weight associated with each criterion.
Synopsis

Types

Type-synonyms

Data-types

data CriteriaWeights Source #

  • The weight of various criteria used to select a move from alternatives, at a specific point in the game.
  • CAVEAT: these weights determine the effective value of isolated or doubled Pawns, & this value shouldn't be less than their weighted normalised rank-value, otherwise sacrifice would be beneficial.

Constants

tag :: String Source #

Used to qualify the XML.

weightOfMaterialTag :: String Source #

Used to qualify the XML.

weightOfPieceSquareValueTag :: String Source #

Used to qualify the XML.

Functions

calculateWeightedMean Source #

Arguments

:: CriteriaWeights 
-> CriterionValue

material: maximum if a player's move equals the maximum total piece value (including queened Pawns), while their opponent has just a King.

-> CriterionValue

mobility: maximum when the opponent is check-mated.

-> CriterionValue

pieceSquareValue: maximum when this player occupies all the strategically important squares & the opponent none.

-> CriterionValue

castlingPotential: maximum when this player either has castled or can, but the opponent has been permanently prevented.

-> CriterionValue

defence: maximum when this player's pieces are fully utilised in defence, but none of the opponent's are.

-> CriterionValue

doubledPawns: maximum when this player hasn't any doubled Pawns & the opponent has two files of four Pawns.

-> CriterionValue

isolatedPawns: maximum when this player hasn't any isolated Pawns & all the opponent's Pawns are isolated.

-> CriterionValue

passedPawns: maximum when this player has 8 passed Pawns & the opponent has none.

-> WeightedMeanAndCriterionValues

The individual criteria values, & their weighted mean.

  • Returns the weighted sum of the specified criteria, divided by the sum of the weights; https://www.chessprogramming.org/evaluation
  • Each criterion increases in proportion to some desirable attribute of the proposed game.
  • Each criterion should be in the same range of magnitudes, so that none dominates the total, thus making the total a clear measure of the value attributed to each.
  • Also writes individual unweighted criterion-values, to facilitate post-analysis; if the corresponding weight is zero, for efficiency evaluation of the criterion is avoided.

normalise :: Transformation Source #

Adjust the mean weight, so that the maximum weight is 1.

Constructor

mkCriteriaWeights Source #

Arguments

:: CriterionWeight

material.

-> CriterionWeight

mobility.

-> CriterionWeight

pieceSquareValue.

-> CriterionWeight

castlingPotential.

-> CriterionWeight

defence.

-> CriterionWeight

doubledPawns.

-> CriterionWeight

isolatedPawns.

-> CriterionWeight

passedPawns.

-> CriteriaWeights 

Smart constructor.