niklasf / stockfish.pexe

The strong open source chess engine Stockfish as a PNaCl module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

The strong open source chess engine Stockfish as a PNaCl module

License:GNU General Public License v3.0


Languages

Language:C++ 95.1%Language:Makefile 2.8%Language:Shell 1.4%Language:HTML 0.6%Language:Dockerfile 0.0%