Winston is a chess engine and user interface written in JavaScript
You can play against Winston here, or build an instance on your own machine using the below instructions.
You'll need node.js to build Winston on your machine.
To install all dependencies: npm install
To build an un-minimized bundle: npm run build-dev
To build a production-ready minimized bundle: npm run build-prod
To run the test suite: npm test
The Winston root directory contains the production code including html, css and the bundled JavaScript application, as well as the following subdirectories:
src
: This is where the source code livestest
: This contains the suite of tests (written using Jest)
The src
directory contains the following subdirectories:
Bitboards
: This contains a Bitboard class, which represents a 64-bit unsigned integer used for board representation, as well as utility functions for creating Bitboards and precomputed bitboards for some useful Board configurations/patterns.Move
: This directory contains a Move class that stores all necessary information about a move in 16 bits.Position
: This directory contains (you guessed it) aPosition
class. This is by far the largest and most important file in the engine, as it implements all of the board representation and move generation logic.AI
: Here live the brains of the operation. Winston uses a very simple implementation of the minimax algorithm with alpha-beta pruning. The engine uses the simplified evaluation function to evaluate board positions. It also implements a quiescence search to mitigate the horizon effect.UI
: The user interface, written using jQueryConstants
: Basically header files/namespaces for holding constants.gameUtils
: Some utility functions, mostly for converting among different square representations (e.g., algebraic, index into 64-element array, rank & file)
- More testing, especially for AI
- Implement hashing, especially for three-fold repetition draw detection, and transposition tables
- Opening/end-game book
- Iterative deepening
- History and Killer Move heuristics