All Projects → lichess-org → stockfish.js

lichess-org / stockfish.js

Licence: GPL-3.0 license
The strong open source chess engine Stockfish compiled to JavaScript and WebAssembly using Emscripten

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to stockfish.js

pgn-tactics-generator
Generate chess puzzles / tactics from a pgn file
Stars: ✭ 83 (-40.71%)
Mutual labels:  chess, lichess, stockfish
lila-gif
Webservice to render Gifs of chess positions and games, and stream them frame by frame
Stars: ✭ 63 (-55%)
Mutual labels:  chess, lichess
chess-puzzle-maker
Creates chess puzzles from chess games and positions
Stars: ✭ 34 (-75.71%)
Mutual labels:  chess, stockfish
should-i-play-f6
Chess project to analyze the statistical effect of playing f3 (as white) or f6 (as black) on the outcome of the game.
Stars: ✭ 15 (-89.29%)
Mutual labels:  chess, lichess
lila-tablebase
Tablebase server
Stars: ✭ 51 (-63.57%)
Mutual labels:  chess, lichess
chessops
Chess and chess variant rules and operations in TypeScript
Stars: ✭ 66 (-52.86%)
Mutual labels:  chess, lichess
chess-openings
An aggregated data set of chess opening names
Stars: ✭ 223 (+59.29%)
Mutual labels:  chess, lichess
chess
An R package to read, write, create and explore chess games
Stars: ✭ 60 (-57.14%)
Mutual labels:  chess, stockfish
chessground
Chessground React Wrapper
Stars: ✭ 15 (-89.29%)
Mutual labels:  chess, lichess
bot-o-tron
Try out lichess' bot interface
Stars: ✭ 36 (-74.29%)
Mutual labels:  chess, lichess
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞
Stars: ✭ 10,315 (+7267.86%)
Mutual labels:  chess, lichess
stockfish-chess-web-gui
Responsive chess web GUI to play against the Stockfish 10 chess engine. Multiple web GUI implementations have also been included.
Stars: ✭ 21 (-85%)
Mutual labels:  chess, stockfish
liground
A free, open-source and modern Chess Variant Analysis GUI for the 21st century
Stars: ✭ 41 (-70.71%)
Mutual labels:  chess, lichess
liPGN
This program uses the lichess REST API to retrieve all the games of a user and transform them into a big PGN file that you can then import into your favourite game analysis tool (ie. scid)
Stars: ✭ 14 (-90%)
Mutual labels:  chess, lichess
lila-openingexplorer
Opening explorer for lichess.org that can handle all the variants and billions of unique positions
Stars: ✭ 89 (-36.43%)
Mutual labels:  chess, lichess
ChineseChessOL
Online Heads-Up version of Chinese Chess built with Unity 3D
Stars: ✭ 15 (-89.29%)
Mutual labels:  chess
chessboard-recognizer
Uses neural networks to extract chess positions from images
Stars: ✭ 59 (-57.86%)
Mutual labels:  chess
Header-Only-GL-Helpers
A collection of header files that can ease OpenGL programming
Stars: ✭ 25 (-82.14%)
Mutual labels:  emscripten
wasm-raytracer
a performance comparison of a simple raytracer in JavaScript, asm.js, WebAssembly, and GLSL
Stars: ✭ 158 (+12.86%)
Mutual labels:  emscripten
cm-pgn
Parse and create PGNs (Portable Game Notation for chess games)
Stars: ✭ 16 (-88.57%)
Mutual labels:  chess

stockfish.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.

npm Passively maintained

Maintained with bugfixes to keep supporting older browsers, but active development is happening on stockfish.wasm.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].