Open source chess AI framework
Project description
♟ Welcome to beth
documentation
beth
is an open source chess AI framework. Like many, I re-discovered the game of chess by watching the Netflix show the Queen's Gambit. As a Data Scientist, it made we want to learn and explore the beauty of the game.
At first my goal was to develop algorithms to help me learn chess. But over time, it lead to developing more and more features. What you will find is my personal experiments open sourced as a chess framework. I hope this framework to be ideal for chess programmers in Python to ease the development of new algorithms and engines.
This repo is under active development, many features are still experimental. But please fill free to fork or PR
Installation
You can install the library from PyPi with:
pip install beth
Or clone and install from source
Features
- Definition of a game environment using
python-chess
framework, with move parsing, board-to-numpy abstractions, PGN records, move replay. - Playing chess in Jupyter notebooks with widgets
- Different player abstractions:
HumanPlayer()
,RandomPlayer()
,AIPlayer()
- to play Human vs AI, Human vs Human, or AI vs AI. - Connection to Stockfis engine to evaluate engine performances, available with
StockfishAI()
object abstraction - Rules-based engine
TreeSearchAI()
with minimax tree search, alpha beta pruning, move ordering and board heuristics (~ELO 1000) - First attempt of ML engine with a LSTM Neural Network to predict next moves
Next roadmap features
If you are interested, please drop an issue or a PR, or contact me by email. Meanwhile the roadmap for beth
is:
- Implementing a GUI (or connecting to an existing one) to ease experimentation
- ELO or TrueSkill measurement for any engine
- Improving minimax engine speed
- Developing ML engines:
- Self supervised learning with Transformers
- Reinforcement Learning
Repo Structure
- beth/
- data/
- raw/
- processed/
- docs/ # Documentation folder and website (.md, .ipynb) using Mkdocs
- notebooks/ # Jupyter notebooks only (.ipynb)
- tests/ # Unitary testing using pytest
- .gitignore
- LICENSE # MIT License
- poetry.lock # Poetry lock file
- pyproject.toml # Configuration file to export and package the library using Poetry
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file beth-0.2.0.tar.gz
.
File metadata
- Download URL: beth-0.2.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 585b265f1c679072adff06a42d6c9d545260292dd9ba2585c0fc25f35b4d4e96 |
|
MD5 | ffc37bca79bc1c38d2fd10a52457359e |
|
BLAKE2b-256 | 1402659f75a837fe9c8b885d4d95dc9a71437f9557d6c37612cfe02d576bf694 |
File details
Details for the file beth-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: beth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f48eda38d02f6e63df26c0d5fe6bcd29a9649f5dfa42d874f92eb64acd22092b |
|
MD5 | 440e408fb0ec9543e0410a29cdc568ba |
|
BLAKE2b-256 | 3de22ac46cf938093f7c64f72a7bec2563d2091a6db778c7cd57404414d4c259 |