Live data from Hacker News

Show HN: Chess Twist

polyreplay.com

11–20 of 38 posts

Re: Show HN: Chess Twist

#11
post #9
post #5

Very cool! Looking forward to playing it. I suggest to minimize visual clutter, because any new player's brain will be overloaded trying to figure out a board, and less is sometimes more. I'd remove the forward direction triangles where they can be unambiguously inferred from the baseline. A lower grain contrast wood texture might be a good idea too. You mentioned you sometimes use five tile colours but you can proba…

Yes, minimizing clutter was a priority, and still is. I've tried to avoid those arrows for a long time, but the pawn movements wasn't clear enough without them. And I agree it's not the optimal display. Displaying them on some tiles only is something I have not thought of. My first reaction is that it may feel harder to read, as tiles with an arrow may look like they would act differently than those without? We may i…

The five-colour theorem was first proven in the late 19th century. The known proof of the four-colour theorem is non-surveyable. There's probably no small mistake in your implementation, and the solution you should go with is unlikely to be a fully-general algorithm. (I'd suggest starting from the border on the outside, greedily filling in as many choices as are forced (up to isomorphism), then randomly choosing a candidate breadth-first or depth-first until you've found a four-colour solution.)

Re: Show HN: Chess Twist

#12
post #9

Earlier quoted context omitted.

Yes, minimizing clutter was a priority, and still is. I've tried to avoid those arrows for a long time, but the pawn movements wasn't clear enough without them. And I agree it's not the optimal display. Displaying them on some tiles only is something I have not thought of. My first reaction is that it may feel harder to read, as tiles with an arrow may look like they would act differently than those without? We may i…

The five-colour theorem was first proven in the late 19th century. The known proof of the four-colour theorem is non-surveyable. There's probably no small mistake in your implementation, and the solution you should go with is unlikely to be a fully-general algorithm. (I'd suggest starting from the border on the outside, greedily filling in as many choices as are forced (up to isomorphism), then randomly choosing a ca…

actually, I realise now that the implementation I shared in my previous comment is a generic one. At some point, I decided to make a variation of it, specialised for this board. The reason wasn't the number of colors, though, it was to have better control of the colors of the bottom and top rows.

And I also realise that, contrary to what I said above, I do not set the colors on the left and right sides. So that will be an easy modification.

After that, I do go breadth first. But I do so by looking at all neighbours of the current tile, simply by taking them in the order given by my internal graph. Instead I should just take those that are connected to another tile that has been already visited.

So thank you for those advice, that's super helpful, I really appreciate. I had to look up "non-surveyable" as well, I'm learning a lot here. That said, I'm having a hard time understanding "as are forced (up to isomorphism)", is that something you could clarify?

Re: Show HN: Chess Twist

#13
post #3

So in this version the bishops can change the color they can move on? The corners with 3 and 5 neighbour have a special mark. What does that mean? Can you share how the board is generated or it's part of the secret special sacuce? I think a blog post about the generation of the borard with a few nice graphics can get a lot of traction here.

> So in this version the bishops can change the color they can move on? It's more that black and white colors don't apply anymore in a grid like this. Since there will be places where more than 4 tiles can share a same corner, you need more than 2 colors. So here, colors are only used for cosmetic reason, to differentiate the tiles from one another. That said, I've tried to keep the essence of classic chess where I c…

> I need 3 or 4 colors, and in some cases I need 5

4 should be enough https://en.wikipedia.org/wiki/Four_color_theorem, but the alternating color in the border may be a problem. It's an interesting variant for nerdsniping. I guess it's possible to find a 4 color version but it may need too much backtraking.

---

> I invite you to try the tutorial that opens up when you load the demo

I didn't notice. It's linked at the top. You may add another link at the bottom for people like me that skip the headers. I'll try later.

---

About the new strategies, in human vs computer the knight forks are probably more OP than a bunch of blinkstackers with infinite APM. I'd trade a rock or even a queen for a knight just to give my brain some rest.

Re: Show HN: Chess Twist

#14
post #10
post #7

Pawns should probably have a piece that indicates their orientation. As far as I can tell it is impossible to discern which way a pawn moves without querying the ui.

There are those little black and white arrows on each tile, which indicate which way is forward for a specific player. Does that help? Or maybe you saw them and you mean something else? Interestingly, someone here mentioned that those arrows add a lot of clutter, and someone else on twitter said they only noticed them after I pointed them out. It's interesting how people perceive things like that so differently.

It might be worth considering just changing the rules for the pawn to deal with this. It's hard to tell what it means to move "forward" on a board like this, even after understanding the indicators.

Maybe pawns could just move horizontally/vertically and attack diagonally, regardless of color?

Re: Show HN: Chess Twist

#15
post #3

Earlier quoted context omitted.

> So in this version the bishops can change the color they can move on? It's more that black and white colors don't apply anymore in a grid like this. Since there will be places where more than 4 tiles can share a same corner, you need more than 2 colors. So here, colors are only used for cosmetic reason, to differentiate the tiles from one another. That said, I've tried to keep the essence of classic chess where I c…

> I need 3 or 4 colors, and in some cases I need 5 4 should be enough https://en.wikipedia.org/wiki/Four_color_theorem , but the alternating color in the border may be a problem. It's an interesting variant for nerdsniping. I guess it's possible to find a 4 color version but it may need too much backtraking. --- > I invite you to try the tutorial that opens up when you load the demo I didn't notice. It's linked at th…

Yes, someone else here mentioned the four color theorem, and that gave me a few ideas to improve that.

For the demo, it actually opens up when you start the game. But it's possible to skip it, which is totally fair, I should have expected that. I'll make the button more obvious, you're absolutely right that it's too hidden at the moment.

> knight forks are probably more OP than a bunch of blinkstackers with infinite APM

There are too many words I don't understand here to infer your meaning. The knight forks I know are when a knight threatens the king and another piece, but it looks like you mean something else. It could be related to what I mentioned with multiple diagonals, although that does not affect knights. And OP is probably not original poster. And I don't know what bindstackers or APM are (maybe Actions Per Minute?).

But it does look like you know more about chess than I do, so I'd love to absorb that knowledge.

Re: Show HN: Chess Twist

#16
post #10

Earlier quoted context omitted.

There are those little black and white arrows on each tile, which indicate which way is forward for a specific player. Does that help? Or maybe you saw them and you mean something else? Interestingly, someone here mentioned that those arrows add a lot of clutter, and someone else on twitter said they only noticed them after I pointed them out. It's interesting how people perceive things like that so differently.

It might be worth considering just changing the rules for the pawn to deal with this. It's hard to tell what it means to move "forward" on a board like this, even after understanding the indicators. Maybe pawns could just move horizontally/vertically and attack diagonally, regardless of color?

That's an interesting suggestion.

The pro is that it will simplify things, remove visual and cognitive clutter.

The con is that we stray away from classic chess rules, which I'd still like to avoid as much as possible.

I will think about it. It may be possible to allow as an option.

Re: Show HN: Chess Twist

#17
post #10
post #7

Pawns should probably have a piece that indicates their orientation. As far as I can tell it is impossible to discern which way a pawn moves without querying the ui.

There are those little black and white arrows on each tile, which indicate which way is forward for a specific player. Does that help? Or maybe you saw them and you mean something else? Interestingly, someone here mentioned that those arrows add a lot of clutter, and someone else on twitter said they only noticed them after I pointed them out. It's interesting how people perceive things like that so differently.

The first image shows a rook traveling a path different from the one shown in the arrows though? Why would the definition of forward be different for a pawn vs rook?

Re: Show HN: Chess Twist

#18
post #12

Earlier quoted context omitted.

The five-colour theorem was first proven in the late 19th century. The known proof of the four-colour theorem is non-surveyable. There's probably no small mistake in your implementation, and the solution you should go with is unlikely to be a fully-general algorithm. (I'd suggest starting from the border on the outside, greedily filling in as many choices as are forced (up to isomorphism), then randomly choosing a ca…

actually, I realise now that the implementation I shared in my previous comment is a generic one. At some point, I decided to make a variation of it, specialised for this board. The reason wasn't the number of colors, though, it was to have better control of the colors of the bottom and top rows. And I also realise that, contrary to what I said above, I do not set the colors on the left and right sides. So that will…

Let's say your colours are black, white, green and purple. So far, you've managed to use only black and white, but you've reached a node with both black and white neighbours. You need (are forced) to choose a different colour! You could choose green, or purple ­– and whatever solutions you reach from that point, you could swap all the greens and all the purples to yield another solution. However, the next "free" choice you make could be the same colour as you chose last time, or a different one, so it is actually free (so isn't forced).

Since the "swap green and purple" operation is bijective (a one-to-one, reversible mapping), and preserves all the properties we care about, we can call it an isomorphism. If there's an isomorphism between two solutions, we say that those solutions are isomorphic. Swapping all the greens and purples of any isolated region of the graph (i.e., one surrounded by a strip of black and white) is an isomorphism, if the only property we care about is "is this a colouring of the original graph?".

I was saying it's pointless to search isomorphic solutions if you can help it. If you have isolated regions of the graph yet to be filled, you can halve the time it takes to explore each region's possible colourings.

However, if you consider isolated regions completely separately, you can solve them one after the other (and backtrack once you know any region's been made impossible by the choices of colours in its border), for a much larger speedup.

The whole thing about isomorphisms was a red herring, an artefact of my thought process rather than an actual insight. I doubt trying to exploit this will net you anything more than a 2× improvement, and that's only if you do it cleverly.

Re: Show HN: Chess Twist

#19
post #17
post #10

Earlier quoted context omitted.

There are those little black and white arrows on each tile, which indicate which way is forward for a specific player. Does that help? Or maybe you saw them and you mean something else? Interestingly, someone here mentioned that those arrows add a lot of clutter, and someone else on twitter said they only noticed them after I pointed them out. It's interesting how people perceive things like that so differently.

The first image shows a rook traveling a path different from the one shown in the arrows though? Why would the definition of forward be different for a pawn vs rook?

I classic chess, the rooks can move in any direction. Forward, backward and sideways are allowed. The pawns are the only pieces that are limited to forward movements. So the arrows are only necessary for the those.

Or maybe I'm misunderstanding your question?

Re: Show HN: Chess Twist

#20
post #19
post #17

Earlier quoted context omitted.

The first image shows a rook traveling a path different from the one shown in the arrows though? Why would the definition of forward be different for a pawn vs rook?

I classic chess, the rooks can move in any direction. Forward, backward and sideways are allowed. The pawns are the only pieces that are limited to forward movements. So the arrows are only necessary for the those. Or maybe I'm misunderstanding your question?

In this image we are seeing the two paths this took can take (“left” and “forward”). But forward is not the same as a pawn’s forward. The pawn would, about halfway down, “turn” away from the rook’s path

https://polyreplay.com/games/assets/chesstwist/description/s...

Personally I think the rook makes intuitive sense as shown. I would vote for the pawns following the same path even if it means they cannot reach the other side. Then remove the forward indicators and just make the pawns statefully indicate their direction.

Post reply on HN