Top
Best
New

Posted by burnt-resistor 13 hours ago

1D Chess(rowan441.github.io)
683 points | 130 commentspage 6
Keyframe 8 hours ago|
This is stupid. I like it!
Nevermark 7 hours ago||
I thought for sure this article was going to be political commentary!

(I would pay a lot for some fat 1500 page, leather-bound tome of wisdom and anecdotes about historical foot guns, by Carl von Clausewitz, titled "1D Chess". And it's inevitable multi-authored, Harvard-published much thicker contemporary-world sequel.)

cindyllm 7 hours ago||
[dead]
hfnjdbekwbiw 9 hours ago||
[flagged]
BiraIgnacio 10 hours ago||
love it!
vladde 12 hours ago||
i could not beat it, and i can't read that chess notation
thesuitonym 11 hours ago||
The letter is the piece to move, and the number is the index to move to, starting from 1 on the left. The first alphanumeric pair is your move, then the computer's move. Comma. Your move, computer's move...
qup 11 hours ago|||
The first move after the comma is yours (open with kNight to 4), and the second move is apparently predetermined or always chosen.
DrammBA 11 hours ago|||
the notation is just an array of move tuples, each tuple contains 1 move for white and 1 move for black, where each move is written as <1st letter of piece name><destination square>
burnt-resistor 10 hours ago||
There's a coordinate-based solution in the source code issues. I couldn't elucidate that notation either.

https://github.com/Rowan441/1d-chess/issues/1

Edit: There's a second solution where instead of moving the rook back 2, move the king forward one and the take the black knight with the rook as the checkmate move.

tintor 12 hours ago|
The first move is always: white rook takes black rook, then the only remaining move for black is to move the knight away, which results in checkmate.
nippoo 12 hours ago||
If you play the game, you realise this ends up in stalemate.
Fabricio20 11 hours ago||
I'm not very good at chess, but I dont get why most things are considered a stalemate? I strategically remove all pieces of the enemy, leaving only the king against my rook/tower whatever its called, the king has nowhere to run. In my eyes it's a checkmate. The game just calls it a stalemate. Would be a stalemate if I couldn't do anything, but I can kill the enemy king.
rokkamokka 11 hours ago|||
There is an explanation further down. A stalemate is if the enemy has no valid loves and is not in check
al_borland 11 hours ago|||
It's a stalemate because while the king can't move, he isn't under active attack. There is nowhere he can legally move, but he's safe where he's at.
jandrese 10 hours ago|||
That rule caught me up too. In regular chess if it is your opponents turn and their only pieces are a king in the 1,8 square and a pawn that is pressed up against one of your pawns and you have rooks in the 2,1 and 8,7 squares that counts as a victory does it not?
umanwizard 9 hours ago||
No. That is a draw assuming it is the player with only a king’s turn to move.

Translating your notation to normal chess notation:

White king on h1, black rooks on a2 and g8, black king in some random other place, white to move.

That is a draw, because white is NOT in check, but has no legal moves. That scenario is called stalemate. If white were in check, it would be checkmate and a win for black. Set it up on any chess analysis board website and it will say the game is a draw.

tshaddox 9 hours ago|||
But why? That feels like a victory.
asibahi 8 hours ago||
Because that’s the rule. There doesn’t have to be a rational reason.
lamasery 8 hours ago||
... and if it weren't the rule, it'd make a lot of mid- and late-game play much safer for the player with the advantage. As it is, it's something they have to watch out for, which constrains them somewhat. You have to win, but not the wrong way, and your opponent can attempt to force you to "win" the "wrong way" (resulting in a stalemate).
umanwizard 11 hours ago||
Black can’t move the knight: it’s illegal to make a move that puts yourself in check. Thus black has no legal moves, but isn’t in check, so the result is a draw.