# Rapfi engine (Heaven difficulty only)

This directory contains a **standalone** WebAssembly build of
[Rapfi](https://github.com/dhbloo/rapfi), used only by the Gomoku **Heaven**
difficulty via a dedicated classic Worker (`worker.js`).

## License

Rapfi is free software under the **GNU General Public License v3** (see
`COPYING.txt`). Authors: see `AUTHORS.txt`.

MeTool loads this worker as a **separate program** and talks to it with the
Piskvork text protocol (board → move). The rest of the MeTool website is **not**
relicensed under GPL solely because this worker is present.

## Corresponding source

- Upstream project: https://github.com/dhbloo/rapfi  
- Network / weight repo: https://github.com/dhbloo/rapfi-networks  
- Web app that publishes similar WASM builds: https://github.com/dhbloo/gomoku-calculator  

The binaries here (`rapfi-single.js`, `rapfi-single.wasm`, `rapfi.data`) are the
**fallback / single-thread** build mirrored from
`https://www.gomocalc.com/build/fallback/` (retrieved 2026-08-08) for Freestyle
play without the full NNUE weight package.

To regenerate an equivalent WASM build from source, follow Rapfi’s
“Build for WebAssembly” section in its README (Emscripten + CMake), then place
the outputs next to this `NOTICE.md`.

`worker.js` in this folder is a thin MeTool protocol bridge for that engine; if
you distribute modified copies of this directory, keep GPL notices and provide
source for any Rapfi changes you make.
