# Bundled AI and corresponding source

The unchanged `nosimd` executable is from
[usumerican/yaneuraou-suisho-petite](https://github.com/usumerican/yaneuraou-suisho-petite/tree/4568f76268128a65c5936d15a2188c8f64f71847),
commit `4568f76268128a65c5936d15a2188c8f64f71847`.
Its USI identification is `YaneuraOu NNUE KP256 7.63 32WASM TOURNAMENT`.
The upstream repository and distribution use GNU GPL version 3; the complete license is in `LICENSE`.
Keep all upstream copyright notices in the source archive.

It includes SuishoPetite (20211123), the 893,917-byte evaluation data embedded in
`source/eval/nnue/embedded_nnue.cpp`. No separately licensed book or additional learned
network has been added. The original bundle is
[SuishoPetite-YaneuraOu-v7.6.3-wasm.zip](https://github.com/mizar/YaneuraOu/releases/download/v7.6.3/SuishoPetite-YaneuraOu-v7.6.3-wasm.zip).
The original bundle's `source.tar.xz` is included unchanged under `source/`.
It contains the engine and embedded network. The port's `script/Makefile`, `script/usi.cpp`,
`script/build.sh`, README and Dockerfile are also included unchanged.

Download `corresponding-source.zip` for the complete rebuild inputs, including the license.
The only additional build file is `Dockerfile.offline`, which uses the supplied source
archive instead of downloading the original release again. Emscripten is pinned to 3.1.24.

From the extracted archive directory in PowerShell:

    docker build -f Dockerfile.offline -t aether-yaneuraou-build .
    docker run --rm -v "${PWD}:/workspace" aether-yaneuraou-build bash /workspace/script/build.sh nosimd

The output is `dist/nosimd/yaneuraou.js`, `yaneuraou.wasm`, and `yaneuraou.worker.js`.
The vendored executables were obtained from the pinned port; this integration does not
claim a newly reproduced byte-identical build. Their hashes and sizes are in `manifest.json`.

Application integration source is shipped as readable JavaScript in `dist/ai/`,
`dist/game-controller.mjs`, `dist/app.js`, `dist/match.mjs` and `dist/rules.mjs`.
The complete project source is managed in [Soiya-kun/shogi](https://github.com/Soiya-kun/shogi).
The application-created opening positions are generated by `scripts/build-openings.mjs`.
Source and license availability for a public distribution must be retained; separating a
Worker is not a claim about the scope of GPL for the combined application.

Serving requires `Cross-Origin-Opener-Policy: same-origin`,
`Cross-Origin-Embedder-Policy: require-corp`, and a secure origin (localhost or HTTPS).
The local server sets them and serves `.wasm` as `application/wasm`.
`dist/_headers` supplies the equivalent configuration for static hosts supporting that format.
The engine fails visibly when isolation is unavailable; there is no hidden random fallback.
