7 ms·
One Million Chessboards
https://eieio.games/blog/one-million-chessboards/ https://eieio.games/blog/one-million-chessboards/
- amelius 1y agoThese days I keep wondering what a 4d or 3d chess board looks like.
- logtempo 1y agohttps://multiversechess.com/ https://multiversechess.com/ and someone did it!
- pavel_lishin 1y ago(Also submitted here: https://news.ycombinator.com/item?id=43822992 https://news.ycombinator.com/item?id=43822992) Neat, though I expected every individual board to have "turns" - I didn't expect that I could just pick a random board, liberate the black queen, and have her clean up every single white piece on the board without my "opponent" getting to do anything in return.
- tantalor 1y agoAgreed. It doesn't make sense. The game here is not to play chess, it is to find a board that has no other player and wipe them out as fast as possible.
- krupan 1y agoOr it's just to have fun and create stuff. Already someone made board full of rooks and called it Rooklyn, and another person made a board full of queens and called it Queens
- NooneAtAll3 1y agothe game here is to have fun :) get the most kills, make a cool shape or take a piece veeeeery far away from home
- eieio 1y agooh huh, I'm not sure why this one made it to the front page and not the link to my site! Anyway, yeah, I guess I could have gone with turns here but I thought that building a more realtime MMO thing where pieces could cross boards would be a little more interesting and novel. I also didn't feel like a version of this that was turn based would ever complete. certainly a queen can go wipe out a whole board, but the game tries to place you next to other active players when you join, which hopefully promotes some interesting counterplay to that. And I think playing chess in realtime like this against someone is pretty fun. But I understand why it might not be for everyone!
- JusticeJuice 1y agoI'd love to know what individual piece has moved the furthest from it's starting point.
- chunkles 1y agoIndividuals here on hacker news tend to gravitate towards blog posts about games rather than links to actual games, generally. Not a hard fast rule, but it's what I've observed over the years.
- eieio 1y agoI have had some success on Hacker News with similar games before[1]! But I'll certainly do a proper writeup of the tech behind this one because I think it's pretty neat. [1] https://news.ycombinator.com/item?id=40800869 https://news.ycombinator.com/item?id=40800869 for example
- stevage 1y agoAs I get older, I find I'm often more interested in reading about things than trying the thing myself. I often go straight to the comments about articles rather than even reading them.
- dang 1y agoAs you wish! We've swapped out the link from https://eieio.games/blog/one-million-chessboards/ https://eieio.games/blog/one-million-chessboards/ to your site. But I also put the blog link in the top text, so hopefully readers will look at both. (Oh and I still owe you an email. I haven't forgotten!)
- maxmcd 1y agoIf you missed it, there was a nice story around One Million Checkboxes: https://eieio.games/blog/the-secret-inside-one-million-checkboxes/ https://eieio.games/blog/the-secret-inside-one-million-check... I wonder if something similar will happen here. @eieio please open source the Go code, would be fun to poke at.
- eieio 1y agoI'll certainly open source the code! I just want the flexibility to change my rate limiting logic in the short term to counteract abuse. Happy to answer questions though!
- nodox 1y agoYes please open source. I tried something similar based one your checkboxes game! I never worked with websockets so I’m curious how you designed for scale and stopped spammers. I game was click the button 10M times and of course the script kiddies started immediately which is fun! But not my server keeps getting hammered with requests long after the initial interest. I did not know how to rate limit bots without blocking whole IP ranges.
- eieio 1y agofwiw I think the biggest single trick there is to group IPV6 addresses at the /48 or /64 level before applying rate limits (you can rate limit IPV4s on a per-ip basis). It's kind of annoying and expensive to get a bunch of IPv4s to evade limits, but it's really easy to get a TON of IPv6s. The other Big Trick I know is to persist rate limits after a client disconnects so that they can't disconnect -> reconnect to refresh their limits.
- kinduff 1y agoI love this story so much.
- eieio 1y agoAh hello! I made this :) My blog describing it is pretty sparse, sorry about that. Happy to answer any questions that folks have about the architecture. Not that it was necessary, but I got really into building this out as a single process that could handle many (10k+/sec) moves for thousands of concurrent clients. I learned a whole lot! And I found golang to be a really good fit for this, since you mostly want to give tons and tons of threads concurrent access to a little bit of shared memory.
- weiliddat 1y ago> The frontend optimistically applies all moves you make immediately. It then builds up a dependency graph of the moves you’ve made, and backs them out if it receives a conflicting update before the server acks your move. The dependency graph is between pieces you’re interacting with? Meaning if you move a queen and are trying to capture a pawn, and there’s potentially a rook that can capture your queen, those 3 are involved in that calculation, and if you moved your queen but the rook also captures your queen at the same time one of them wins? How do you determine that?
- eieio 1y agoAh yes good question! Here's some context for you. First off, the way moves work: (edit: I realized I didn't answer your question. If we receive a captured for a piece we're optimistically tracking that always takes precedence, since once a piece is captured it can't move anymore!) * clients send a token with each move * they either receive a cancel or accept for each token, depending on if the move is valid. If they receive an accept, it comes with the sequence number of the move (everything has a seqnum) and the ID of the piece they captured, if applicable * clients receive batches of captures and moves. if a move captured a piece, it's guaranteed that that capture shows up in the same batch as the move So when you make a move we: * Write down all impacted squares for the move (2 most of the time, 4 if you castle) * Write down its move token * If you moved a piece that is already tracked optimistically from a prior not-yet-acked-or-canceled move, we note that dependency as well We maintain this state separate from our ground truth from the server and overlay it on top. When we receive a new move, we compare it with our optimistic state. If the move occupies the same square as a piece that we've optimistically moved, we ask "is it possible that we inadvertently captured this piece?" That requires that the piece is of the opposite color and that we made a move that could have captured a piece (for example, if you moved a pawn up that is not a valid capturing move). If there's a conflict - if you moved a piece to a square that is now occupied by a piece of the same color, for example - we back out your optimistically applied move. We then look for any moves that depended on it - moves that touch the same squares or share the same move token (because you optimistically moved a piece twice before receiving a response). So concretely, imagine you have this state: _ _ _ _ K B _ R You move the bishop out of the way, and then you castle _ _ B _ _ R K _ Then a piece of the same color moves to where your bishop was! We notice that, revert the bishop move, notice that it used the same square as your castle, and revert that too. There's some more bookkeeping here. For example, we also have to track the IDs of the pieces that you moved (if you move a bishop and then we receive another move for the same bishop, that move takes precedence). Returning the captured piece ID from the server ack is essential, because we potentially simulate after-the-fact captures (you move a bishop to a square, a rook of the opposite color moves to that square, we decide you probably captured that rook and don't revert your move). We track that and when we receive our ack, compare that state with the ID of the piece we actually captured. I think that's most of it? It was a real headache but very satisfying once I got it working.
- NooneAtAll3 1y agoI made a Promoted-32 queen I won
- NooneAtAll3 1y agoherding around ~25 queens was also fun building fortresses (since enemy can't cross board border by capture) is also. fun.
- NooneAtAll3 1y agotheoretically there's a design for "indestructible" fortress (rhoburb, you are a genius) 1) fill corner board with pieces 2) cover the border (from inside) with pawns 3) cover the promotion square on the border with the king king can't exit the board, pawns can't walk backward to leave space, filler doesn't allow these 2 to make way --- the real holy grail that will never be achieved I fear
- chessCheeser 1y ago[dead]
- sc970 1y agohttps://onemillionchessboards.com/#4362,7 https://onemillionchessboards.com/#4362,7
- casey2 1y agoNice. A lot of people are still making flawed fortresses, just popped a black fortress with the help of tor and they were actually around and tried to defend it. So sad. muwahahah
- NooneAtAll3 1y agolooks like black side also made several https://onemillionchessboards.com/#4404,7993 https://onemillionchessboards.com/#4404,7993 https://onemillionchessboards.com/#2177,7993 https://onemillionchessboards.com/#2177,7993 https://onemillionchessboards.com/#1787,7994 https://onemillionchessboards.com/#1787,7994 and one more for white https://onemillionchessboards.com/#3765,4 https://onemillionchessboards.com/#3765,4
- pmontra 1y agoIt works well on my Android phone with Firefox. Well done.
- moffkalast 1y agoLinux and Firefox, the most brutal test of website reliability haha.
- nomilk 1y agoSomeone barricaded their king with about 40 rooks, I hopped in with a knight, and they immediately captured me (with their king), then plugged the gap with another rook so I couldn't do it again. That was amusing lol.
- darepublic 1y agoI was only able to move the black pieces. And I was able to move black consecutively on the same board. So I didn't fully understand. Are the rules being enforced or is it just updates. I enjoyed the sc2 UI when selecting pieces
- pests 1y agoIt shows your color bottom right. It’s not turn based.
- tantalor 1y agoI saw a black piece moving around very quickly. Is there a secret way to move without clicking twice?
- fredo2025 1y agoThis was a strange game. I could only move the black pieces, and I could take the opponent’s king. What next? Also, the skull button seemed to do a lot of damage and shake things up.
- mdaniel 1y ago> You can move between boards. Evidently move between boards but not capture between boards :-( It's extra weird because it's not that the movement isn't projected (e.g. queen blue lines all point correctly across board boundaries just the lines always stop at every piece on the other board, regardless of color) So, I guess as an exercise in scale, well done! As one million chess boards, caveat gamator
- eieio 1y agoI didn't like the idea of a queen on one board capturing the king on another board as her first move. And then I tried this rule and thought it created really fun counterplay when you're trying to capture a piece someone else is controlling, since you can move to a new board to be safe (and can lay traps this way). I'm sorry you don't like that decision! But I think that I stand by it.
- re 1y ago> I didn't like the idea of a queen on one board capturing the king on another board as her first move If you did want to experiment with supporting cross-board captures, an alternate way to address that could be by rotating the board 180° every other row, so that white pieces have other white pieces behind their home rank.
- CompuHacker 1y agoThere exists a player, as of today, who can capture across borders with no apparent in-between cross-color moves or delay.
- Mr_Modulo 1y agoDo the boards regenerate at some point? If not, it seems like most of the pieces will be depleted after a while.
- mtoner23 1y agonope, just like his original site, one million checkboxes https://onemillioncheckboxes.com/ https://onemillioncheckboxes.com/
- ChessviaAI 1y agoReally impressive engineering work her, especially running it all on a single server with in-memory board state and optimistic rollback. I work in chess tech, but in a very different direction (structured games, coaching, serious play). It's inspiring to see chess reimagined like this!
- gitroom 1y agoinsane seeing so many wild ideas happen at once - i keep wondering, stuff like this, what keeps people coming back and building even weirder moves over time you think
- ryukoposting 1y agoChasing people around is a lot of fun. Very enjoyable, if not for chess reasons.
- sashank_1509 1y agoI spent a good half an hour making an impenetrable fortress for black, hopefully it lasts till the end (it will unless someone in black breaks it)
- GenshoTikamura 1y agoIt's interesting how the game will end. Will it end up in a deadlock, or in a fierce duel of two power pieces with hundreds of players behind each struggling to gain control concurrently?
- babynicky 1y ago[dead]
- GenshoTikamura 1y agoAfter further reflection I guess it will be a fierce duel of bots, not humans
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- yayitswei 1y agoI predict this will evolve into bot warfare! For example, here's a snippet to advance pawns: https://gist.github.com/yayitswei/442cd5128b2dbfbd95a101b70f445183 https://gist.github.com/yayitswei/442cd5128b2dbfbd95a101b70f...
- sltkr 1y agoIt crashed for me: Uncaught TypeError: Cannot read properties of null (reading 'type') at $80b91fc9d2f468ec$export$4abc8fab4139dfcd (index.e2b13a6c.js:1:406898) at $c692b767326c99ec$var$PieceHandler.getMoveableSquares (index.e2b13a6c.js:4:4373) at index.e2b13a6c.js:4:13557 at oQ (index.e2b13a6c.js:1:60912) at o0 (index.e2b13a6c.js:1:61761) at oZ (index.e2b13a6c.js:1:60941) at Object.useState (index.e2b13a6c.js:1:72377) at Object.q (index.e2b13a6c.js:1:10352) at $a2d3bef833187ce9$export$474cd6ee072cf5a4 (index.e2b13a6c.js:4:12305) at oF (index.e2b13a6c.js:1:58673)
- NelsonMinar 1y agoThis game has gotten interesting, for instance people have figured out a single board with pieces filling the outside edges two squares deep is impervious. I love how we're seeing emergent gameplay. That's the genius in eieio's projects. He's inventing game systems that on the surface seem simple, but at this mass scale they have interesting possibilities that people discover. And they're entirely new and invented, so we have no idea what to expect until the community figures it out.
- cheekyfleek 1y agoWe definitely have some cheaters, playing as the other color. Thought I saw it last night but I know I saw it today. I think I saw vindictive use of it too, both times. One black fortress was destroyed and next thing you know the nearest white fortress found its pieces moving into the worst possible positions, often next to a waiting black bishop or rook. I'm not sure how exactly you handle the colors, but in a world where I can RDC onto a dozen computers on a half dozen continents in seconds I suppose this was inevitable.
- felipemesquita 1y agoI've achieved what seems to be a stable structure outside the edges, https://onemillionchessboards.com/#1347,3624 https://onemillionchessboards.com/#1347,3624
- cheekyfleek 1y agoThe bots are alive!