TRANSMISSION // 2611.34813v1
When AI Writes Code to Solve a Visual Task
Source published
On 500 synthetic visual tasks, three closed-model coding agents outscored the video models evaluated. The benchmark and workflows limit what the result shows.

Can a visual task be solved more reliably by generating a video or by writing code to draw the answer? A preprint compares particular coding agents and video models on the same synthetic benchmark. The coding agents score higher there, but the result does not establish which approach is better for visual reasoning in general.
Video generators can produce striking clips. But can a model also reason through a task shown in an image and show the solution unfolding? Researchers compared two approaches on a visual benchmark: give a video model an image and instruction and ask it to generate an answer video, or give a coding agent the same inputs and ask it to write a program that renders one.
The benchmark, VBVR-Pro-Bench, contains 500 instances across five categories: perception, abstraction, spatiality, transformation and knowledge. Tasks include locating or measuring shapes, following a route and applying rules to visual patterns. The procedurally generated scenes have symbolic ground truth, so a rule-based evaluator can score the answer videos automatically.
For each instance, coding agents received the first frame, the prompt and the required video format. They could inspect files, write and run code, and revise it in a CPU-based sandbox, with a 30-minute limit and one attempt. They could not access the ground truth or use image- or video-generation models. The researchers evaluated three closed-model coding agents and 23 runnable open-weight models. Video-model results came from the benchmark’s published leaderboard; the researchers did not rerun those models.
The three closed-model coding agents scored 0.923, 0.894 and 0.893 on a scale from zero to one. The strongest video model in the comparison scored 0.670. It had been trained with reinforcement learning on the benchmark’s task families, using the evaluator as a reward. The best open-weight coding agent scored 0.572, higher than every video model except that reinforced model. The closed-model agents led in each of the five categories, though the size of the difference varied.
One possible explanation is that code makes certain operations explicit: a program can locate colored regions, measure shapes, calculate a route and render the answer frame by frame. A video model must express the solution through video generation. The authors argue that programmatic solutions are especially natural for this benchmark’s clean, precisely rendered scenes, where code may recover the symbolic structure behind an image. That explanation is specific to these tasks, not evidence that code is inherently easier or better for visual reasoning.
The researchers also studied the closed agents’ programs. They classified 1,385 programs used by those agents to solve their own instances, distinguishing two styles. “Depictive” programs inspect the image at run time—for instance, locating objects and measuring their sizes—so the method can transfer to another instance of the same task family. “Propositional” programs use values the agent has already worked out, such as fixed coordinates, and render an answer for that particular instance. Such a program can produce a correct video without encoding a method that works on a new example.
The reported depictive share was 67% for perception programs, 45% for transformation, 33% for abstraction and 27% for knowledge. Propositional programs were most common in knowledge and abstraction. These categories describe the programs analyzed, not every solution the agents might produce. The authors also report that neither style predicted overall performance: a program’s output score alone did not show whether its method would transfer.
The findings have important boundaries. The benchmark uses flat colors, exact geometry and deterministic answers. The authors note that these conditions suit programmatic solutions and may let code recover the symbolic description from which an image was made. Ordinary footage—with texture, varied lighting and occlusion—poses different challenges, and may not have a symbolic ground truth or an answer that can be rendered by editing a few parts of the first frame.
The comparison also gave the two approaches different workflows. Coding agents could use tools and iterate for up to 30 minutes, while video-model scores were published leaderboard results rather than new runs under the same interaction process. Inputs, output format and evaluator were shared, but the systems were not tested with identical procedures or budgets.
This work is an arXiv preprint, and the available source does not establish peer review. Its result is therefore best read as evidence about the evaluated systems on this particular benchmark, not a general verdict on visual intelligence. On these verifiable synthetic tasks, writing code to render a solution scored higher than direct video generation. Whether that advantage holds for real-world visual reasoning remains open.
- visual reasoning
- coding agents
- video generation
- artificial intelligence
- program synthesis
- AI benchmarks
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Can AI Write a Game Controller, Not Just Pick a Move?
Shared method: Both papers evaluate systems that turn visual input into executable code and assess the code through execution: the origin paper has agents write programs that render task videos, while PlayScriptBench has VLMs synthesize controllers that act in games. The shared method is program synthesis from visual information, not a matched evaluation: the tasks, execution settings and outputs differ, and the origin paper’s benchmark results do not establish game-playing ability.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.34813v1 — Original paper
Excerpt reference:
static/papers/2611.34813v1.md:158-225
Basis: Paper text
Source SHA-256:32a1de98b7feb6164625ac88d05ba9d87fc58a29c8bb1a2131914b790b85573d2611.27741v1 — Original paper
Excerpt reference:
static/papers/2611.27741v1.md:132-170
Basis: Paper text
Source SHA-256:34d4020501128ce2a6c510620003059f53601b91f629f0fe6e81c5942d2d0962
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Could AI Think by Watching Its Own Imagined Scenes?
Source published
Shared keywords: artificial intelligence, video generation, visual reasoning
Can Coding Agents Build Programs That Play Modern Games?
Source published
Shared keywords: program synthesis
Why AI Still Misses Details in Complex Documents
Source published
Shared keywords: ai benchmarks, artificial intelligence
Can AI Write a Game Controller, Not Just Pick a Move?
Source published
Shared keywords: ai benchmarks, program synthesis
Why AI Gets Lost Between Seeing a Grid and Solving It
Source published
Shared keywords: ai benchmarks, visual reasoning