bishbosh-0.0.0.4: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Search.TranspositionValue

Contents

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 move weightedMean = Value move -> weightedMean Source #

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

Data-types

data Value move Source #

The type of the values in the transposition-table.

Functions

inferSearchDepth :: Value move -> NPlies Source #

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

Constructor

mkValue :: IsOptimal -> NPlies -> [move] -> Value move Source #

Smart constructor.

Predicates

isBetter Source #

Arguments

:: Ord weightedMean 
=> FindFitness move weightedMean 
-> Value move

The proposed value.

-> Value move

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.