1D Chess (rowan441.github.io)

by burnt-resistor 178 comments 1001 points
Read article View on HN

178 comments

[−] hackyhacky 35d ago
If you enjoyed this, you might like Mind Chess, which can be played without a board and pieces [1]:

Consider Mind Chess. Two players face each other. One says "Check." The other says "Check." The first says "Check." This continues until one of them says, instead, "Checkmate." That player wins -- superficially. In fact, the challenge is to put off checkmate for as long as possible, while still winning. This may be better stated: you truly win Mind Chess if you call "Checkmate" just before your opponent was about to.

[1] http://www.eblong.com/zarf/essays/mindgame.html

[−] anyfoo 35d ago
Which reminds me that I just lost the game.

I also lost the game not too long ago, but before that, I think I didn't actually lose it for a decade of more? And losing it wasn't even because it was mentioned anywhere, I genuinely just thought of it by myself, after forgetting about it for so long.

So my sincerest apologies if my comment just made any readers lose their long streak in the game.

[−] benleejamin 35d ago
And if you like Mind Chess, you might enjoy Mornington Crescent, which has a similar flavor to it! [1]

[1] https://www.youtube.com/watch?v=lziCsPmlbZI

[−] CGMthrowaway 35d ago
Sounds like a dating game. "Delay texting her back or expressing your feelings as long as possible, until just the moment before she will give up on you"
[−] quuxplusone 35d ago
Mentioned in TFA: This version of chess is given by Martin Gardner in his "Mathematical Games" column of July 1980 (pages 27 and 31) — https://www.jstor.org/stable/24966361 — and the analysis of White's mate is given in the column of August 1980 (page 18) — https://www.jstor.org/stable/24966383.

I do wonder how things would change if the board were 9 cells long; 10 cells long; etc. Also, it seems "in the spirit" to permit castling if neither K nor R has moved yet: i.e., from the position

K _ R N r _ n k

White ought to be permitted to

_ R K N r _ n k

(Or maybe there's a stronger argument for R K _ N r _ n k, actually. The former was conceptually "rook moves halfway toward king, then king moves to the other side of rook"; but the latter is "rook moves two steps in king's direction while king moves to the other side of rook.")

I'm pretty sure this wouldn't change the analysis on the 8-cell board at all, though. I wonder if it would change the analysis on any size of board.

[−] tromp 35d ago
1D Go is also interesting and doesn't require any change in rules or starting position. TIL that it is known as Alak [1]. One of the open problems in our Combinatorics of Go paper [2] is whether you can play a game that goes through all possible legal 1xn positions for any n>2, which we were only able to verify up to n=7.

[1] https://senseis.xmp.net/?Alak

[2] https://tromp.github.io/go/gostate.pdf

[−] aktenlage 35d ago
Very cool. Reminds me of 1D Pacman: https://abagames.itch.io/paku-paku
[−] asibahi 35d ago
This is really nice.

Incidentally, there is an actual 1D game that is one of the most popular games on the planet: Backgammon.

[−] freetime2 35d ago
I tried and failed a couple times before looking at the hint. And then I had to ask ChatGPT to explain the hint because I didn't understand chess notation. But with all of that out of the way, I am now winning 100% of my matches and feel it's not an overstatement to call myself a 1D chess grandmaster.
[−] gef 35d ago
Reminds me of Edwin A. Abbott's Flatland, where he describes Lineland. A one-dimensional world whose King can only move forward and backward, cannot conceive of sideways, and considers his tiny segment of existence complete and sufficient. The Linelanders are portrayed as pitiable, intellectually imprisoned by their single dimension. Much like us in our three :)
[−] JasperBlank2001 23d ago
I really like such simple games, to help Analise it can be fun to look at the whole game at once, if you want see that i made it a graph at https://github.com/JasperBlank/1DChess
[−] sieste 35d ago
It took me an embarrassing number of attempts to win.
[−] northfield27 35d ago
Haha, i was taking N4 and N6, but didn’t figure the steps after that.

To win we need to let knight die because rook can move multiple steps to kill the king.

From a third person perspective R2 is a deceptive move that takes advantage algorithm to make the black king back off to kill its knight.

[−] chedoku 35d ago
If you like 1D chess, you'll probably like other chess-themed puzzles as well: https://chedoku.com/blog/chessPuzzles
[−] juleiie 35d ago
That finally confirmed that I am too regarded for chess if even 1D is too hard yay
[−] dwa3592 35d ago
I am ashamed to admit that i could not solve that even though i consider myself a decent player.
[−] xg15 33d ago
(Chess noob here)

Always found the "protect the king" rules in regular chess interesting but also somewhat strange. (The rules that make it impossible to actually take a king and instead let the game reason on the "possibility" that a king could be taken in the next turn - i.e. check and checkmate)

As long as only check and checkmate are considered, the rules are a bit weird, but should not change the game dynamics, as they only enforce the moves that any rational player would do anyway.

But adding stalemates to it seems to actually change the gameplay, and this 1D variant makes it even more obvious.

If you compared this chess variant with a 1D chess where the king would behave like a normal piece (except taking it would end the game) and any draw would have to be called manually, the game would behave completely different.

[−] MinimalAction 35d ago
I love chess! This version was fun too.

If 1. Rx6,it is stalemate. So it must be 1. N4 N5. Then we could proceed with, 2. Nx6+ K7. Now, if you capture the knight (Rxe), it is stalemate again. So sacrifice the knight, 3. R4 Kx6 so that you force black to zugzwang with 4. K2 K7, and finally, 5. Rx5#

[−] questerzen 29d ago
The given best-game solution is not optimal: Black can delay mate for another move to give a forced win in 11 ply rather than in 9 ply. Optimal is: N4 n5 N6+ k7 R4 as given, but Black can delay mate with ... n3+, rather than ...k6. The remaining moves are then: K2 n5 N8 k8 R5#. Perhaps your minimax code doesn't include moves-to-mate in the move score?
[−] schmeichel 35d ago
Finally, a version of Chess I can understand. Thank you.
[−] palata 35d ago
It was a lot more fun than I first thought!
[−] topce 35d ago
I went in other direction ;-) https://topce.github.io/chess960x32/
[−] bdcs 34d ago
Trying to lose is also fun (as white)

