{{ heroTitle }}

Automated Code Generation for Algorithm Visualization with 100% Success Rate.

# LLM-generated tracker (AlgoGen)

                
200
LeetCode Tasks
100%
Success Rate
Zero
Hallucination

From Text to Traces

AlgoGen decouples algorithm logic from rendering. Instead of directly authoring renderer-level scripts, it generates Code Tools and verifiable traces.

1

Task Input

Complex algorithm description (e.g. LeetCode)

"Implement Dijkstra's algorithm..."
2

Tool Maker

LLM generates Python Tracker

class Visualizer:
  def add_node(...):
3

SVL Trace

Execution generates standard IR

{ "op": "addNode", "id": 1 }
{ "op": "highlight", "id": 1 }
4

Rendering

Deterministic Engines

Manim Three.js TikZ
Pipeline Replay

Structured Digest → SVL Trace → Render

Steps
Current
{{ currentPipelineDemo?.source?.dataset }}
{{ currentPipelineStep?.title }}
{{ currentPipelineStep?.subtitle }}
{{ line }}
Preview
{{ currentPipelineDemo?.source?.task_tag }}
No preview video

Why Not End-to-End Scripts?

End-to-end Manim script generation forces the model to jointly handle algorithmic correctness, layout, and renderer APIs inside one long program, leading to unverifiable code, layout jitter, and cascading errors on complex tasks. AlgoGen instead turns LLMs into tool makers that emit verifiable execution traces, which deterministic renderers replay into videos and interactive scenes.

e2e_model.draw(graph)

• Edges missing / crossing
• Node colors drift
• No step-level control

E2E Model Output
svl_trace · renderer
Same SVL · Manim / Three.js / TikZ

• Structure preserved
• Timing encoded in trace
• Swap backends without retraining

AlgoGen (SVL + Renderers)
⇤ ⇥

End-to-End Script Pain Points

  • • Directly authoring long Manim scripts yields code-only animations with no structured execution trace, making correctness hard to verify beyond manual spot-checking
  • • Ad-hoc coordinates cause layout jitter and overlap across frames, since the model must plan canvas-level layout implicitly inside the script
  • • Fixing errors requires regenerating entire scripts, and the model must implicitly simulate long-horizon execution, so early mistakes cascade and are hard to localize

AlgoGen Advantages

  • • LLM outputs an instrumented Python tracker plus a schema-validated trace IR, so execution steps are locally checkable and comparable to references
  • • The same validated trace is reusable across inputs and backends (Manim videos, TikZ figures, Three.js), decoupling algorithm logic from rendering details
  • • Errors localize to specific trace steps with structured diagnostics, while deterministic renderers and style templates handle layout and aesthetics

Interactive Sandbox

Experience the generated SVL traces in real-time 3D or exportable media.

Render Mode

{{ currentRenderDescription }}

{{ selectedSample?.tex_file || 'output.tex' }} LaTeX
{{ texContent }}
Paper Figure Preview
TikZ Generated Figure
Generating Preview...
{{ speed }}x

{{ currentSampleInfo.category }}

Task: {{ currentSampleInfo.task_id }}
Seed: {{ currentSampleInfo.seed }}
Scroll to zoom • Drag to rotate
Loading Trace...