Earlier quoted context omitted.
I have not. Can you please tell me why?
He's just trying to trick HN readers to join chess clubs.
Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
41–50 of 78 posts
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#42Earlier quoted context omitted.
I have not. Can you please tell me why?
Not really. You have to see it for yourself. (Partial answer, 2kB is a very small fraction of what we'd like to think counts as human.)
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#43Codex or Claude Code?
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#44Earlier quoted context omitted.
It's wild to think that 4096 bytes are sufficient to play chess on a level beyond anything humans ever achieved. Makes you think what other difficult tasks are out there that take even highly gifted humans years or decades to master, but a superior algorithm would more or less fit into one of those big QR code formats. These things always make me think back to Westworld season 2, where the finale revealed that human…
Well, one of the most fundamental algorithms for building a chess AI is minimax [1] (or variants like negamax), and that’s been around for close to a century. The key difference is that as compute power and available RAM have grown, it’s become possible to search much deeper and evaluate far more plies. So while 4k is still very impressive for the code base, it comes with a significantly larger runtime footprint. [1]…
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#45Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#46Earlier quoted context omitted.
maybe for very low ratings it's plausible? 1 elo per byte might happen in a tiny range but at a useful strength it would break fast, that's what i think
What's the snallest possible program that accepts a chess board state and prints any legal move? True randomness may only have a couple hundred ELO, but then, that's pretty big for golf
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#47This is very cool and having stalemate is nice, however how much space would it take to implement the full ruleset? As you write: not implemented: castling, en passant, promotion, repetition, 50-move rule - those are all required to call the game being played modern chess. I could see an argument for skipping repetition and 50-move rule for tiny engines, but you do need castling, en pessant and promotion for pretty m…
2KB of JavaScript with castling, en passant, promotion, search and even a GUI
326 bytes of assembly, without the special rules
I don't think the author has a UCI-compliant one, but it should be easier than the GUI. There are forks of the JS one that might do it.
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#48Earlier quoted context omitted.
There is a TCEC category for 4k engines. The top ones are ~3000 Elo.
It's wild to think that 4096 bytes are sufficient to play chess on a level beyond anything humans ever achieved. Makes you think what other difficult tasks are out there that take even highly gifted humans years or decades to master, but a superior algorithm would more or less fit into one of those big QR code formats. These things always make me think back to Westworld season 2, where the finale revealed that human…
Now if you had a very good chess program running in very constrained (dynamic/RAM) memory, then that'd be partially more revealing. From a cursory search there's a 1800 ELO engine for the C64, which seems very impressive but very far from the best human players.
I'd be interested to see a curve of ELO x Avaliable RAM for the best chess engines (up to given RAM), and how that compares to other games and activities.
On RAM vs ROM (program size) memory, I think at a high level dynamic memory helps you keep track of search paths in a large tree search, saving you some computation. Program size tends to enable improving the effectiveness of your search heuristic, as well as pre-computing e.g. initial and final game optimal moves (potentially saving arbitrarily much compute). I like thinking about those things because I think the search paradigm is pretty informative of computation (and even intelligence) in general. Almost every problem is basically some kind of heuristic search in some kind of space. And you tend to get better at things by refining your heuristics (usually through some experimental training process or theoretical insight), considering more options, exploring deeper consequences, etc..
I think what really defines humans isn't really our ability to solve problems or play chess well etc. (although that's extremely useful and also enjoyable most of the time), it's really our emotions and inner world. We are not really Thinking Machines in essence, we're Feeling Machines most significantly. The thinking part is a neat instrumental part :) We can delegate thinking to machines but what we cannot extinguish is feeling or the human "soul", because that is the source of all meaning.
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#49How many games did you have to throw away because stockfish wanted to castle? Or did you force stockfish to not castle? Castling seems like such a frequent move it is hard to draw any conclusions about the strength of an engine that does not support it.
zero games were thrown away for castling, because i forced stockfish not to castle (and not to play en passant/promotion) by filtering legal moves and only giving those filtered moves via root_moves so every game stayed in the same no castling variant and you're right, this rating is for that constrained variant, not full chess.
Re: Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB
#50Good job! I love how you obfuscated your code, really in a spirit of FOSS!
Oh well, the file initially looked like https://github.com/datavorous/sameshi/blob/7ab4e47144f96becd... It is hideous now!
Your code is useless to anyone that wants to contribute, or maybe make something better by improving on the idea.