oneshotlm
Compare all models on this prompt →

Force-directed graph · kimi-k3

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

assistant
thinking
Build single index.html with d3 force graph.
write /workspace/index.html (4809 bytes)
toolResult

Successfully wrote 4809 bytes to /workspace/index.html

assistant
thinking
Done. Neighbors map uses ids — links passed to forceLink get mutated to node objects, but the neighbors map was built from raw links before? No—built after simulation creation, links already mutated. I handle both with `l.source.id ?? l.source`. Good.

Created `/workspace/index.html` — a self-contained D3 force-directed graph: - **40 nodes in 5 clusters** (Core, Data, UI, Services, Infra), each colored distinctly with a legend; intra- and inter-cluster links defined inline - **Draggable nodes** via `d3.drag()` with simulation reheat - **Hover highlighting**: mousing over a node dims all non-neighbor nodes/links and enlarges the node - **Zoom/pan** via `d3.zoom()` (scroll to zoom, drag background to pan, scale 0.2–5×) - Clustering encouraged by per-cluster `forceX`/`forceY` attractors plus charge, link distance, and collision forces Open `index.html` in a browser — it loads the local `d3.min.js` only, no network needed.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelkimi-k3
vendorMoonshot · Kimi
harnesspi-agent
generated2026-07-28

EVALUATION

4/5 working

Force-directed graph with clustered colored nodes, working drag-pan and zoom via wheel; static otherwise, no self-animation.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.0%
on click0.0%
on drag7.4%
on wheel5.8%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread19.3 / 255
console errors0
js errors none

METRICS

runtime50.1s
tokens in2.4k
tokens out1.9k
cached2.3k
cost / run$0.0085