dorkhub

sameshi

a ~1200 Elo chess engine that fits within 2KB

datavorous
C1989 forksupdated 5 months ago
git clone https://github.com/datavorous/sameshi.gitdatavorous/sameshi

sameshi

Watch Demo Video

A minimal chess engine supporting a constrained subset of the game.

sameshi.h: 1.95 KB

The readable version of the code can be found here.

core

  1. 120 cell mailbox board
  2. negamax search
  3. alpha beta pruning
  4. material only eval
  5. capture first move ordering
  6. full legal move validation (check / mate / stalemate)

Note

not implemented: castling, en passant, promotion, repetition, 50-move rule.

strength

~1170 Elo (95% CI: 1110-1225)
240 games vs stockfish (1320-1600 levels)
fixed depth 5, constrained rules, max 60 plies.

more like this

cc65-Chess

Portable chess game in C. Commodore 64, Apple 2, Atari, Oric, Commander X16, curses terminal, etc.

C50

search

search projects, people, and tags