🌀 迷宫生成器Maze Generator
在线生成随机迷宫:可设行列数(最大 150×150)、格子大小和颜色,支持深度优先(长通道)和 Prim 算法(多分岔),可显示答案路径,下载 PNG / SVG 或打印。Generate random mazes up to 150×150 with custom cell size and colors, using depth-first (long corridors) or Prim's algorithm (many branches); show the solution, download PNG/SVG or print.
使用说明与常见问题How-to & FAQ
「迷宫生成器」是什么?What is the Maze Generator tool?
在线生成随机迷宫:可设行列数(最大 150×150)、格子大小和颜色,支持深度优先(长通道)和 Prim 算法(多分岔),可显示答案路径,下载 PNG / SVG 或打印。Generate random mazes up to 150×150 with custom cell size and colors, using depth-first (long corridors) or Prim's algorithm (many branches); show the solution, download PNG/SVG or print.
如何使用「迷宫生成器」?How do I use the Maze Generator tool?
在「迷宫生成器」中,按需设置「行数」、「列数」、「格子(像素)」、「算法」、「种子(可选)」等选项,然后点击「生成新迷宫」、「打印」按钮即可。In the Maze Generator: Set "Rows", "Columns", "Cell (px)", "Algorithm", "Seed (optional)", then click "New maze", "Print".
迷宫一定有解吗?Is every maze solvable?
是的。两种算法生成的都是“完美迷宫”:任意两个格子之间有且只有一条路径,所以从入口到出口必定有唯一的解。Yes. Both algorithms produce perfect mazes — exactly one path between any two cells — so there is always exactly one route from entrance to exit.
两种算法有什么区别?How do the algorithms differ?
深度优先(递归回溯)产生长而曲折的通道、死路较少;Prim 算法产生更多短分岔和死路,看起来更“碎”。Depth-first (recursive backtracker) makes long winding corridors with fewer dead ends; Prim's makes many short branches and dead ends.
种子有什么用?What is the seed for?
填写相同的种子和尺寸会生成完全相同的迷宫,方便分享或重复打印;留空则每次随机。The same seed and size always give the same maze, handy for sharing or reprinting; leave it blank for a new random maze each time.
手机上能用吗?Does it work on mobile?
可以。「迷宫生成器」支持触屏操作,在手机和平板浏览器中均可使用,无需安装 App。Yes. The Maze Generator supports touch input and works in mobile and tablet browsers without installing an app.
「迷宫生成器」免费吗?需要注册吗?Is the Maze Generator free? Do I need an account?
「迷宫生成器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;查询时会联网访问你指定的地址或服务(详见下方说明),本站服务器不会收集你的输入。The Maze Generator is completely free with no sign-up or install and works on phones and desktops; it connects to the address or service you specify when you run it (see below); this site's servers never collect your input.