3 ms·
That's perpetually true. "You're trying to do machine learning on a desktop PC?" "Hmmm, I wonder if we could use the GPU as a math engine?" But holy cow, that
by kstrauser 3y ago
That's perpetually true. "You're trying to do machine learning on a desktop PC?" "Hmmm, I wonder if we could use the GPU as a math engine?"
But holy cow, that chess game really pushed the limits!
(A side note I like to bring up occasionally: my first "computer" was "Atari BASIC" on my 2600. It had 63 bytes of RAM, I think. That didn't last long until my parents brought home a TS1000 with a luxurious 1KB of RAM.)
- jgrahamc 3y agoYes. I was thinking about that after my comment. All the folks doing machine learning optimizations, weird stuff with AVX2, etc. are the same folks who would have been stuffing chess in 4K of ROM and 128 bytes of RAM. In 1985, me and another boy from school wrote a whole reliable network transport and stuffed it into unused memory on a Research Machines 480Z. We had 128 bytes for the receive buffer so in order to do anything we'd literally ship a packet across the network containing machine code and the stub code would CALL the receive buffer to perform tasks. Executable packets!
- kstrauser 3y agoI could listen to stories like this all day long.
- jgrahamc 3y agoEnjoy: https://blog.jgc.org/2013/05/from-ground-up.html https://blog.jgc.org/2013/05/from-ground-up.html
- kstrauser 3y agoHow could you do this to me on a work day?
- kirubakaran 3y agoCall in sick. I faked a stomach ache when my parents got me Apple //c
- kstrauser 3y agoShhh! Don't give away our secrets.
- Someone 3y ago> But holy how, that chess game really pushed the limits! Having 4 kilobytes of ROM made it relatively easy, I think. If one ignores draws by repeated positions (which I think all small chess programs do), board state can easily be stored in 67 bytes or so (64 for the board proper plus four bits for whether various castlings are allowed, plus a byte indicating the square for en passant opportunity, plus a byte for counting for the 50-move rule), leaving 61 for the search algorithm. I think https://en.wikipedia.org/wiki/1K_ZX_Chess https://en.wikipedia.org/wiki/1K_ZX_Chess, with 672 bytes of code and therefore 352 bytes of RAM for storing game state _and_ screen data might be more impressive. I would have to see at what level both programs play to be sure, though.
- vikingerik 3y agoEach square of the board doesn't even need a byte, only a nibble. There are 6 piece types so that fits in 3 bits, plus one for color. If you pack two of those nibbles per byte then you can do it in 32 bytes plus the castling and en passant bits. Video Chess uses the lower nibble of 64 bytes for the board, and the upper bits of those for various other purposes. You actually could condense further than that. Build the storage as an array of pieces rather than squares, so 32 storage locations. Each of those locations needs only 6 bits to indicate that piece's current square. (And even only 5 bits per bishop, although pawns need three more bits each to handle promotion and to which piece type.) Of course, writing an engine for that data structure is much more cumbersome, since it can't look at a square to find what piece is on it, instead it has to iterate over all the pieces to find out what's on a square.
- toast0 3y ago> writing an engine for that data structure is much more cumbersome, since it can't look at a square to find what piece is on it, instead it has to iterate over all the pieces to find out what's on a square. Ignoring the move generation, this is also way harder to render the output with. The Atari 2600 has very few cpu cyles per line, and I don't know if you'd have enough time to iterate through all the pieces to see if and where they are on the current line, even given that several video lines are spent on each chess rank.