[HN Gopher] One Million Chessboards
___________________________________________________________________
One Million Chessboards
Author : chunkles
Score : 35 points
Date : 2025-04-28 19:52 UTC (3 hours ago)
(HTM) web link (eieio.games)
(TXT) w3m dump (eieio.games)
| pavel_lishin wrote:
| (Also submitted here:
| 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 wrote:
| Agreed. 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 wrote:
| Or 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
| eieio wrote:
| oh huh, I'm not sure why this one made it to the front page and
| not the link to my site (mods / @dang, I certainly wouldn't
| mind if you swapped out the link to my blog for the link to
| onemillionchessboards.com!)
|
| 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!
| maxmcd wrote:
| If you missed it, there was a nice story around 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 wrote:
| I'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!
| eieio wrote:
| Ah 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 wrote:
| > 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?
| weiliddat wrote:
| > I use a single writer thread, tons of reader threads, and
| coordinate access to the board with a mutex
|
| On this I found Go to be at the right balance of not having to
| worry about memory management yet having decent concurrency
| management primitives and decent performance (memory use is
| especially impressive). Also did a multiplayer single server Go
| app with pseudo realtime updates (long polling waiting for
| updates on related objects).
| NooneAtAll3 wrote:
| I made a Promoted-32 queen
|
| I won
___________________________________________________________________
(page generated 2025-04-28 23:00 UTC)