Skip to content

MikeyBeez/MikeyChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MikeyChess

A single-file chess app that runs completely offline in your browser — play against Stockfish at eight difficulty levels and get full post-game analysis. No account, no sign-up, no server, and no internet connection required.

Built because the free online sites started rate-limiting heavy use. This runs entirely on your own machine.

Run it

Download chess.html and double-click it (or open it in any modern browser: Chrome, Firefox, Safari, or Edge). That's it — there is nothing to install and no network connection is used at any point. The chess engine and rules library are embedded directly inside the file.

Features

  • Play vs Stockfish, levels 1–8 — strength curve modeled on lichess's levels, from roughly 800 Elo up to 2400+. Level 4 is the default and is remembered between sessions.
  • Click or drag — move pieces by clicking (with legal-move dots) or by dragging them to the target square. Last-move and check highlighting, pawn promotion picker, board flip.
  • Appearance — choose from 8 board color themes and 5 piece styles (three embedded vector sets plus unicode symbols and letters). Your choice is remembered between sessions.
  • Game management — play as White, Black, or random; takeback; resign; copy the move list or the full PGN to your clipboard.
  • Opening detection — the opening name (Ruy López, Sicilian Najdorf, etc.) is shown and updated as you play.
  • Move navigation — step through the game with the on-screen buttons or the arrow keys.
  • Post-game analysis — runs Stockfish over every position and gives you:
    • a win-probability Accuracy % for each side (the same style of metric lichess reports), plus average centipawn loss,
    • an evaluation graph across the whole game,
    • per-move inaccuracy / mistake / blunder marks (?!, ?, ??) in the move list,
    • the engine's best move shown for any move you click.

How it works

The whole app is one self-contained HTML file. Two libraries are embedded inside it (base64-encoded) so nothing is ever fetched from the network:

  • chess.js — move generation and rules (BSD license)
  • Stockfish — the Stockfish 10 engine, asm.js build, compiled to JavaScript (GPL v3)

The original, un-embedded copies of these libraries are kept in the build/ directory, and build.py-style assembly is done by the build step described below.

Building

chess.html is generated by embedding the libraries in build/ into the source template. To rebuild after editing:

  1. Ensure build/chess.min.js and build/stockfish.asm.js are present.
  2. Re-run the embedding step (base64-encode each file and substitute it into the template's __CHESS_JS_B64__ / __SF_ASM_B64__ placeholders).

License

This project bundles the Stockfish engine, which is licensed under the GNU General Public License v3. Because Stockfish is embedded in chess.html, the distributed combination is covered by the GPL v3 — see stockfish.org and the stockfish.js project for the engine and its corresponding source. The complete engine source as distributed here is in build/stockfish.asm.js.

The original application code in this repository (everything other than the bundled libraries) is additionally made available by the author under the MIT License — see LICENSE. chess.js is under the BSD license.

The bundled piece sets (Cburnett, Merida, Alpha) come from the lichess project and are used under their respective free licenses; see lichess's COPYING for details.

About

Single-file browser chess vs Stockfish (levels 1-8) with full game analysis. No account needed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages