bishbosh-0.1.3.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Evaluation.QuantifiedGame

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Quantifies a game, & therefore the sequence of moves applied.
  • The fitness & its breakdown into constituent criterion-values, are also recorded.
Synopsis

Types

Type-synonyms

type OpenInterval = (Maybe QuantifiedGame, Maybe QuantifiedGame) Source #

  • The open interval in which to search for better solutions.
  • N.B.: Nothing is interpreted as unbounded.

Data-types

data QuantifiedGame Source #

The selected game & the criteria against which it was quantified.

Constants

Functions

Accessors

Constructors

fromGame Source #

Arguments

:: Maybe Base

The piece-square value difference for the specified game.

-> Game

The current state of the game.

-> Reader QuantifiedGame 

Constructor.

Accessors

getLastTurn :: QuantifiedGame -> Turn Source #

Retrieve the turn used to generate the selected game.

getLatestTurns Source #

Arguments

:: NPlies

The number of plies to drop from the start of the chronological sequence.

-> QuantifiedGame 
-> [Turn] 

Drop the specified number of plies from the start of the chronological sequence, leaving the most recent.

Mutators

negateFitness :: QuantifiedGame -> QuantifiedGame Source #

Represent the fitness of the game resulting from a future move by the opponent, from the perspective of the current player.

negateInterval :: OpenInterval -> OpenInterval Source #

Reflect the interval about zero.

Predicates

(<=>) :: QuantifiedGame -> QuantifiedGame -> Ordering infix 4 Source #

Space-ship operator, like in Perl.

(===) :: QuantifiedGame -> QuantifiedGame -> Bool infix 4 Source #

  • Whether the games have taken the same move-sequences, & as such have the same position.
  • CAVEAT: the games won't be identical if they started from different positions, but by some fluke managed to make the same sequence of moves.