# Sameshi – a ~1200 Elo chess engine that fits within 2KB

I made a chess engine today, and made it fit within 2KB. I used a variant of MinMax called Negamax, with alpha beta pruning. For the board representation I have used a 120-cell "mailbox". I managed to squeeze in checkmate/stalemate in there, after trimming out some edge cases. I am a great fan of d…

- **Page:** https://magpie.gallery/i/sameshi-a-1200-elo-chess-engine-that-fits-within-2-c10h
- **Type:** Link to an idea elsewhere
- **Category:** Games
- **Tags:** chess, engine, negamax, demoscene

## Source

Web · datavorous_: Sameshi – a ~1200 Elo chess engine that fits within 2KB

- **Original:** https://news.ycombinator.com/item?id=47014500

> I made a chess engine today, and made it fit within 2KB. I used a variant of MinMax called Negamax, with alpha beta pruning. For the board representation I have used a 120-cell "mailbox". I managed to squeeze in checkmate/stalemate in there, after trimming out some edge cases. I am a great fan of demoscene (computer art subculture) since middle school, and hence it was a ritual i had to perform. For estimating the Elo, I measured 240 automated games against Stockfish Elo levels (1320 to 1600) under fixed depth-5 and some constrained rules, using equal color distribution. Then converted pooled win/draw/loss scores to Elo through some standard logistic formula with binomial 95% confidence interval. https://github.com/datavorous/sameshi

## GitHub projects

- https://github.com/datavorous/sameshi

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
