用扩散模型生成可解推箱子谜题,无需训练时知道解法。
Solvable Sokoban Without a Solver via Diffusion

- 仅通过补全格子训练,不依赖解法或奖励信号。
- 生成的谜题77.4%可解,94.5%失败者移除一堵墙即能解。
- 打破固定生成顺序,更匹配非局部依赖的谜题结构。
判定推箱子谜题是否可解是PSPACE完全问题(Culberson, 1997):解可能指数级长,且无短验证凭证。可解性也极脆弱,单个墙体错位即可使整个谜题不可解。本文展示,基于Transformer的离散扩散模型仅通过格子补全训练,未接触求解器、奖励或可解性标签,仍达到77.4%的可解率;其中94.5%的失败案例可通过移除一堵墙变为可解。即,全局性的求解性质可由局部训练目标自然衍生。自回归模型按固定顺序生成,始终依赖前缀;而掩码扩散模型学习任意子集条件下的分布,生成时可任意顺序揭示格子,每一步均依赖已放置的所有信息。这恰好匹配推箱子中非局部耦合的特性——某处决策会约束另一处可行性。因此,不受固定顺序限制的生成器在结构上更契合该问题。训练流程改编自MD4(Shi et al., 2024),数据集为DeepMind的Boxoban(Guez et al., 2019)。模型与生成说明已公开。
原文摘要 · Abstract (English)
Deciding whether a Sokoban puzzle is solvable is PSPACE-complete (Culberson, 1997): solutions can be exponentially long and there is no short certificate to check. Solvability is also a fragile property, since even a single misplaced wall can silently render an entire puzzle unsolvable. In this work, we show that a transformer-based discrete diffusion model trained purely on tile completion, with no access to solvers, rewards, or solvability labels, achieves a solvability rate of 77.4%, with 94.5% of the remaining failures rendered solvable by removing a single wall. In other words, a global, search-heavy property follows from a local training objective: trained only to fill in masked cells, the model inherits solvability it was never trained on. An autoregressive model factorizes as $p(c_k \mid c_1 \dots c_{k-1})$, meaning a fixed order, always conditioned on a prefix. Masked diffusion does not: it hides a random subset of cells and learns $p(c_k \mid \text{any subset})$, so at generation time it can reveal cells in any order, each one conditioned on everything already placed, wherever it sits on the board. A puzzle's difficulty comes from exactly this kind of non-local interaction, a decision in one part of the grid constraining what will work somewhere else entirely. A generator that is not locked into a single fixed order is therefore a better structural match for the problem than one that is. The training pipeline is adapted from MD4 (Shi et al., 2024) and the dataset is DeepMind's Boxoban (Guez et al., 2019). The trained model and instructions for generating puzzles are publicly available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。