Connect the numbers.
Fill every square.
按顺序连接数字,
走遍每一个格子。
Zip is a calm puzzle game. Draw one continuous line: start at 1, follow the numbers in order, fill every square, and finish at the highest number. Never cross a wall. There is nothing to install: just open it and play. Zip 是一款轻松的益智小游戏:画一条连续的线,从 1 出发,按顺序经过各个数字,填满每一个格子,并在最大的数字上结束,途中不能穿过墙。无需安装,打开就能玩。
1 → 2 → 3 … fill every square, end at the highest. 1 → 2 → 3 …,填满每个格子,在最大数字处结束。
What is Zip?Zip 是什么?
Zip is a path puzzle inspired by the Zip game on LinkedIn. Each board has a few numbered squares and possibly some walls. Your job is to draw a single line across the board, following four simple rules. Zip 是一款路线谜题,灵感来自 LinkedIn 上的 Zip 游戏。每块棋盘上有几个带数字的格子,有时还有一些墙。你要按四条简单的规则,画出一条贯穿棋盘的线。
Start at 1从 1 出发
Put your finger or mouse on the square numbered 1 and start drawing.把手指或鼠标放在数字 1 的格子上,开始画线。
Follow the numbers按数字顺序
Pass through 2, 3, 4… in that order, never skipping or swapping one.依次经过 2、3、4……不能跳过或颠倒。
Fill every square填满所有格子
Your line must visit every square exactly once and cannot cross a wall.线必须恰好经过每个格子一次,并且不能穿过墙。
End at the top在最大数字处结束
Your line ends on the highest number, and only once every square is filled.线止于最大的数字,且此时已填满所有格子。
Every puzzle has exactly one correct solution. 每道题都恰好只有一个正确答案。
What is in the project项目包含什么
The game游戏
A puzzle game you play in your web browser, with eight board sizes and new puzzles every day.在网页浏览器里玩的益智游戏,提供八种棋盘尺寸,每天都有新题目。
The puzzle maker出题程序
A generator that creates fresh puzzles and makes sure each has exactly one solution.自动生成全新谜题的程序,并确保每道题都恰好只有一个解。
The solver解题程序
A program that solves puzzles like a very patient player, and checks that only one answer exists.像一位极有耐心的玩家那样解题的程序,用来确认答案是唯一的。
The build制作方式
This version was built entirely with Claude Free Sonnet 5 as the AI coding assistant. No libraries, all static: just standard web technology and a lot of algorithms and maths. 本版本完全由 AI 编程助手 Claude Free Sonnet 5 打造。没有任何库,全部是静态文件:只用标准的网页技术,外加大量的算法和数学。
Where you can play在哪里玩
Zip runs in your web browser, so it works wherever you have one.Zip 在网页浏览器里运行,只要有浏览器就能玩。
Computers电脑
Click and drag with your mouse to draw your path.用鼠标点击并拖动来画出路线。
Phones and tablets手机和平板
Draw with your finger. The game is made for touch screens too.用手指画线,游戏同样为触摸屏设计。
Nothing to install无需安装
Just open the page in Chrome, Edge, Firefox or Safari.在 Chrome、Edge、Safari 等浏览器中打开。
Kept on your device保存在你的设备上
Statistics stay in your browser. No account needed.统计数据保存在自己的浏览器里,无需注册账号。
Inside the game游戏功能一览
Pick a size, draw your line, and see how quickly you can solve it.选一个尺寸,画出你的路线,看看你能多快解出来。
New puzzles every day每天都有新题
Everyone gets the same puzzles each day, so you can compare notes with friends.每天所有人拿到的题目和顺序都相同,可以和朋友交流心得。
Game of the Day每日挑战
One featured puzzle a day, and you get a single attempt at it. Make it count.每天一道特别推荐的题目,只有一次挑战机会。
Your statistics个人统计
See how many puzzles you have solved and how fast, for each board size, today and all time.按棋盘尺寸查看你解出的题数和用时,包括今日和历史累计。
How it works程序原理
A quick look at the ideas behind Zip, with no code.不涉及代码,简单看看 Zip 背后的思路。
How a puzzle is made题目是怎么做出来的
-
Draw a secret route先画一条秘密路线
The computer first draws a random winding route that visits every square once. This is the answer to the puzzle.程序先随机画出一条蜿蜒的路线,恰好经过每个格子一次。这就是这道题的答案。
-
Place the numbers标上数字
It drops numbers 1, 2, 3… along the route, spaced out so the puzzle feels balanced.沿着路线依次标上 1、2、3……,并让数字分布均匀,使题目看起来平衡。
-
Add walls until one answer is left加墙,直到只剩一个答案
It scatters a few walls, then asks the solver: is there another route that also works? If so, a wall is placed in that other route’s way. This repeats until only the secret route remains.它先随机放上一些墙,再问解题程序:还有别的路线也行得通吗?如果有,就在那条路线上加一堵墙。如此反复,直到只剩下那条秘密路线。
-
Tidy up精简整理
Next it tries taking each wall away again and keeps only the walls that are really needed.接着逐一尝试拿掉每堵墙,只保留真正必要的墙。
-
Keep the neatest one择优保留
Several versions are made this way, and the one with the fewest walls wins.按这个流程做出好几个版本,墙最少的那个胜出。
Same seed, same puzzle. Every puzzle starts from a seed number, like a recipe number. The same seed always makes the same puzzle, which is why everyone sees the same puzzles on the same day. 同一个种子,同一道题。每道题都从一个种子编号开始,就像菜谱编号。相同的种子总会做出相同的题目,所以同一天里每个人看到的题目都一样。
How a puzzle is solved题目是怎么解出来的
-
Explore, like in a maze像走迷宫一样探索
The solver starts at 1 and moves one square at a time, always following the numbers in order.解题程序从 1 出发,每次走一格,并始终按数字顺序前进。
-
Step back at dead ends死路就退回
When it gets stuck, it goes back a few steps and tries another way. This is called backtracking.走进死胡同,就退回几步换一条路再试,这叫“回溯”。
-
Spot hopeless routes early及早放弃走不通的路
It quickly notices when a square has been cut off or trapped, or when the remaining squares can no longer all be reached, and drops that route right away.一旦发现某个格子被孤立、被困住,或者剩下的格子已经无法全部走到,就立刻放弃这条路线。
-
Use forced moves利用必然的走法
If a square has only two open sides, the line has to use both. The solver applies deductions like this automatically, just as a skilled player would.如果某个格子只剩两条通路,线就必须同时经过这两条。解题程序会像高手一样自动运用这类推理。
-
Count the answers数一数答案
It stops as soon as it finds a second solution. Exactly one answer means the puzzle is fair. Two means the puzzle maker needs to add another wall.一旦找到第二个解就停止。恰好一个答案,说明题目公平;找到两个,出题程序就要再加一堵墙。
Sounds simple, it is not 😅听起来很简单,其实不然 😅
Zip is easy to learn but surprisingly hard for a computer. Computer scientists sort problems into families by how hard they are. Here is the maths behind it, told through Zip. The families describe what happens as boards grow without limit; for the board sizes in the game, a computer copes fine. Zip 很容易上手,对电脑来说却出乎意料地难。计算机科学家按难度把问题分成不同的“家族”。下面用 Zip 来认识背后的数学。这些家族描述的是棋盘无限变大时的情形;对游戏里的棋盘尺寸,电脑完全应付得来。
⚡ P: quick to solve⚡ P 类:解得快
A problem is in P if a computer solves it quickly, even as it grows. Sorting names: twice as many, about twice the work. 如果电脑能很快解决某个问题,且问题变大后依然很快,它就属于 P 类。给名字排序:多一倍的名字,大约多一倍的活。
In Zip: is my line correct? Walk along it and check the rules. Making a solvable puzzle is quick too. 在 Zip 里:我画的线对吗?沿线走一遍对照规则即可。出一道有解的题也很快。
✔️ NP: quick to check✔️ NP 类:验证得快
A problem is in NP if a given answer is quick to check, though finding it may not be. Jigsaw: a glance to check, hours to build. 如果一个给定的答案能很快核对,这个问题就属于 NP 类,尽管找出答案未必很快。拼图:一眼就能验收,拼起来要几小时。
In Zip: does this puzzle have a solution? The drawn line proves it, and anyone can check it in seconds. 在 Zip 里:这道题有解吗?如果有,画出的那条线就是证明,谁都能在几秒内核对。
🔄 co-NP: mirror of NP🔄 co-NP 类:NP 的镜像
A problem is in co-NP if a “no” is quick to prove but a “yes” is not. “No typos here”: one typo refutes it; a full read proves it. 如果“否”容易证明而“是”不容易,这个问题就属于 co-NP 类。“这里没有错字”:找出一个错字就能推翻,要证明它成立得逐字通读。
In Zip: is this the only solution? A second line proves “no” in seconds; “yes” means ruling out every other line. 在 Zip 里:这是唯一的解吗?再画一条线几秒就能证明“不是”;要证明“是”,得排除所有其他的线。
🏔️ NP-complete: hardest🏔️ NP 完全:最难的
A problem is NP-complete if it is among the hardest in NP: a fast method for it solves all of NP. Like a master key. 如果一个问题属于 NP 中最难的那一档,就称为 NP 完全问题:有了它的快速解法,NP 里所有问题都能快速解决。像一把万能钥匙。
In Zip: solving a puzzle. Close to the Hamiltonian path problem (visit every point once), NP-complete on grids, so Zip is expected to be too. 在 Zip 里:解题。它与哈密顿路径问题(每个点恰好经过一次)相近,后者在网格上是 NP 完全的,所以 Zip 预计也是。
🚧 NP-hard: or harder🚧 NP 难:也许更难
A problem is NP-hard if it is at least as hard as all of NP, yet its answer may be hard to check, like proving a route is shortest. 如果一个问题至少和 NP 中所有问题一样难,就称为 NP 难问题,它的答案甚至也可能难以核对,比如证明某条路线最短。
In Zip: what is the fewest walls that leave exactly one solution? Proving a count is the minimum is hard. 在 Zip 里:最少要几堵墙才能恰好只有一个解?要证明某个数量已是最少并不容易。
⚖️ DP: exactly one⚖️ DP 类:恰好一个
DP (Difference Polynomial time) combines both: an NP part and a co-NP part. A detective: one suspect fits, nobody else. DP(差多项式时间)把两者合在一起:一部分是 NP,一部分是 co-NP。侦探断案:只有一个嫌疑人吻合,其他人都不吻合。
In Zip: does this puzzle have exactly one solution? That is what makes it fair: a solution (NP), and no other (co-NP). 在 Zip 里:这道题恰好只有一个解吗?这是公平的前提:有解(NP),且没有别的解(co-NP)。
Why the puzzle maker draws the answer first: making a solvable puzzle is easy, so it plants a route and hides it behind numbers. Making a puzzle with exactly one solution is the hard part, so it keeps asking the solver “is there another route?” and adds walls until the answer is no. 为什么出题程序先画答案:做一道有解的题很容易,所以它先埋下一条路线,再用数字藏起来。做一道恰好只有一个解的题才是难点,所以它不断问解题程序“还有别的路线吗?”,并不停加墙,直到答案变成“没有”。
Ready to play?准备好了吗?
Pick a board size and draw your first line. It only takes a minute to learn.选一个棋盘尺寸,画下你的第一条线。一分钟就能学会。
▶ Play now立即开始