board game

baghchal v1.0.1 Release

baghchal is a pure Python Bagh Chal library that supports game import, move generation, move validation, and board image rendering. It also comes with a simple engine based on the minimax algorithm and alpha-beta pruning.

Build Status


baghchal runs on python 3 . You can now install it directly from PyPI via pip:
pip install baghchal

System requirements are numpy and Pillow.

Source Code

The source code can be found in the GitHub baghchal Repository.


The baghchal package has 3 sub-modules:
  • baghchal.env (Consists of all classes and functions defining the game environment):

    • baghchal.env.Board (Board class representing Bagh Chal board)
    • baghchal.env.Bagh (Bagh class representing Bagh Player)
    • baghchal.env.Goat (Goat class representing Goat Player)
  • baghchal.lookup_table (Lookup values for baghchal.env)
  • baghchal.engine (Class for the Bagh Chal engines)

    • baghchal.engine.Engine (Simple engine based on minimax algorithm and alpha-beta pruning)

Since a proper documentation is not available as of yet, you have to directly read the source code to figure out the various functions and classes.


If you want to contribute to the library and modify various aspects of the code to make it better, your help is very welcome. You can directly open a pull request at: baghchal Pull Requests


baghchal is licensed under MIT License.


Subscribe to Soyuj Jung Basnet Blogs

Get the latest posts delivered right to your inbox