Downloads · 30 days
0
Pranav070904/VLA-Maze-Solver
VLA-Maze-Solver is a machine learning model from Pranav070904. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
--- license: mit tags: - reinforcement-learning - robotics - vision-language-action - behavior-cloning - navigation - pytorch ---
Downloads · 30 days
0
Access
Public
Updated Jul 26, 2026
Repo size
4.7 MB
Likes
0
Public
Click a slice to open those files.
.pt4.7 MB · 100%
From the Hugging Face model README
license: mit tags:
A small Vision-Language-Action (VLA) agent that navigates procedurally generated mazes by following free-text instructions (e.g. "go to the red goal", "find the green dot", or even "grass coloured target"), trained via behavior cloning against an A* expert.
Full code, training scripts, and demo videos: GitHub
The model takes a 64x64 RGB image of the maze and a free-text instruction as input, and outputs a discrete action (up/down/left/right) plus a value estimate. It combines:
See transformer.py in the linked GitHub repo for the full architecture.
Trained on ~12000+ procedurally generated 5x5 mazes, with an A* planner supplying the optimal action at each sampled state (behavior cloning / imitation learning, not reinforcement learning). Training dataset can be regenerated by running collect_bc_dataset.py from GitHub.
| Metric | Value |
|---|---|
| Validation accuracy (held-out mazes) | 99% |
| Rollout solve rate (unseen mazes, greedy policy) | 96–99% |
| Wrong-goal rate | ~0% |
| Zero-shot instruction generalization (16 unseen phrasings) | 99.2% avg solve rate |
The model generalizes to instruction phrasings never seen during training — including words like "crimson" or "grass coloured" that never appeared in the training set — because the frozen CLIP text encoder already places these semantically close to "red"/"green" in embedding space, and the model's cross-attention learned to key off that direction rather than memorizing literal training sentences.
import torch
from huggingface_hub import hf_hub_download
# download the checkpoint
ckpt_path = hf_hub_download("Pranav070904/VLA-Maze-Solver", "bc_init_v3_epoch20.pt")
# load into the model (see GitHub repo for the VLA class definition)
from transformer import VLA
agent = VLA()
ckpt = torch.load(ckpt_path, map_location="cpu")
agent.load_state_dict(ckpt["model_state_dict"], strict=False)
agent.eval()
Full demo script (encodes any free-text instruction live with CLIP, generates a fresh maze, saves an episode video) is available in the GitHub repo as demo.py.
Built with CLIP (OpenAI) for language encoding and mazelib for maze generation.