Metadata-Version: 2.1
Name: beth
Version: 0.2.0
Summary: Open source chess AI framework
Home-page: https://github.com/theolvs/beth
License: MIT
Author: Theo Alves Da Costa
Author-email: theo.alves.da.costa@gmail.com
Requires-Python: >=3.7.8,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: black (>=20.8b1,<21.0)
Requires-Dist: chess (>=1.4.0,<2.0.0)
Requires-Dist: comet-ml (>=3.3.3,<4.0.0)
Requires-Dist: ipykernel (>=5.4.3,<6.0.0)
Requires-Dist: ipython (>=7.20.0,<8.0.0)
Requires-Dist: ipywidgets (>=7.6.3,<8.0.0)
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
Requires-Dist: matplotlib (>=3.3.4,<4.0.0)
Requires-Dist: numpy (>=1.20.1,<2.0.0)
Requires-Dist: openpyxl (>=3.0.6,<4.0.0)
Requires-Dist: pandas (>=1.2.2,<2.0.0)
Requires-Dist: pytest (>=6.2.2,<7.0.0)
Requires-Dist: python-dotenv (>=0.15.0,<0.16.0)
Requires-Dist: seaborn (>=0.11.1,<0.12.0)
Requires-Dist: snakeviz (>=2.1.0,<3.0.0)
Requires-Dist: torch (>=1.7.1,<2.0.0)
Requires-Dist: tqdm (>=4.56.2,<5.0.0)
Requires-Dist: xlrd (>=2.0.1,<3.0.0)
Project-URL: Documentation, https://github.com/theolvs/beth
Project-URL: Repository, https://github.com/theolvs/beth
Description-Content-Type: text/markdown

# ♟ Welcome to ``beth`` documentation

![](assets/beth_home.png)

``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](mailto:theo.alves.da.costa@gmail.com). 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
```
