# Stockfish: source code

The engine files in this folder are Stockfish 19 (lite, single-threaded WebAssembly build) from stockfish.js 19.0.1
(Chess.com, LLC), redistributed unmodified. License: GNU General Public License, version 3 (see `COPYING.txt`).

## Corresponding source code

- **Source of these binaries:** stockfish.js at tag `v19.0.1`,
  https://github.com/nmrugg/stockfish.js/tree/v19.0.1
- **Mirror on this site:** [`stockfish.js-19.0.1-src.tar.gz`](stockfish.js-19.0.1-src.tar.gz), the archive of that tag
  (https://github.com/nmrugg/stockfish.js/archive/refs/tags/v19.0.1.tar.gz), served next to the engine.
- **Neural network:** the lite build embeds the network `nn-61e7af4bb97d.nnue` (named in `src/evaluate.h` of the tag,
  `EvalFileLiteName`) into the `.wasm` at build time. The file is not in the repository: the build fetches it. A copy is
  mirrored here as [`nn-61e7af4bb97d.nnue`](nn-61e7af4bb97d.nnue) (origin:
  https://tests.stockfishchess.org/api/nn/nn-61e7af4bb97d.nnue; the first 12 hex digits of its SHA-256 are
  `61e7af4bb97d`).
- Build instructions are in the README of the tag (`./build.js`, emscripten 6.0.9).
- Reference, the upstream engine: https://github.com/official-stockfish/Stockfish

## Origin of the binaries

The three files below come from the npm package [`stockfish@19.0.1`](https://www.npmjs.com/package/stockfish/v/19.0.1)
(https://registry.npmjs.org/stockfish/-/stockfish-19.0.1.tgz), copied without bundling, minifying or editing.

npm `dist.integrity`: `sha512-bTwsO4e9HAwPBKls1+szcfibmaWRNzTF20rQE/XPdB3LOSoT6XTZDr1zYwriwSRRFT5MkvqrglPmJrKEVXGnyQ==`

| File | Path in the package | SHA-256 |
| --- | --- | --- |
| `stockfish-19-lite-single.js` | `bin/stockfish-19-lite-single.js` | `ccb130d7ff29408531c47d859a49f91d59d4f482d05a53eb1a3231a4f624c91a` |
| `stockfish-19-lite-single.wasm` | `bin/stockfish-19-lite-single.wasm` | `ee4f115bdb2d32cadf96cada104a05b5ec257d7ad6f57582190b49bc71f096de` |
| `COPYING.txt` | `Copying.txt` | `0b383d5a63da644f628d99c33976ea6487ed89aaa59f0b3257992deac1171e6b` |

The source mirrors, as served here:

| File | Origin | SHA-256 |
| --- | --- | --- |
| `stockfish.js-19.0.1-src.tar.gz` | https://github.com/nmrugg/stockfish.js/archive/refs/tags/v19.0.1.tar.gz | `a18aa8a871f5265014b110b3e07804ff3637899d2e189be6ded2b99e2c17a10e` |
| `nn-61e7af4bb97d.nnue` | https://tests.stockfishchess.org/api/nn/nn-61e7af4bb97d.nnue | `61e7af4bb97d51eeeb25d322916f86513b5cd3a827ce189c98c6e31946f99e5b` |

The engine runs in your browser as a separate program (a Web Worker) and talks to the site only through the UCI
text protocol. The rest of the site is not a derivative of Stockfish.
