Skip to main content

Set of tools to analyze and research the game Dark Hex.

Project description


Dark Hex is the imperfect information version of the game Hex. This game has a really scarce work on it. In this repository I am including an implementation of the game along with some algorithms implemented specifically for DarkHex. Also I included the results of some of the experiments.

For details on DarkHex and any of the algorithms used as well as the experiments please check my thesis -link-.


  • pONE
  • Vanilla CFR
  • Backward Induction Best Response
  • AlphaZero Approximate Best Response
  • CFR+
  • NFSP
  • Deep CFR


The library is uploaded on Pypi and can be installed using pip. Before pip called make sure you have the following packages installed:

They are mostly required for graph drawing and setup reasons. Please make sure you have these packages installed before installing the library.

For Debian / Ubuntu

sudo apt-get install libgirepository1.0-dev gcc libcairo2-dev pkg-config gir1.2-gtk-3.0 graphviz

For MacOS

brew install gobject-introspection graphviz cairo pkg-config gtk+3 gcc

After installing the packages you can install the library using pypi.

pip install darkhex

Setup from source using pip

Installing from source would be helpful if you wanted a custom version of the library / helping with development. Make sure you have the packages above installed.

Virtual Environment

We recommend using a virtual environment for the development.

E.g. for Ubuntu or Debian:

sudo apt-get install virtualenv python3-virtualenv
virtualenv venv
source venv/bin/activate

Rest of the installation is just installing python requirements.

E.g. for Ubuntu or Debian:

# Install the libraries listed above
sudo apt-get install libgirepository1.0-dev gcc libcairo2-dev pkg-config gir1.2-gtk-3.0 graphviz

# Install the python packages
pip install -r requirements.txt

Update PYTHONPATH on your .bashrc or .zshrc file (or .venv/bin/activate)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darkhex-0.0.1.tar.gz (23.9 kB view hashes)

Uploaded source

Built Distribution

darkhex-0.0.1-py3-none-any.whl (26.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page