mkdir buildcd ./buildcmake .. -DCMAKE_BUILD_TYPE=Releasecmake --build . -j --config Release
Tested on the lastest version (in 27 Sep 2025) of Windows, Ubuntu, and Raspberry Pi OS.
- If
missing type specifier - int assumed. Note: C++ does not support default-interror occurs, refer to the solution at tensorflow/tensorflow#64376 (comment) - If
undefined reference to 'xnn_something'error occurs, add-DTFLITE_ENABLE_XNNPACK=OFFto the cmake configuration.
Locate the following three files at the same directory:
- renju executable (e.g. .exe)
- renju.tflite
- renju.html
Then,
- Run the renju executable
- Open
localhost:8080in the browser - Play
- As of now, error handling is poor. The code contains minimal functionality.
- The AI is not 100% perfect. It could make mistakes, placing strange moves.
- The model defeated some online Gomoku programs :

I used JAX ecosystem to create the AI model. The model is based on Alphazero. I made a big model first and distill it to a smaller one. Then, I converted it to tensorflow model. I'm going to upload the full training scripts later.
