Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
Installing

Xiangqigame can be installed natively (preferably in a virtual environment or conda environment), or in a Docker container.

Native Installation

Requirements

  • A C++ compiler that supports the C++ 20 standard
  • cmake 3.21+
  • Python 3.10+
  • Anaconda or Miniconda (recommended)

Procedure

git clone https://github.com/duanegoodner/xiangqigame
cd xiangqigame
conda create --name xiangqigame python=3.10 -y
conda activate xiangqigame
pip install .
play_xiangqi

The above commands clone a copy of xiangqigame to the local machine, create and activate a conda environment, install xiangqigame into the newly created conda environment, and confirm the installation by running play_xiangqi. This procedure is demonstrated in the following terminal recording.

Native Installation Demo

Docker Installation

Requirements

  • Docker 18.06+
  • Docker Compose 1.25.0+

Procedure

For initial Docker set up and installation, run the following:

git clone https://github.com/duanegoodner/xiangqigame
cd xiangqigame/.devcontainer
docker compose build
docker compose up -d
docker exec -it cpyenv /bin/zsh # This command will take you to a prompt inside container 'cpyenv'
pip install .

Stopping the Docker Container

When you are done using the cpyenv container, run exit from the terminal prompt in the container to exit the container get back to a local terminal prompt in the ./xiangqigame/.devcontainer directory. Then run docker compose down to stop the container.

Re-Starting the Docker Container

To re-start the container, run the following from the xiangqigame/.devcontainer directory:

docker compose build # not necessary if cpyenv exists, but will execute very fast in that case
docker compose up -d
docker exec -it cpyenv /bin/zsh # This command will take you to a prompt inside container 'cpyenv'
pip install .

Demo

The full docker install procedure, including container shutdown, is demonstrated in the following terminal recording.

Previous Next
Home Running