Show HN: Conway's Game of Chess

80 points by elesiuta 1 year ago | 21 comments
Chess, but each square also follows the rules of Conway's Game of Life.

Only your own pieces count as neighbours when deciding births/deaths.

For births, an empty square must have 3 neighbours for 2 consecutive turns.

For deaths, a piece must have <2 or >3 neighbours for 3 consecutive turns.

This is a simple proof of concept I made with python and curses.

You can play with a friend locally or over a socket connection.

Controls: Arrow keys to move the cursor, enter/space to select and move a piece, u or backspace to undo a move, r to redo a move, q or escape to quit, s to perform a move with stockfish if installed (useless since it has no knowledge of this variant), any other key to unselect a currently selected piece.

  • raldi 1 year ago
    This would really benefit from a few screenshots.
  • cypherpunks01 1 year ago
    I was just thinking of this concept except for Go instead of chess. Has anyone done this or have thoughts on how it could work?
    • EricMausler 1 year ago
      I'm just a wannabe game designer, but what comes to mind for me would be to apply an entire board Conway update every X (4?) turns.

      I think it would be a bit easier to mentally manage than having every piece on its own count

      Might give an edge to whoever goes second, because they will have more control on creating overpopulation conditions right before an update, which would offset first move advantage

      • inkcapmushroom 1 year ago
        Make it happen every 3 or 5 turns then, so that it flips back and forth.
      • elesiuta 1 year ago
        That sounds like it could be fun! The multiple turn delay I used for this may help solve some of the problems of the pieces dying immediately at the start, and for the end game where too many deaths would cause the game to drag on. Births could probably have a smaller delay than deaths. I could see this make for interesting plays by opening holes in your opponent. There's also the choice of whether births/deaths take into account all neighbours or just your own pieces.
      • ddxv 1 year ago
        Super fun idea!

        I played a few games with myself, but noticed that the "Game over" message does not stop the game? Is it supposed to keep going after the king dies?

        Also, I think some kind of legend would be very helpful. I was unsure what the lettering system meant, "w", "l", and "o". I get they are related to the rules, but was unsure what. I see in the code you have an epilog text, but I never saw that displayed when running the game, I think it would be helpful to see it while playing.

        Finally, what rule dictates which pieces are born?

        • tragomaskhalos 1 year ago
          Heh - checkmate not stopping the game was also a feature of Atari 2600 chess; always fun to carry on until the computer had no pieces left
          • elesiuta 1 year ago
            Thanks!!

            > I played a few games with myself, but noticed that the "Game over" message does not stop the game? Is it supposed to keep going after the king dies?

            Game is over when that happens, I just didn't add in the logic to terminate or restart the game, so yes you can technically keep going.

            > Also, I think some kind of legend would be very helpful. I was unsure what the lettering system meant, "w", "l", and "o". I get they are related to the rules, but was unsure what. I see in the code you have an epilog text, but I never saw that displayed when running the game, I think it would be helpful to see it while playing.

            Good point, I just updated it to display before the game starts, before it would only show when running it with --help.

            > Finally, what rule dictates which pieces are born?

            There's a queue for each player which continuously loops over the list of pieces displayed, and they're popped from the queue to eligible squares starting from row 1 for white, and starting from row 8 for black, and from left to right.

          • alexander2002 1 year ago
            Can you fork lichess from github and publish the variant if it possible. Several sites already exist on this basis (PyChess, Lidraughts, LiShogi).
            • elesiuta 1 year ago
              If there's enough interest I'll consider it, and if someone else beats me to it even better! (I just ask for appropriate credit and to check with me before starting so there's no duplication of effort)
          • zzo38computer 1 year ago
            Wouldn't it be better to use the chess notation, to enter the letters and numbers for which file and which rank you want, instead of having to move the cursor by arrows?
            • elesiuta 1 year ago
              Probably, but if I continue this I'd add it to an existing chess client, or at least use something better than curses. I was actually planning to do this before sharing, but after sitting on it for a while I figured it was better to just get it out there.

              I used curses simply because it was quick to experiment with since I had some similar code from another game I could reuse.

            • User23 1 year ago
              I started reading this hoping for an ONAG representation of Chess.

              Still pretty cool though!

              • gorenb 1 year ago
                This is a wonderful idea! Will work on this for Rust at some point.