lichess-org/stockfish.js
소개
The strong open source chess engine Stockfish compiled to JavaScript and WebAssembly using Emscripten
게임 및 에뮬레이션측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalstockfish.js
The strong open source chess engine Stockfish compiled to JavaScript and WebAssembly using Emscripten. See it in action for local computer analysis on lichess.org.
[!IMPORTANT] Maintained with bugfixes to keep supporting older browsers, but active development is happening on https://github.com/lichess-org/stockfish-web
Releases
About 1.4MB uncompressed, 250 KB gzipped.
Building
Install Emscripten and uglifyjs, then:
./build.sh
Or using Docker:
docker run --user $(id -u):$(id -g) --volume $(pwd):/home/builder/stockfish.js:rw niklasf/emscripten-for-stockfish
Usage
var wasmSupported = typeof WebAssembly === 'object' && WebAssembly.validate(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
var stockfish = new Worker(wasmSupported ? 'stockfish.wasm.js' : 'stockfish.js');
stockfish.addEventListener('message', function (e) {
console.log(e.data);
});
stockfish.postMessage('uci');
Changes to original Stockfish
- Expose as web worker.
- Web workers are inherently single threaded. Limit to one thread.
- Break down main iterative deepening loop to allow interrupting search.
- Limit total memory to 32 MB.
- Disable Syzygy tablebases.
- Disable benchmark.
Acknowledgements
Thanks to @nmrugg for doing the same thing with Stockfish 6, to @ddugovic for his multi-variant Stockfish fork and to the Stockfish team for ... Stockfish.
관련 프로젝트 살펴보기
불러오는 중…