Sudoku Solving Techniques

English · 中文

There's a long ladder of named techniques out there, but the truth is that four or five of them solve almost everything you'll meet. Learn these well before you go chasing the exotic ones.

All of them work on candidates — the digits still legal in a cell. So have pencil marks in front of you, and remember the golden habit: place a digit, then wipe it from the candidates of its row, column, and box.

Naked single

The simplest move there is. A cell's candidate list has been whittled down to a single digit — so that digit goes in. Nothing clever, just the consequence of everything around it. On a tidy grid you'll trip over naked singles constantly; each one you fill tends to create another, which is why solving feels like a small avalanche near the end.

Hidden single

This one fools beginners because the cell's list might still hold several candidates. The idea flips the question around: instead of asking what a cell can be, ask where a digit can go. Scan a unit for, say, the 4. If only one cell in that row can legally take a 4 — even if that cell also lists a 7 and a 9 — then the 4 belongs there. The other candidates are a bluff; the unit needs its 4 and this is the only home for it.

Hidden singles are the bread and butter of medium puzzles. When you're stuck, pick one digit and walk it through all nine boxes — you'll be surprised how often exactly one slot is open.

Naked pair

Now we start eliminating rather than placing. Suppose two cells in the same row both have the candidates "3 8" and nothing else. You can't tell which is the 3 and which is the 8 — but between them they will use up both digits. That means no other cell in that row can be a 3 or an 8. Strike 3 and 8 out of every other cell's list in the row. You haven't placed a number, yet you've often opened up a naked single somewhere down the line.

The same logic stretches to naked triples (three cells sharing three candidates between them) and beyond, though triples are as far as most people need to go.

Hidden pair

The mirror image of a naked pair. Sometimes two digits — say 2 and 6 — can only fit in the same two cells of a unit, even though those cells are cluttered with other candidates. Since those two cells are the only possible homes for 2 and 6, they must hold them, which lets you scrub every other candidate out of those two cells. Hidden pairs are harder to spot because nothing looks bare, but they crack open positions that singles can't.

Pointing pairs (locked candidates)

This technique connects a box to a line. Look inside a 3×3 box and find a digit whose candidates all sit on a single row (or column) within that box. The digit has to land somewhere in the box, so it has to land on that row — which means it can't appear anywhere else along that row, even outside the box. Erase it from the rest of the line. It's a small, sneaky elimination that often unblocks a whole region.

When these aren't enough

Past this point live the patterns with the fun names — X-Wing, Swordfish, XY-Wing — which hunt for symmetric structures spread across several units. They're worth learning eventually, but you'll only need them on genuinely hard grids, and even then not often. Master singles, pairs, and pointing first; they're the muscles you'll use every single game.

The fastest way to internalise any of this is to watch it happen on a real board. Play a puzzle and tap the hint button when you're stuck — the AI tutor names the technique it used and spells out the elimination, so the pattern sticks instead of staying abstract.


数独解题技巧

外头有名字的技巧排着长长一串,但实话说,其中四五个就能解掉你几乎会遇到的所有题。先把这几个练扎实,再去追那些花哨的。

它们全都围着候选数转——也就是一格里还合法的那些数。所以手边备好候选数标记,并记住那个黄金习惯:落一个数,就把它从同行、同列、同宫的候选里抹掉。

裸唯一数

最简单的一步。某格的候选清单被一路削到只剩一个数——那就填它。没什么巧劲,纯粹是周围一切的结果。盘面干净时,裸唯一数会接二连三地冒出来;你每填一个,往往又逼出下一个,这也是为什么临近收尾时解题像一场小小的雪崩。

隐性唯一数

这个会骗到新手,因为那一格的清单里可能还留着好几个候选。窍门是把问题反过来:别问这格能填什么,问这个数能去哪儿。拿某个单元来扫,比如找 4。如果这一行里只有一格能合法地容下 4——哪怕那格还列着 7 和 9——那 4 就归它。其余候选是虚张声势;这一行总得有个 4,而它只有这一个落脚处。

隐性唯一数是中等难度题的家常便饭。卡住的时候,挑一个数,把它在九个宫里挨个走一遍——只剩一个空位的情况多到会让你意外。

裸数对

到这儿我们开始做「删除」而不是「落子」。假设同一行里有两格的候选都恰好是「3 8」,别无其他。你分不清哪个是 3、哪个是 8——但这两格之间,必定把 3 和 8 用光。也就是说,这一行里别的格子都不可能是 3 或 8。把这一行其余每格清单里的 3 和 8 都划掉。你一个数都没填,却常常在后面某处顺手开出一个裸唯一数。

同样的逻辑可以延伸到裸三(三格之间共用三个候选)乃至更多,不过对多数人来说,到三为止也就够用了。

隐性数对

裸数对的镜像。有时候两个数——比如 2 和 6——在一个单元里只能塞进相同的那两格,哪怕这两格还堆着别的候选。既然这两格是 2 和 6 仅有的归宿,它们就必须装这两个数,于是你可以把这两格里其余所有候选统统擦掉。隐性数对更难发现,因为表面上没有哪格显得「光秃秃」,但它能撬开唯一数啃不动的局面。

区块指向(锁定候选)

这一招把一个宫和一条线连起来。盯住某个 3×3 宫,找一个数,它在这个宫里的候选全压在同一行(或同一列)上。这个数总得落在宫里某处,所以它只能落在那一行——也就意味着,它在那一整行上别处都不能出现,哪怕是宫外。把它从这条线其余的格子里抹掉。这是个小而阴的删除,却常常一下盘活一整个区域。

当这些还不够时

再往后,住着那些名字很带劲的套路——X-Wing、Swordfish、XY-Wing——它们在好几个单元之间搜寻对称的结构。这些早晚值得学,但你只在真正的硬题上才用得着,而且即便那样也不常用。先把唯一数、数对和区块指向练到家;它们才是你每一局都要用到的肌肉。

要把这些真正变成本能,最快的办法是在真实盘面上看它发生。开一局,卡住就点提示——AI 导师会说出它用的技巧、把删除的来龙去脉讲清楚,于是套路就记住了,而不是停留在纸上谈兵。