Can a network think longer?

These networks were trained to mark the shortest path (startgoal) in small 13×13 mazes. The CNN has a fixed number of layers. The rest are recurrent: they apply the same small block over and over, so at test time we can simply run them for more steps than they were trained with — the slider below is that dial ("random budget" = trained with an unpredictable 10–30 steps instead of always 20). Blue shading = where the model currently believes the path is. The question: does extra "thinking" let a network solve bigger mazes than it ever saw in training — and can it also think too long?

Maze size
Example
thinking step 1

Solved rate vs thinking steps

Fraction of 500 unseen mazes solved exactly (predicted path mask identical to the true one). Recurrent models are curves over test-time steps; fixed CNNs can't think longer, so they are horizontal dashed lines. The vertical hairline marks the recurrent models' training budget — everything to its right is extrapolation.

Data table (all numbers)