frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

1D Chess

https://rowan441.github.io/1dchess/chess.html
184•burnt-resistor•2h ago

Comments

naorz•2h ago
Fun stuff, love it!
tkapin•1h ago
Nice! :)
schmeichel•1h ago
Finally, a version of Chess I can understand. Thank you.
asibahi•1h ago
This is really nice.

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

zniturah•40m ago
Good observation. Considering stacking of pieces maybe 1.5D though.
moffkalast•32m ago
Backgammon, the game everyone's seen and at the same time nobody knows how to play :P
sieste•1h ago
It took me an embarrassing number of attempts to win.
bbx•1h ago
Oh very interesting. Even with these restrictions, there are quite a few variations, and it seems only one ends up with white winning.
lschueller•1h ago
Cool idea. This is smart and lean. I like it
tintor•1h 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•1h ago
If you play the game, you realise this ends up in stalemate.
Fabricio20•32m 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.
al_borland•22m 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.
rokkamokka•21m ago
There is an explanation further down. A stalemate is if the enemy has no valid loves and is not in check
umanwizard•39m 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.
vladde•1h ago
i could not beat it, and i can't read that chess notation
DrammBA•1h 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>
thesuitonym•1h 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•50m ago
The first move after the comma is yours (open with kNight to 4), and the second move is apparently predetermined or always chosen.
northfield27•1h 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.

aNapierkowski•17m ago
you could also just move your king on that move same result knight cant move, only king can, so it has to back away
palata•1h ago
It was a lot more fun than I first thought!
quuxplusone•1h 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.

al_borland•27m ago
Maybe I'm not good enough at chess to understand the strategy here, but how would castling be useful in this 1-D game? Castling in a normal game protects your King and activates the Rook. In this 1-D game, your King starts out protected behind the Rook. If you castle and end up in a _ R K N position, your king is exposed and your Rook is trapped behind the King, useless, with no way to ever get it back out. The Rook seems essential for mate, and its power has been eliminated.
kkaske•1h ago
I was only able to beat this after a couple retries. The hint was hard to read.
gef•1h 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 :)
rOOmbambar9•54m ago
It's very interesting and fun!)
juleiie•24m ago
That finally confirmed that I am too regarded for chess if even 1D is too hard yay
amrrs•8m ago
is that str.replace(g,t) ?
addybojangles•18m ago
Silly nice brain teaser
BiraIgnacio•8m ago
love it!
tempestn•4m ago
That's actually a fun little puzzle.

You can't trust macOS Privacy and Security settings

https://eclecticlight.co/2026/04/10/why-you-cant-trust-privacy-security/
217•zdw•2h ago•86 comments

WireGuard makes new Windows release following Microsoft signing resolution

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009561.html
157•zx2c4•2h ago•62 comments

1D Chess

https://rowan441.github.io/1dchess/chess.html
192•burnt-resistor•2h ago•34 comments

Industrial design files for Keychron keyboards and mice

https://github.com/Keychron/Keychron-Keyboards-Hardware-Design
94•stingraycharles•1h ago•19 comments

Helium Is Hard to Replace

https://www.construction-physics.com/p/helium-is-hard-to-replace
101•JumpCrisscross•2h ago•54 comments

CPU-Z and HWMonitor compromised

https://www.theregister.com/2026/04/10/cpuid_site_hijacked/
97•pashadee•4h ago•53 comments

Bluesky April 2026 Outage Post-Mortem

https://pckt.blog/b/jcalabro/april-2026-outage-post-mortem-219ebg2
56•jcalabro•2h ago•7 comments

Bild AI (YC W25) Is Hiring a Founding Product Engineer

https://www.ycombinator.com/companies/bild-ai/jobs/dDMaxVN-founding-product-engineer
1•rooppal•56m ago

Clojure on Fennel Part One: Persistent Data Structures

https://andreyor.st/posts/2026-04-07-clojure-on-fennel-part-one-persistent-data-structures/
58•roxolotl•3d ago•1 comments

Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

https://www.cis.upenn.edu/~bcpierce/papers/mysteriesofdropbox.pdf
85•JackeJR•3d ago•19 comments

The difficulty of making sure your website is broken

https://letsencrypt.org/2026/04/10/test-sites.html
10•mcpherrinm•1h ago•3 comments

A compelling title that is cryptic enough to get you to take action on it

https://ericwbailey.website/published/a-compelling-title-that-is-cryptic-enough-to-get-you-to-tak...
12•mooreds•1h ago•8 comments

FBI used iPhone notification data to retrieve deleted Signal messages

https://9to5mac.com/2026/04/09/fbi-used-iphone-notification-data-to-retrieve-deleted-signal-messa...
432•01-_-•6h ago•218 comments

How NASA built Artemis II’s fault-tolerant computer

https://cacm.acm.org/news/how-nasa-built-artemis-iis-fault-tolerant-computer/
559•speckx•1d ago•214 comments

I still prefer MCP over skills

https://david.coffee/i-still-prefer-mcp-over-skills/
389•gmays•15h ago•322 comments

France to ditch Windows for Linux to reduce reliance on US tech

https://techcrunch.com/2026/04/10/france-to-ditch-windows-for-linux-to-reduce-reliance-on-us-tech/
251•Teever•2h ago•105 comments

RSoC 2026: A new CPU scheduler for Redox OS

https://www.redox-os.org/news/rsoc-dwrr/
19•akyuu•2d ago•3 comments

Penguin 'Toxicologists' Find PFAS Chemicals in Remote Patagonia

https://www.ucdavis.edu/health/news/penguin-toxicologists-find-pfas-chemicals-remote-patagonia
114•giuliomagnifico•11h ago•46 comments

C++: Freestanding Standard Library

https://www.sandordargo.com/blog/2026/04/08/cpp-freestanding
26•ingve•2d ago•4 comments

A new trick brings stability to quantum operations

https://ethz.ch/en/news-and-events/eth-news/news/2026/04/a-new-trick-brings-stability-to-quantum-...
208•joko42•13h ago•47 comments

Native Instant Space Switching on macOS

https://arhan.sh/blog/native-instant-space-switching-on-macos/
602•PaulHoule•22h ago•289 comments

Deterministic Primality Testing for Limited Bit Width

https://www.jeremykun.com/2026/04/07/deterministic-miller-rabin/
18•ibobev•2d ago•2 comments

Supply chain nightmare: How Rust will be attacked and what we can do to mitigate

https://kerkour.com/rust-supply-chain-nightmare
70•fanf2•3h ago•40 comments

Code is run more than read (2023)

https://olano.dev/blog/code-is-run-more-than-read/
95•facundo_olano•3h ago•66 comments

We've raised $17M to build what comes after Git

https://blog.gitbutler.com/series-a
273•ellieh•16h ago•590 comments

DRAM has a design flaw from 1966. I bypassed it [video]

https://www.youtube.com/watch?v=KKbgulTp3FE
359•surprisetalk•2d ago•127 comments

Why I'm Building a Database Engine in C#

https://nockawa.github.io/blog/why-building-database-engine-in-csharp/
29•vyrotek•1h ago•6 comments

Generative art over the years

https://blog.veitheller.de/Generative_art_over_the_years.html
215•evakhoury•3d ago•58 comments

US summons bank bosses over cyber risks from Anthropic's latest AI model

https://www.theguardian.com/technology/2026/apr/10/us-summoned-bank-bosses-to-discuss-cyber-risks...
82•ascold•4h ago•56 comments

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
298•rickcarlino•21h ago•68 comments