Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Stockfish

From Repertoire Builder

Available in: Builder, Library, Practice, Tools

Stockfish Card

The Stockfish card shows evaluations for the current board position, giving you instant insight into the engine’s best moves. It is powered by Stockfish.js 17.1, the web-enabled version of Stockfish, allowing you to run advanced engine analysis directly in your browser without any external setup.

You can select both the desired analysis depth and the number of principal variations (PVs) returned by Stockfish, letting you control how detailed or broad the engine’s output is. As Stockfish runs, the depth and MNps (million nodes per second) update in real time, providing a live view of the engine’s search progress and speed. Analyzed positions are also cached locally in your browser, allowing you to revisit any previously analyzed position instantly without needing to rerun the engine.

Each row displays only the first few moves of a variation; clicking the ▼ (down arrow) on the right expands the full line for deeper inspection.

You can interact directly with the move list:

  • Reuse existing repertoire annotations within your library items
  • Maintain consistency between your repertoire and library
  • Speed up the process of analyzing and commenting on positions
  • Instantly copy repertoire annotations into your current game or analysis


This feature helps you:

  • + Analyze any position quickly with Stockfish’s strongest available evaluations
  • + View real-time depth and performance (MNps) as the engine searches
  • + Expand and explore entire engine lines interactively
  • + Add engine-recommended moves and analysis directly into your repertoire or library
  • + Instantly revisit cached positions without re-running the engine
  • + Control the depth and detail of analysis for efficient study

Setting Up Local Stockfish

To leverage the full power of your own computer, you can connect Chessboard Magic to a locally running chess engine. While the built-in Stockfish.js engine provides excellent performance, using your own hardware gives you an extra boost in speed, depth, and consistency — especially for large or detailed repertoire analyses.

Overview

To allow the Repertoire Builder (and other tools) to communicate with a local UCI engine, you will need to install a lightweight proxy application that bridges your browser and engine. The CBM Engine Proxy is a WebSocket bridge that connects Chessboard Magic directly to any UCI-compatible chess engine such as Stockfish, Berserk, or Komodo.

This allows Chessboard Magic to run a local chess engine on your computer and communicate with it through the browser in real time.

Requirements

  • Python 3.9+ installed on your system
  • A UCI-compatible engine binary, such as:
    • Stockfish
    • Berserk
    • Komodo

Setup Instructions

  1. Install Python 3.9+ and make sure the command python (or python3 on macOS/Linux) is available in your terminal.
  2. Download the files CBMEngineProxy.py and config.json from the GitHub repository.
  3. Save both files together in the same folder.
  4. Open a terminal in that folder and install the required dependency: pip install websockets
  5. Edit config.json to point to your engine binary and configuration.


Windows Example:

{
  "engine_path": "C:/Users/USERNAME/Downloads/stockfish/stockfish.exe",
  "host": "127.0.0.1",
  "port": 9480,
  "logging": true
}

macOS Example:

{
  "engine_path": "/Users/USERNAME/Downloads/stockfish/stockfish",
  "host": "127.0.0.1",
  "port": 9480,
  "logging": true
}
Note: engine_path: Full path to your UCI engine binary (.exe on Windows, no extension on macOS/Linux). host: Usually leave as 127.0.0.1. port: Must match the connection port used by Chessboard Magic. logging: Set to true for debugging output, or false for silent mode

Running the Proxy

Start the proxy by running:

python CBMEngineProxy.py

If successful, you will see:

✅ Engine Proxy running on ws://127.0.0.1:9480

Using with Chessboard Magic

  1. Launch Chessboard Magic in your browser.
  2. Open the Stockfish card.
  3. Click on the Stockfish label and select Local Stockfish.
  4. Configure the following parameters:
    • URL: http://127.0.0.1:9480 — normally this does not need to change.
    • Hash (MB): 4096 — sets how much memory the engine can use.
    • Threads: 12 — defines how many CPU threads are used.
    • Syzygy Path: If you have tablebases installed, set this to the directory path of your Syzygy files.


Once connected, Chessboard Magic will use your local engine for analysis, with results appearing directly in the Stockfish card.

Stopping the Proxy

Press Ctrl + C in the terminal window to stop the proxy server.

Building a Standalone Executable (Optional)

You can package the proxy into a standalone executable so it runs without requiring Python to be installed.

Windows

pip install pyinstaller
pyinstaller --onefile CBMEngineProxy.py

The executable will appear in the `dist/` folder as `CBMEngineProxy.exe`. Place `config.json` in the same folder and double-click to run it.

macOS

pip install pyinstaller
pyinstaller --onefile CBMEngineProxy.py

The standalone app will appear in the `dist/` folder as `CBMEngineProxy`. Place `config.json` alongside it and run:

./CBMEngineProxy

Once configured, Chessboard Magic will communicate seamlessly with your local engine, giving you faster, more flexible, and fully offline Stockfish evaluations.