hchess
hchess copied to clipboard
Haskell Chess Engine
#+TITLE: HChess
[[https://travis-ci.com/github/hexagonal-sun/hchess][https://travis-ci.com/hexagonal-sun/hchess.svg?branch=master]]
HChess is an attempt to learn haskell by means of writing a chess engine, something I've [[https://github.com/hexagonal-sun/mace][previouisly done in C++]].
This software is in it's very early stages and only currently supports pretty printing of an initial board state.
Current features:
- Data types for Ranks and Files.
- [[https://www.chessprogramming.org/0x88][0x88]] Board representaiton using [[https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Ix.html][Array]] indexed by Locus.
- Translation functions for translating between 0x88 locaii and File, Ranks.
- Direction types and applications to Locus to generate a new Locus.
- Piece data types:
- Piece Kind
- Colour
- Piece
- Creation of starting board.
- Pretty printing of game state.
- GameState class that encapsulates all game state.
- Move generation that's valid up to perft 5 from starting position and various other positions.
- [[https://www.chessprogramming.org/Perft][Perft]] testsuite with Travis CI integration.
- Game tree search with:
- [[https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning][Alpha Beta Pruning]]
- [[https://en.wikipedia.org/wiki/Universal_Chess_Interface][UCI]] implemtnation, allowing communication with various chess programs, such as [[https://github.com/cutechess/cutechess][Cute Chess]].
- [[https://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search][Iterative deepening]]
- Use [[http://hackage.haskell.org/package/template-haskell][Template Haskell]] to precompute movement rays during MoveGen.