/stockfish.pexe

The strong open source chess engine Stockfish as a PNaCl module

Primary LanguageC++GNU General Public License v3.0GPL-3.0

stockfish.pexe

npm version Build Status No Maintenance Intended

A multi-threaded Stockfish that runs in Chrome using PNaCl. Also see stockfish.js as a fallback.

Unmaintained, since PNaCl is deprecated and will be replaced by WebAssembly.

About 500 KB uncompressed, 400 KB gzipped.

Usage

See nacl/index.html for an example.

Building

  1. Install the NaCl SDK and setup an environment variable NACL_SDK_ROOT=path/to/nacl_sdk/pepper_49
  2. cd nacl
  3. make

Running

Changes to original Stockfish

  • Replace src/main.cpp with src/nacl.cpp.
  • Turn UCI::loop into UCI::command.
  • Remove Syzygy tablebases.
  • Recover from (all but minimum) transposition table allocation failures.

Acknowledgements

Thanks to @exoticorn for providing a PNaCl module for the older Stockfish 5.