chessIO: Basic chess library

[ bsd3, game, library, program ] [ Propose Tags ]

A simple and fast library for generating legal chess moves. Also includes a module for communication with external processes that speak the UCI (Universal Chess Interface) protocol, a PGN parser/pretty printer, and Polyglot opening book support. On top of that, provides a console frontend program (cboard) that can be used to interactively play against UCI engines, and a terminal program (cbookview) to explore commonly played chess openings.

[Skip to Readme]
Versions [faq],,,,,,,,,
Change log
Dependencies attoparsec, base (>=4.10 && <5), binary, brick, bytestring, chessIO, containers, extra, file-embed, filepath, haskeline, megaparsec (>=9.0), microlens, microlens-th, MonadRandom, mtl, o-clock, optparse-applicative, prettyprinter, process, random, rosezipper, stm, text, time, unordered-containers, vector, vty [details]
License BSD-3-Clause
Copyright 2020 Mario Lang
Author Mario Lang
Category Game
Home page
Bug tracker
Source repo head: git clone
Uploaded by mlang at 2020-12-25T19:11:02Z
Distributions NixOS:
Executables polyplay, cbookview, cboard
Downloads 2327 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-12-25 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for chessIO-

[back to package description]

A Haskell chess library and console UCI frontend program

chessIO is a Haskell library for working with chess positions and moves, and a console frontend program (cboard) to work with UCI compatible chess engines.

The Library

The main module provided by the library is Game.Chess, which defines data types and functions for working with chess positions and moves. It offers a fully compliant move generator and parsing for and printing positions in Forsyth-Edwards Notation and moves in Algebraic Notation.

Module Game.Chess.UCI provides functionality to run an external process which understands the Universal Chess Interface protocol from within Haskell.

Console frontend for the Universal Chess Interface protocl

cboard is a simple console (text-mode) frontend for interacting with chess engines (like stockfish or glaurung) which make use of the UCI protocol.

To launch a chess engine, simply pass its executable name and arguments to cboard. For instance, cboard stockfish.

Opening book explorer

cbookview is a terminal application to explore commonly played openings. Passing a polyglot opening book file (with extension .bin) will allow you to explore the plies contained in that book file interactively. You can also open a PGN file (extension .pgn) which will be presented like it was an opening book. In other words, all the moves played in that PGN file will be merged into a single forest of plies. When exporing PGN files, no particular order of plies is imposed. When exploring a polyglot file the most popular moves will always come first.