Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data PolyglotBook
- defaultBook :: PolyglotBook
- twic :: PolyglotBook
- fromByteString :: ByteString -> PolyglotBook
- toByteString :: PolyglotBook -> ByteString
- readPolyglotFile :: FilePath -> IO PolyglotBook
- writePolyglotFile :: FilePath -> PolyglotBook -> IO ()
- makeBook :: PGN -> PolyglotBook
- toPGN :: PolyglotBook -> Position -> PGN
- bookPly :: RandomGen g => PolyglotBook -> Position -> Maybe (Rand g Ply)
- bookPlies :: PolyglotBook -> Position -> [Ply]
- bookForest :: PolyglotBook -> Position -> Forest Ply
- variations :: PolyglotBook -> Position -> [[Ply]]
- findPosition :: PolyglotBook -> Position -> [BookEntry]
Data type
data PolyglotBook Source #
A Polyglot opening book.
Instances
Eq PolyglotBook Source # | |
Defined in Game.Chess.Polyglot (==) :: PolyglotBook -> PolyglotBook -> Bool # (/=) :: PolyglotBook -> PolyglotBook -> Bool # |
Built-in books
twic :: PolyglotBook Source #
Load and save
fromByteString :: ByteString -> PolyglotBook Source #
Create a PolyglotBook from a ByteString.
writePolyglotFile :: FilePath -> PolyglotBook -> IO () Source #
makeBook :: PGN -> PolyglotBook Source #
Lookup
bookPly :: RandomGen g => PolyglotBook -> Position -> Maybe (Rand g Ply) Source #
Pick a random ply from the book.
bookPlies :: PolyglotBook -> Position -> [Ply] Source #
Probe the book for all plies known for the given position.
bookForest :: PolyglotBook -> Position -> Forest Ply Source #
variations :: PolyglotBook -> Position -> [[Ply]] Source #
Predicted Variations. Return the most popular game.
findPosition :: PolyglotBook -> Position -> [BookEntry] Source #