Some observations:

* Knights are color bound

* You can mate with Knight & King (K+K is still insufficient material)

* 3 fold repetition still applies (and has a popup!)

[−] mcdeltat 34d ago
Ok seems like I don't understand and really dislike chess stalemate/draw rules. So if I make a move which is directly causative to my opponent having no moves which would not result in checkmate, this means the same is a draw?? That makes no sense to me.
[−] splonk 34d ago
It's interesting that the page actually uses minimax to determine black's play. I kind of assumed it would be a simple lookup table given the small state space of the game. I suppose it makes it easier to add more variants.
[−] hart_russell 35d ago
I don’t know why this is stalemate: N4 N5, N6 K7, R5. Wouldn’t rook have the king in checkmate?
[−] slopinthebag 35d ago
I was confused why 3.R2 is drawing, but not 3.R4 since black can check with the knight either way, but it's fairly obvious in hindsight - if black checks instead of capturing, you don't take, you go K2 and force black into zugzwang. Clever.
[−] ctool 32d ago
A workable minimalist variant is slimchess, which contains one of each piece on a 3x8 board. It's the smallest chess board that can preserve all the rules (including castling).
[−] frunkp 35d ago
Those who play go may enjoy the variants: https://www.govariants.com/variants/rules-list Tetris is a fun one to try!
[−] yuppiepuppie 34d ago
This is my kind of chess :) I’ve added it to the HN Arcade https://hnarcade.com/games/games/1d-chess
[−] kkaske 35d ago
I was only able to beat this after a couple retries. The hint was hard to read.
[−] hypendev 35d ago
Don't know when was the last time I had so much fun with chess. Quite intuitive, clicked on the first click.

Would enjoy so much if there were more of these, feels like an obligation-free chess puzzle.

[−] igor47 35d ago
Oh I made one of these once! In mine you play against other people. https://1dchess.igor47.com/
[−] ergocoder 34d ago
There aren't that many combinations. I finally won hahaha
[−] daynthelife 35d ago
It frustrates me that the site does not give the strongest defense for black. The position is mate in 6, not 5:

1. N4 N5

2. Nx6+ K7

3. R4 N3+!

4. K2 N5

5. N8! Kx8

6. Rx5#

[−] anotheryou 34d ago
Is this stalemate correct? https://imgur.com/a/Z7in8sl

Have not even lost a piece yet!

[−] MagicMoonlight 35d ago
Why does it end in a stalemate if all my pieces are alive and they have none? That’s not a stalemate, I can move freely and get them.
[−] bbx 35d ago
Oh very interesting. Even with these restrictions, there are quite a few variations, and it seems only one ends up with white winning.
[−] darepublic 35d ago
I won after four attempts. Pretty sure it was perfect play so yes white has forced win
[−] sjdv1982 35d ago
Zugzwang!
[−] DemocracyFTW2 33d ago
0D chess is where real masters shine!
[−] lschueller 35d ago
Cool idea. This is smart and lean. I like it
[−] tempestn 35d ago
That's actually a fun little puzzle.
[−] jibal 35d ago
N4 N5 Nx6+ K7 R4 Kx6 R2 (or K2) K7 Rx5#
[−] armanhq 35d ago
More fun than I expected! Thank you :)
[−] gcheong 35d ago
Minor typo: assming -> assuming :)
[−] rOOmbambar9 35d ago
It's very interesting and fun!)
[−] hybirdss 35d ago
spent way too long on this before realizing the knight is basically the whole game in 1d