A simple UCI-compatible chess engine written in TypeScript.
- Make sure you have Node.js installed
- Clone this repository
- Install dependencies:
npm installTo build the engine:
npm run build- Build the engine first
- In Cutechess, add a new engine with these settings:
- Command:
node - Arguments:
dist/index.js - Protocol: UCI
- Working Directory: (path to your engine directory)
- Command:
- Implements the UCI protocol
- Selects moves using a basic evaluation function and minimax search
- Ready for custom move evaluation implementation
The engine is written in TypeScript and uses the chess.js library for move validation and board representation. The main logic is in src/index.ts.
To add your own move evaluation:
- Modify the evaluation logic in
src/index.ts(seeevaluatePositionandminimax) - Implement your own evaluation function or search logic
- The engine will use your evaluation to choose the best move
Note for Windows users:
Husky pre-commit hooks require a POSIX shell (like Git Bash, included with Git for Windows). If you use PowerShell or CMD, pre-commit hooks may not run. To ensure hooks work, run git commit from a Git Bash terminal or configure your editor to use Git Bash as the default terminal.