Another gomoku or renju manager adapting to Windows and Linux systems.
This program aims to become a gomoku or renju manager with the protocol.
When Show -> Display AI Mind (shortcut A) is enabled, while it is a computer player's turn the manager watches the engine's pipe for data groups polled in the form:
DEBUG thinking x1,y1,visits1 x2,y2,visits2 ...
Each received data group is processed as follows:
- Validation - a data group is accepted only if:
- it starts with the
DEBUG thinkingheader and every item is a validx,y,visitstriple with non-negative integer visits; - the number of items does not exceed the number of free positions left on the board;
- none of the coordinates is already occupied;
- none of the coordinates is out of the board;
- no coordinate is duplicated inside the group;
- the sum of all visits in the group is greater than zero.
- it starts with the
- Conversion - the raw MCTS
visitsare turned into decision probabilities with a numerically stabilized softmax followed by normalization. - Rendering - the coordinate-to-probability data is drawn on the board as a heatmap: more likely moves get bigger, more opaque red blobs, less likely ones blue blobs, and the top candidates are labeled with their percentages.
- Live update - the engine may poll new data groups while it is thinking; the display is refreshed every time a valid group is collected, until the AI actually makes its move.
dependencies of compiling.
- Qt5+ (REQUIRED COMPONENTS Core Gui Widgets)
- qmake or cmake
- with QtCreator
Simply build with QtCreator by double-click on qpiskvork.pro first of all.
- with cmake toolchain
Simply build with the steps as fallow:
cd qpiskvork
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make- with xmake toolchain
More easier than cmake.
cd qpiskvork
xmake config --mode=release
xmakeRegression tests of the rule engines are based on the RIF renju rules
(https://www.renju.net/rifrules/).
They are not part of the application build, turn them on with
-DQPISKVORK_BUILD_TESTS=ON.
cd qpiskvork
cmake -S . -B build -DQPISKVORK_BUILD_TESTS=ON
cmake --build build --target renju_rules_test
ctest --test-dir build --output-on-failureThe test binary can also be run directly, every case prints one line and the process returns the number of failed cases:
./build/renju_rules_test