bishbosh-0.1.3.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Component.Zobrist

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Synopsis

Types

Type-synonyms

Data-types

data Zobrist positionHash Source #

The random numbers used to generate a hash, which almost uniquely represent a position.

Instances

Instances details
Foldable Zobrist Source # 
Instance details

Defined in BishBosh.Component.Zobrist

Methods

fold :: Monoid m => Zobrist m -> m #

foldMap :: Monoid m => (a -> m) -> Zobrist a -> m #

foldMap' :: Monoid m => (a -> m) -> Zobrist a -> m #

foldr :: (a -> b -> b) -> b -> Zobrist a -> b #

foldr' :: (a -> b -> b) -> b -> Zobrist a -> b #

foldl :: (b -> a -> b) -> b -> Zobrist a -> b #

foldl' :: (b -> a -> b) -> b -> Zobrist a -> b #

foldr1 :: (a -> a -> a) -> Zobrist a -> a #

foldl1 :: (a -> a -> a) -> Zobrist a -> a #

toList :: Zobrist a -> [a] #

null :: Zobrist a -> Bool #

length :: Zobrist a -> Int #

elem :: Eq a => a -> Zobrist a -> Bool #

maximum :: Ord a => Zobrist a -> a #

minimum :: Ord a => Zobrist a -> a #

sum :: Num a => Zobrist a -> a #

product :: Num a => Zobrist a -> a #

Show positionHash => Show (Zobrist positionHash) Source # 
Instance details

Defined in BishBosh.Component.Zobrist

Methods

showsPrec :: Int -> Zobrist positionHash -> ShowS #

show :: Zobrist positionHash -> String #

showList :: [Zobrist positionHash] -> ShowS #

(FiniteBits positionHash, Random positionHash) => Default (Zobrist positionHash) Source # 
Instance details

Defined in BishBosh.Component.Zobrist

Methods

def :: Zobrist positionHash #

Functions

dereferenceRandomByCoordinatesByRankByLogicalColour :: Zobrist positionHash -> Index -> positionHash Source #

Dereferences getRandomByCoordinatesByRankByLogicalColour using the specified index.

dereferenceRandomByCastleableRooksXByLogicalColour Source #

Arguments

:: Zobrist positionHash 
-> LogicalColour 
-> X 
-> Maybe positionHash

The existence of a result depends on whether there remain any Rooks which can castle.

Dereferences getRandomByCastleableRooksXByLogicalColour using the specified abscissa.

dereferenceRandomByEnPassantAbscissa :: Zobrist positionHash -> X -> positionHash Source #

Dereferences getRandomByEnPassantAbscissa using the specified abscissa.

Constructors

mkZobrist Source #

Arguments

:: (FiniteBits positionHash, RandomGen randomGen, Random positionHash) 
=> Maybe Int

The optional minimum acceptable Hamming-distance between any two of the selected random numbers.

-> randomGen 
-> Zobrist positionHash 

Smart constructor.