Hacker News · Feb 14, 2026 · Collected from RSS
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. Comments URL: https://news.ycombinator.com/item?id=47014500 Points: 143 # Comments: 40
Skip to content Navigation Menu AI CODE CREATIONGitHub CopilotWrite better code with AIGitHub SparkBuild and deploy intelligent appsGitHub ModelsManage and compare promptsMCP RegistryNewIntegrate external toolsView all featuresPricing Provide feedback Saved searches Use saved searches to filter your results more quickly Sign up Appearance settings Notifications You must be signed in to change notification settings Fork 2 Star 76 Folders and filesNameNameLast commit messageLast commit dateLatest commitHistory14 Commits.gitignore.gitignoreMakefileMakefileREADME.mdREADME.mdmain.cmain.csameshi.hsameshi.hREADMEsameshi Watch Demo Video A minimal chess engine supporting a constrained subset of the game. sameshi.h: 1.95 KB core 120 cell mailbox board negamax search alpha beta pruning material only eval capture first move ordering full legal move validation (check / mate / stalemate) Notenot 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.