pedantic.software --pedantic

weiqi

weiqi is a simple and elegant openGL client to play the ancient game of GO (Chinese: weiqi). It aims at being small, CLI friendly and have few dependencies.

For now, it only support playing against GTP engines and through Unix domain sockets, but in the future it will be able to connect to mainstream go servers.

You can also play over IRC with qirc which allows you to use any IRC channel as a game lobby to publish/join/play games using weiqi.

screenshot screenshot screenshot

Release builds

You can get the latest static build here:

Only linux is supported for now. Requires openGL >= 3.1 and GLFW3.

Build it yourself

Dependencies

Build

Once you have installed the dependencies, to install weiqi:

git clone https://pedantic.software/git/weiqi
cd weiqi
make install PREFIX=<path_to_install> #defaults to /usr/local

How to play

weiqi can play against local GTP engines or through a UNIX domain socket.

gnugo is a decent engine for beginner to intermediary players and is available on most linux distributions. Katago is a state of the art, CNN-based open source engine that also supports GTP, although it wasn’t tested with weiqi.

Configuring engines

The default JSON configuration is already set up to play against gnugo in 3 different modes of difficulty. If you wish to add more engines, you can edit the config file in ~/.config/weiqi/config.json, look at how gnugo is declared and add more engines the same way. They will show up in the start-up menu.

Play

Launching weiqi without any arguments will open the start-up menu which is pretty self-explanatory. However, you can jump straight into a game by using command line arguments as follow.

Against an engine

Once the engine added, to play as black against the engine as white:

weiqi -b human -w gnugo

This will start a game on the standard 19x19 board but you can set the size with the -s option, for example weiqi -s 9 to play on a 9x9 board.

Through a UNIX domain socket

You can tell weiqi to create and listen on a UNIX domain socket for a player by specifying socket:<path-to-socket> instead of an engine:

weiqi -w human -b socket:/tmp/weiqiconn

weiqi will expect another instance of weiqi to connect to it in client mode.

To connect to an already existing UNIX domain socket in client mode:

weiqi --client human <path-to-socket>

Note that you can put an engine instead of human. You can use a socket relay tool such as socat to play on the network through TCP sockets. Look up the wrapper wrappers/qitcp to do that easily.

Interface

Left click to place a stone when it is your turn, or press P to pass. Press backspace to cancel your last move (if the GTP engine allows it).

You can rotate the board by pressing right click and dragging the mouse. You can zoom in/out with the wheel. You can reset the orientation and zoom by pressing the HOME key.

Configure the interface

weiqi looks for a configuration file in $HOME/.config/weiqi/config.json or assume defaults if none is found.

The configuration file allows you to customize the look of the board, by setting the shader used, the board texture, the image used for image-based lighting and so on, as well as the default game mode, player assignation and board size.