Five chess bots, ~600 to ~1800 Elo, built on @bundbary/chess-engine. Useful when you want a chess engine and something to play against without writing a search algorithm yourself.
| Key | Name | Approx. Elo | Strategy |
|---|---|---|---|
pawnsworth |
Pawnsworth | ~600 | Random legal move with a slight bias toward captures and checks. |
bumble |
Bumble | ~900 | 1-ply greedy material with some randomness. |
roo |
Roo | ~1200 | 2-ply minimax with piece-square tables. |
nyx |
Nyx | ~1500 | 3-ply alpha-beta with capture-extension and MVV-LVA move ordering. |
quasar |
Quasar | ~1800 | 4-ply alpha-beta with quiescence search and improved evaluation. |
Each bot has metadata (name, rating, blurb) suitable for displaying in a UI, and a deterministic-with-seed mode for reproducible games.
This package is distributed via GitHub:
npm install github:Bundbary/chess-engine github:Bundbary/chess-engine-botsIt has a peer dependency on @bundbary/chess-engine; install that first.
const { Engine } = require('@bundbary/chess-engine');
const { BOTS, pickMove, evaluate } = require('@bundbary/chess-engine-bots');
const eng = Engine.newStandardGame();
// Choose a bot and ask for a move
const move = pickMove(eng, 'quasar');
eng.makeMove(move);
// Inspect bot metadata for a UI
console.log(BOTS.quasar);
// { name: 'Quasar', rating: 1800, blurb: '...', ... }
// Evaluate the current position (centipawns; positive = white better)
console.log(evaluate(eng.pos));pickMove accepts an optional second argument levelKey and a third options object:
pickMove(engine, 'nyx', { rng }); // pass a deterministic rng for reproducible gamesnpm testThe test suite covers each bot's basic move legality, mate detection, and a loose "stronger usually beats weaker" check between adjacent rating tiers.
MIT — see LICENSE.