bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Search.TranspositionValue

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines an entry in the transposition-table.
Synopsis

Types

Type-synonyms

type IsOptimal = Bool Source #

Whether the recorded move-sequence is known to be optimal.

type FindFitness qualifiedMove = TranspositionValue qualifiedMove -> WeightedMean Source #

  • The type of a function which can find the fitness of the game resulting from the recorded sequence of qualifiedMoves.
  • CAVEAT: the fitness this function returns should be from the perspective of the player to make the first move.

Data-types

data TranspositionValue qualifiedMove Source #

The type of the values in the transposition-table.

Instances

Instances details
Show qualifiedMove => Show (TranspositionValue qualifiedMove) Source # 
Instance details

Defined in BishBosh.Search.TranspositionValue

Methods

showsPrec :: Int -> TranspositionValue qualifiedMove -> ShowS #

show :: TranspositionValue qualifiedMove -> String #

showList :: [TranspositionValue qualifiedMove] -> ShowS #

Functions

inferSearchDepth :: TranspositionValue qualifiedMove -> NPlies Source #

Infer the search-depth from the length of the qualifiedMove-sequence.

Constructor

mkTranspositionValue :: IsOptimal -> NPlies -> [qualifiedMove] -> TranspositionValue qualifiedMove Source #

Smart constructor.

Predicates

isBetter Source #

Arguments

:: FindFitness qualifiedMove 
-> TranspositionValue qualifiedMove

The proposed value.

-> TranspositionValue qualifiedMove

The incumbent value.

-> Bool 
  • Whether a proposed value is better than the incumbent.
  • CAVEAT: this is a narrower concept than addressed by Ord, which implies Eq.