In this paper, we show that visual diffusion models can learn to predict the next best move (NBM) in tasks requiring sequential reasoning and lookahead, without explicitly exploring future steps or exhaustive searching at inference. Previous work demonstrated that these models can generate complete solutions to geometric and reasoning problems. Here, we show that simple fine-tuning on visual state--NBM pairs enables a pretrained model to select actions whose value depends on consequences several steps ahead. Each move is predicted directly in image space from the current state, without an explicit symbolic representation or search procedure. Repeated NBM predictions then construct a solution one decision at a time. We demonstrate this capability on chess puzzles and tile-based pathfinding, and show that it extends to Connect Four, Go and billiards. In chess, the model predicts legal moves and finds the best move far more often than by recalling similar training positions, including piece sacrifices whose benefit emerges only through later tactical continuations. In pathfinding, it constructs shortest paths on uniform-cost maps and cost-optimal routes across terrain tiles with different traversal costs, choosing longer routes when they are cheaper overall. These costs are learned implicitly from examples, without numerical cost supervision. These results show that direct visual move prediction can support globally informed decisions and successful sequential problem solving.
Figures & tables
Figure 2: Cost-aware navigation through successive next best move (NBM) predictions on two held-out maps. (a) The model chooses longer routes when they reduce total traversal cost by avoiding expensive terrain, and (b) accepts some high cost actions in cases where it makes the path much shorter. Terrain costs are learned implicitly from example solutions, without explicit numerical supervision.
Figure 3: A double queen sacrifice found without search, (a) by the image model, which predicts one move per call on the current board, and (b) by the video model, which predicts several moves together with the board states they lead to.
NBM Accuracy (%)
Symmetric boards (0 = no change)
One piece changed (%)
All ↑
Sacrifices ↑
Far from
Colour
Mirror
Keeps move:
Keeps move:
Finds new
training ↑
flip
best stays ↑
best changes ↓
best move ↑
Ours
Image model
56.0
46.3
50.4
+1.2
−1.9
82.3
35.3
39.5
+ majority vote
63.8
54.9
58.7
+1.2
−1.5
89.7
37.7
42.5
+ oracle of 8 samples †
85.4
83.5
82.3
–
–
–
–
–
Table 1: Recall or play? We compare our models on held-out chess puzzles, with single samples and with majority votes, against copying moves from the most similar training positions, both on held-out puzzles (“far”: 13–16 squares differ from the nearest training position) and on the same puzzles after a symmetry transform or a single-piece change (which can change the NBM dramatically). † At least one of 8 samples is correct. All models are trained on three million puzzles. More details and variants are in Appendix E .
Figure 4: Implicit policy. Every knight move gives check here, but scoring each move by the model’s denoising error puts 81% on Nh6+, the only winning move.
Figure 5: “top”: Two similar board configurations, where the only difference is an added white bishop on c3. “bottom”: how much our model’s confidence in the move drops when each piece is removed.
Task
Action drawn visually
Metric (%, ↑ )
Image
Video
Strongest baseline
Shortest path
route on a grid
optimal, held-out maps
88.8
94.6
base model, zero-shot
0.0
optimal, longer paths
47.0
66.6
base model, zero-shot
0.0
optimal, larger maps
79.0
79.8
base model, zero-shot
0.0
Cost-aware path (costs never shown)
route on terrain
cheapest route
87.5
82.8
fewest steps (BFS)
59.2
detour or cross
85.0
76.8
chance
50.0
Connect Four
disc in a column
legal, correct landing row
100.0
99.6
Table 2: Beyond chess. The same recipe, unchanged, on tasks whose actions are drawn as a route, a disc, a stone, or a continuous shot. Rules, tile costs, and physics are never given; the models learn them from example solutions alone. Routes are built move by move: the image model marks one move per call, and the video model generates several moves per clip.
Figure 6: One step reads the decision; full sampling draws one. On held-out chess (top), Go (middle) and Connect Four puzzles (bottom), the one-step output marks several candidate moves with varying strengths, and its strongest mark is read as the decision. Full 20-step sampling instead commits to a single move, and different noise seeds commit to different ones. In the chess puzzle, half the samples play Bxf3 instead of the mate Qxf6#, which the one-step output reads. Further quantitative results are in Appendix D .
Appendix figures & tables31 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: Billiards decisions and outcomes. Each column shows a held-out layout for one shot type: direct, bank, kick, or combination. Top: The video model’s unaltered output marks the shot with an aim line from the cue ball, a cue stick behind it, and a power bar whose fill indicates shot strength. Bottom: The corresponding simulator rollout. The dashed line traces the cue ball, and the ring marks the pocket that receives the red ball. The bank, kick, and combination layouts are hard, where no direct pot exists.
Task
Model
Steps
Batch
Resolution
Chess, 3M
image
375k
8
256
Chess, 3M
video
187.5k
16
256
Chess, 1M
image
125k
8
256
Chess, 1M
video
62.5k
16
256
Terrain path
image
24k
8
384
Paths
video
5k
16
384
Appendix
Table 3: Training configurations for the models used in the main results.
Figure 8: One step reads the decision, many steps sample it. An exact toy model with three moves (probabilities 0.5, 0.3 and 0.2) whose target images each tint one square, so that the moves are the corners of a triangle. Left: for every noise draw, the first estimate of the clean output is the probability-weighted average (star). During 20 steps, the estimate travels from there to one corner (lines). Right: the move returned over 2,000 noise draws.
Figure 9: One step draws the whole distribution. Top: for each puzzle, the marks of the model’s one-step output closely match the average of all moves weighted by the implicit policy q (Proposition 1): each candidate appears with its probability, and reading the strongest mark gives the most likely move, which a single 20-step sample often misses (bars: q vs. the share of 8 samples). Bottom: the same comparison for every square of 1,000 puzzles: the blue (red) tint of each square in the one-step output against πfrom ( πto ), the probability that a move starts (ends) there. The dashed line is an exact match.
Readout
Measured
Expected
20-step sample
57.1
55.6
Vote over 8 samples
63.8
64.7
Two-step sample
63.3
–
Implicit policy (legal moves)
67.0
71.4
Appendix
Table 4: One distribution, several readouts. Accuracy (%) of the image model of Tab. 1 on the first 1,000 test puzzles. Top: measured, and expected if the samples were drawn from the implicit policy q . Single-sample rows are averaged over eight noise draws. Bottom: the implicit policy’s most likely move against a single 20-step sample, with the puzzles split by the policy’s confidence.
Figure 10: Decisions commit early. Chess (left, Black to move) and Go (right, White to play, zoomed-in view). Each row follows one noise draw, and columns show decoded, unaltered clean-output estimates x^0 at the labelled noise levels and the final 20-step output. Bars show candidate mark strengths. The outline colour identifies the final move, legend fractions give full-sample frequencies, and stars mark the correct moves.
Figure 11: Different noise, different solutions. Top: Six routes on one map (dot: start, ring: goal). Matching colours indicate identical routes. Bottom: A hard Connect Four position, its faint one-step output, and six unaltered 20-step samples to the right of the dashed line. The green square highlights the played disc. All shown routes are optimal, and all shown Connect Four moves preserve the win.
Candidates
Committed
Median
Model
at σ=1
at step 1
commit σ
Chess image, unguided
3.7
47%
0.97
Chess image, guided
2.0
65%
1.00
Chess video
2.8
60%
1.00
Path image
1.2
90%
1.00
Path video
1.1
97%
1.00
Appendix
Table 5: Decisions commit early (validation items, chess models at one million puzzles).
Sampling
Image model
Video
steps
unguided
guided
model
1
38.0
–
50.1
2
38.3
38.8
48.3
4
34.8
41.5
47.4
8
32.2
41.9
44.6
15
–
–
42.5
Appendix
Table 6: Accuracy (%) on 4,000 test puzzles against the number of sampling steps (models at one million puzzles). Underlined: default, bold: best.
Task
Model
1
2
4
8
Full
Chess ∗
image
62.1
62.0
59.9
–
57.3
Chess ∗
video
61.8
61.6
61.1
–
55.6
Go
image
31.1
31.1
22.8
21.5
20.9
Connect Four
image
76.4
76.3
70.8
68.4
67.5
Connect Four
video
72.0
70.2
67.5
65.6
64.5
Billiards
image
28.0
27.9
24.0
20.2
18.6
Appendix
Table 7: Accuracy (%) against the number of sampling steps (full: 20 Euler steps for the image model, 30 UniPC steps for the video model). Chess ∗ : models of Tab. 1 , 2,000 validation puzzles. Go: 2,000 test positions. Connect Four: value-preserving move on the 1,000 hard test positions. Billiards: red ball potted on 2,000 test layouts. Terrain: cheapest route on 1,000 test maps. Shortest path: optimal route on 1,000 held-out maps. Detour or cross: 500 probe maps, with indented rows splitting them by whether the cheapest route crosses the costly band or goes around it (250 maps each).
Figure 12: Why routes need more steps. A terrain probe map where going around the costly band (yellow) is cheapest. Left: all cheapest routes around the band (green, cost 9) and the cheapest routes through it (pink, cost 10). Many of them share the first move towards the band. Middle: with one sampling step the image model outputs the average over these routes, so its first-move mark is faint and split (strength 0.24 towards the band, 0.08 around). The strongest mark is the shared cell, and the closed loop ends up crossing the band (cost 10). Right: with 20 steps the model commits to a single route, the mark is full (1.00) on the move around the band, and the route is the cheapest one (cost 9). Mark strength is measured on the model’s first output (0 = no mark, 1 = full mark).
Strength vs.
Agrees with majority
Accuracy
Model
frequency
1 step
1 sample
1 step
vote
Chess, image †
0.95 / 0.93
80.9
76.8
63.0
63.8
Chess, video
–
81.8
70.6
61.0
63.3
Go, image
0.85
62.5
46.2
32.1
29.3
Connect Four, image
0.87
80.5
57.0
76.4
76.0
Connect Four, video
0.79
72.5
52.5
72.0
71.3
Appendix
Table 8: The one-step output against the model’s own samples (1,000 items each, with 16 samples at full steps and † 8 for chess image). Strength vs. frequency: Pearson correlation, over all items and actions, between an action’s mark strength in the one-step output and the share of samples that choose it (chess: origin / destination squares, not measured for the video model). For chess these are 0.954 and 0.932, close to the correlations with the implicit policy in Sec. D.3 (0.954 and 0.929). Agrees with majority: % of items on which the one-step decision, or one full sample, equals the samples’ most frequent action. Accuracy: % correct, one step against the vote over all samples.
Figure 13: The first estimate on two other tasks. Top, Go: the position, the unaltered one-step output, the strength of each point in it, KataGo’s policy network, and how often the model’s 16 samples at 20 steps play each point (maps drawn as red discs scaled to their maximum). Bottom, Connect Four: the position, the one-step output, which marks several columns, and per column its share of the one-step mark strength against the share of the samples that play it. W / D / L: the solver’s value of each column, green: value-preserving. Rows: the positions with the most evenly split samples among those where the one-step decision is correct.
Accuracy on held-out puzzles (%)
Symmetric boards (0 = no change)
One piece changed (%)
All ↑
Sacrifices ↑
Far from
Colour
Mirror
Keeps move:
Keeps move:
Finds new
training ↑
flip
best stays ↑
best changes ↓
best move ↑
Ours, one million training puzzles
Image model
31.8
30.9
26.3
0.0
−4.0
62.5
42.7
20.4
+ majority vote
40.0
43.3
33.7
+0.2
−2.4
73.4
47.9
23.2
+ few-step
38.4
38.7
31.8
+0.7
−2.4
89.8
52.3
24.0
Appendix
Table 9: Recall-or-play results at one million puzzles, using the columns of Tab. 1 . “Guidance” denotes contrastive guidance ( Appendix M ), and the unguided image rows use the same mixture-trained model with w=0 . “Few-step” uses the image model’s validation-selected two steps. The 95% confidence intervals are at most ±1.0 points for all puzzles, ±3.1 for sacrifices, ±2.0 far from training, ±2.4 for symmetry differences, and ±3.8 for single-piece changes.
Figure 14: Changing a map mid-route. After a third of the route, one change is made to the gold cells: a wall appears on the next cell, a cheaper shortcut opens through former mud or sand, or a wall appears away from the route as a control. Left: examples for each change and model. Models that predict again after every move avoid the new wall, while a clip drawn before the change walks into it. Right: the fraction of changed-map routes that are cheapest (95% intervals).
Image,
Video,
Video,
Change during the route
closed loop
rec. horizon
clip
None (all maps)
92.1
89.1
87.8
Wall on the next cell
91.9
83.6
0 0.0
same maps, no change
91.2
89.6
91.0
Shortcut opens
80.6
72.9
10.6
same maps, no change
77.6
71.4
74.2
Appendix
Table 10: Changing a map mid-route on the first 250 terrain test maps. Entries give the percentage of episodes whose remaining route from the change point is a cheapest one on the changed map, among the episodes that reach that point. Italic rows show the same model and maps without a change. Because the measure starts at the change point, the first row is higher than the whole-route accuracy of Tab. 2 . “Clip” executes each drawn clip in full.
Model
Readout
First move
Later moves
Whole puzzle
Image, one step
single
62.5
62.8
38.3
vote of 8
63.2
63.3
38.8
any of 8
69.2
68.8
45.2
Image, 20 steps
single
56.0
57.0
31.1
vote of 8
63.8
64.0
39.2
any of 8
85.4
85.1
69.0
Appendix
Table 11: Whole-puzzle results for the models in Tab. 1 on 10,000 test puzzles (%). Later moves are predicted from the true board after the recorded opponent reply. “Any of n ” means that at least one of n samples is correct.
Required depth
1
2–3
4–5
6–9
10–30
Puzzles
7,748
1,246
537
317
145
Video, one step
69.2
47.5
44.1
41.0
44.8
Image, one step
67.8
48.0
41.5
37.9
39.3
One-ply rule
42.3
23.4
23.6
18.9
24.1
Majority of 16 nearest
29.2
19.4
20.3
18.9
15.9
Random legal move
0 5.6
0 4.9
0 4.8
0 4.8
0 5.1
Appendix
Table 12: First-move accuracy (%) of the models of Tab. 1 by the shallowest Stockfish search depth at which the engine’s best move is the puzzle answer. The one-ply rule plays a mate, otherwise the best capture, otherwise a check. On seven puzzles the engine does not play the answer at any depth up to 30, six of them mates in one with another equally good mate, and they are left out.
Puzzle ends in
Puzzles
Image
Video
Mate in 1
853
90.4
92.4
Mate in 2
944
85.3
87.2
Mate in 3
313
69.6
76.7
Mate in 4 or more
90
64.4
64.4
No mate
7,800
56.4
57.5
Appendix
Table 13: One-step first-move accuracy (%) of the models of Tab. 1 by how the puzzle ends.
Target
Chance
Board
+ move
Pretr.
Ours
Gain
Reply
2.7
32.1
40.9
39.2
47.8
+7.0
Follow-up
2.5
38.0
41.4
39.0
47.1
+5.7
Appendix
Table 14: Test-set average precision (%) for the future-move probes. “Gain” is measured against the best baseline. The 95% intervals are [+6.0, +7.9] for the reply and [+4.7, +6.7] for the follow-up.
Ply 1
Ply 2
Ply 3
Ply 4
(ours)
(reply)
(ours)
(reply)
Correct
41.7
20.1
12.2
2.0
Correct, given correct prefix
–
40.9
39.5
17.1
Imagined board exact
99.1
98.0
96.3
93.6
Appendix
Table 15: Accuracy of the video model’s imagined line on 10,000 test puzzles (%). Plies 2 to 4 are scored on the puzzles whose solution has that ply (9,141 for plies 2 and 3, and 4,594 for ply 4). A move counts as correct only when its raw drawing is legal on the imagined board and matches the puzzle move, so a clip that stops early counts as wrong. Imagined boards are scored after legal drawn moves.
Figure 15: The clip is resolved in order. Left: one chess clip of the video model at three noise levels, shown as its unaltered estimates of the boards after moves 1 to 4. A frame marks a board that has settled. Right: share of clips in which each board has settled, against the noise level. Relative to the board after move 1, the boards after moves 2, 3 and 4 settle later in 54, 74 and 90% of clips.
Task
Model
First move
With
p
only
continuation
Chess, 80k lines
video
0 8.7
11.0
6⋅10−13
Chess, 400k lines
video
21.4
24.6
5⋅10−14
Chess, 1M lines
video
33.7
41.7
3⋅10−64
Terrain path
video
82.5
95.0
3⋅10−24
Terrain path
image
83.1
97.3
5⋅10−31
Appendix
Table 16: First-move accuracy (%) after training with or without a continuation, using the same data and training budget. Chess: 10,000 test puzzles. Terrain: 1,000 test maps, scored on the cost-optimal first move. Connect Four: value-preserving first move on 1,000 hard positions. p values are exact McNemar tests.
Figure 16: Delayed-cue fork. Left: held-out maps where a single wall k cells away (orange) determines the first move, together with each of the four models’ drawn routes. Right: first-move accuracy against k for the four training targets (320 test maps per k , 95% intervals).
Figure 17: Learning the delayed-cue fork. Validation first-move accuracy during training. Vertical lines mark one, two and eight times the training budget of Fig. 16 . With the continuation the model passes 85% within 1,500 steps. Trained on the first move alone it needs 5,000 steps with a longer schedule and never exceeds 70% with the original one.
Figure 18: A wrong drawing can still guide the right move. Left: On a held-out board, one-pass completion fails, but executing the first queen and redrawing succeeds. Dark queens are already placed on the board, coloured queens are drawn, green marks the move taken, and crosses/checks mark completion validity. Right: Solve rates for one pass and the loop (top), and first-move accuracy by dead-end depth (bottom, dashed line is chance).
Training
Image, mixture
Image,
Video
examples
unguided
guided
best move
80k
–
–
–
12.7
160k
0 5.9
10.3
–
–
400k
14.6
19.9
–
26.4
1M
30.4
39.4
39.7
41.6
3M
–
–
56.7
54.8
Appendix
Table 17: Chess validation accuracy (%) versus training-set size, averaged over three seeds (image: 2,000 puzzles, video: 1,000). “Mixture” uses the prompt mixture of Appendix M , and “best move” uses the recipe of Tab. 1 .
Model
Text encoder
Cheapest
Detour or
sees image?
route
cross
Qwen-Image-2.1
yes
87.5
87.6
Qwen-Image-2.1, blind encoder
no
88.1
82.6
FLUX.2 [klein] (4B)
no
86.1
83.8
Wan2.2 video
no
82.8
76.8
Fewest steps (BFS)
–
59.2
50.0
Appendix
Table 18: Terrain pathfinding with different backbones and text encoders (% of test and probe maps). Image models draw a complete route in one image, and the video model draws and executes clips of up to eight moves.
Chess, one million training puzzles
Model
Passes
Test (%)
Qwen3-VL-32B, zero-shot
0
0 0.8
Qwen3-VL-8B, fine-tuned
1
42.0
Qwen3-8B, text (FEN), fine-tuned
1
40.9
DINOv2 + label output
1
21.8
DINOv2 + label output
8
50.0
Appendix
Table 19: Direct-prediction baselines trained on the same data. Top: chess test accuracy by number of passes over the training puzzles, where one pass uses as many updates as our image model. The text model reads FEN, while the others read board images. Our rows use the number of sampling steps selected on validation (three for the image model, which is trained on the best-move prompt alone, and one for the video model). † The chess-specific output scores each of the 64×64 origin–destination pairs. Bottom: delayed-cue fork. After one pass, classifiers use only nearby walls, and after twelve passes they solve every fork in the training layout.
Task (test set)
Steps
Single-task
One model
Baseline
Connect Four, keeps the win
2
76.3
77.3
60.4
Terrain, cheapest route
1
87.3
83.4
59.2
Terrain, cheapest route
20
87.5
81.7
59.2
Detour or cross
1
79.0
79.0
50.0
Detour or cross
20
85.0
83.0
50.0
Appendix
Table 20: One model for two tasks (%). One image model is trained on Connect Four and terrain together, starting from the pretrained model. Single-task models use the same examples and training recipe. Baselines are the one-move heuristic for Connect Four, a terrain-blind planner for pathfinding, and chance for the detour-or-cross probe.
Training
Model
Wall-clock
GPU-hours
Chess, 3M ∗
image / video
93 h / 79 h
1,487 / 1,268
Chess, 1M
image / video
51 h / 49 h
407 / 389
Go, 100k / 1M
image
19 h / 90 h
152 / 722
Terrain path
image / video
24 h / 9 h
195 / 75
Connect Four
image / video
9 h / 8 h
75 / 66
Billiards
image / video
32 h / 22 h
260 / 172
Appendix
Table 21: Training and inference cost. Top: training on A5000 GPUs, including periodic validation. Each run uses eight GPUs, except ∗ runs with sixteen GPUs across two nodes. Bottom: measured inference cost, including model loading and decoding. Pathfinding entries give wall-clock seconds per executed move.
Video diffusion models exhibit emergent reasoning capabilities like solving mazes and puzzles, yet little is understood about how they reason during generation. We take a first step towards understanding this and study the internal planning dynamics of video models using 2D maze solving as a controlled testbed. Our investigations reveal two findings. Our first finding is early plan commitment: video diffusion models commit to a high-level motion plan within the first few denoising steps, after which further denoising alters visual details but not the underlying trajectory. Our second finding is that path length, not obstacle density, is the dominant predictor of maze difficulty, with a sharp failure threshold at 12 steps. This means video models can only reason over long mazes by chaining together multiple sequential generations. To demonstrate the practical benefits of our findings, we introduce Chaining with Early Planning, or ChEaP, which only spends compute on seeds with promising early plans and chains them together to tackle complex mazes. This improves accuracy from 7% to 67% on long-horizon mazes and by 2.5x overall on hard tasks in Frozen Lake and VR-Bench across Wan2.2-14B and HunyuanVideo-1.5. Our analysis reveals that current video models possess deeper reasoning capabilities than previously recognized, which can be elicited more reliably with better inference-time scaling.
Diffusion models generate realistic images but often fail on visual reasoning tasks, such as filling in a Sudoku or drawing the path through a maze. When a discrete symbolic representation is available, recursive methods such as the Tiny Recursive Model (TRM) solve even hard instances of these puzzles. We ask how such reasoning can be carried over to pixels, where no symbolic representation is available. We propose Painter-Thinker (PaTh): a small recursive network (the Thinker) reasons over a grid of learned tokens that encode the noisy image and the conditioning, refines a latent state within every denoising step, and steers a frozen diffusion model (the Painter) through ControlNet adapters. The Thinker is trained with the standard reconstruction loss alone, without symbolic targets, a solver, or a verifier. PaTh solves 92.5% of hard MNIST Sudoku puzzles (prior best 75%) and 71.2% of extreme ones (prior best 4.1%), with 10M parameters against 82M for a standard diffusion model. It also improves on mazes, Queens, and CLEVR scenes with specified spatial relations, and its advantage grows with problem size. Diagnostic experiments show that PaTh recovers from injected mistakes that the diffusion model cannot repair, especially when many cells are wrong. Together, these results show that reasoning mechanisms developed for symbolic data can be integrated into pixel-space diffusion without symbolic supervision, opening a path toward generating data under increasingly complex constraints.
Paweł Skierś, Małgorzata Grzanka, Wojciech Masarczyk +2
Warsaw University of Technology · IDEAS Research Institute · University of Amsterdam
How do multimodal models solve visual spatial tasks -- through genuine planning, or through brute-force search in token space? We introduce MazeBench, a benchmark of 110 procedurally generated maze images across nine controlled groups, and evaluate 16 model configurations from OpenAI, Anthropic, Google, and Alibaba. GPT-5.4 solves 91% and Gemini 3.1 Pro 79%, but these scores are misleading: models typically translate images into text grids and then enumerate paths step by step, consuming 1,710--22,818 tokens per solve for a task humans do quickly. Without added reasoning budgets, all configurations score only 2--12%; on 20×20 ultra-hard mazes, they hit token limits and fail. Qualitative traces reveal a common two-stage strategy: image-to-grid translation followed by token-level search, effectively BFS in prose. A text-grid ablation shows Claude Sonnet 4.6 rising from 6% on images to 80% when given the correct grid, isolating weak visual extraction from downstream search. When explicitly instructed not to construct a grid or perform graph search, models still revert to the same enumeration strategy. MazeBench therefore shows that high accuracy on visual planning tasks does not imply human-like spatial understanding.