{"by":"datavorous_","descendants":69,"id":47014500,"kids":[47015834,47015644,47015879,47014861,47018229,47015500,47015725,47018923,47020900,47014684,47014831,47022054,47015244,47022240,47018444,47015069,47015192,47018423,47015746,47015392,47017454,47016127,47015006,47020954,47014953],"score":230,"text":"I made a chess engine today, and made it fit within 2KB.\nI used a variant of MinMax called Negamax, with alpha beta pruning. For the board representation I have used a 120-cell &quot;mailbox&quot;. I managed to squeeze in checkmate&#x2F;stalemate in there, after trimming out some edge cases.<p>I am a great fan of demoscene (computer art subculture) since middle school, and hence it was a ritual i had to perform.<p>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.<p>Then converted pooled win&#x2F;draw&#x2F;loss scores to Elo through some standard logistic formula with binomial 95% confidence interval.","time":1771076864,"title":"Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB","type":"story","url":"https://github.com/datavorous/sameshi"}