Pathfinding is a fundamental task in game AI, traditionally solved through graph-based algorithms or reinforcement learning. However, these methods rely on symbolic representations and lack end-to-end visual generalization. This study explores a novel approach that reframes pathfinding as a generative task using diffusion models, where navigation is directly learned from visual inputs. Two architectures are investigated: Stable Diffusion, fine-tuned with LoRA on maze-path image pairs using an image-to-image pipeline; and AnimateDiff, a video-based diffusion model trained to generate path progression animations from maze inputs using both noise-to-video and image-to-video pipelines.
Experimental results demonstrate that Stable Diffusion fails to generate coherent or goal-directed paths, which highlights the limitations of static image transformation for structured tasks. Similarly, the image-to-video pipeline of AnimateDiff proves ineffective, which often disregards the input maze and producing hallucinated content. In contrast, the noise-to-video pipeline of AnimateDiff succeeds to generate plausible and visually consistent pathfinding sequences that align with the structure of A*-generated trajectories.
These findings suggest that AnimateDiff’s cross-frame attention mechanism is capable of capturing the co-evolution of map structure and path progression, but lacks the ability to condition path generation on a fixed, externally provided maze. This highlights both the potential and current limitations of diffusion-based visual planners, especially in tasks requiring spatial consistency between input and output domains.