r/LocalLLaMA • • Jun 22 '26

Tutorial | Guide Same model, same prompt, 4 different agents

Setup: one self-hosted Qwen3.6-27B (Q4) on llama.cpp, identical prompt, identical hardware. The only variable is the agent scaffolding. Agents tested: pi, opencode, hermes, qwen code.

Task: a single-file 2D canvas solar system with scripted orbits and gravity that acts only on user-launched comets.

The exact prompt (note the explicit "build incrementally, your context window is small" instruction):

Build a 2D solar system simulation as a self-contained HTML file using <canvas> and vanilla JavaScript (no external libraries).
Scene
- The Sun is fixed at the center of the canvas.
- Several planets orbit the Sun on stable circular/elliptical paths. Planets and the Sun do NOT gravitationally affect each other — their orbits are fixed/scripted, not physically simulated against one another.
- Pure 2D, top-down view. Make the canvas resize to the window.
Gravity model
- The Sun and every planet each have a gravitational mass proportional to their visual radius (bigger body = stronger gravity), matching real-world relative sizes as closely as reasonable.
- This gravity only acts on comets (see below). It does NOT act on the planets or the Sun.
Comets
- The user can launch a comet by clicking and dragging on the canvas: drag direction and length set the comet's initial velocity vector (release to launch).
- Comets ARE affected by the combined gravity of the Sun and all planets (sum of forces), so they curve and can slingshot.
- Each comet draws a fading trail behind it.
- Remove comets when they fly far off-screen.
Controls
- A slider (range input) that scales the gravity strength of ALL bodies up and down proportionally in real time.
Constraints (important — your context window is small):
- Do NOT write one huge file in a single shot. Build it incrementally in small pieces.
- Keep the code compact and readable. Avoid unnecessary comments and verbosity.
- After finishing, tell me the filename so I can open it in a browser.

Results: all 4 produced a working sim, but the code quality differs a lot:

opencode, my pick. Cleanest architecture, mass ∝ radius exactly as asked, and the only one doing sub-stepped integration (×4 per frame) → by far the most stable comet trajectories and slingshots. Reads like a human wrote it. Minor bug: planet-gravity mixes absolute/center-relative coords, but the Sun dominates so you barely notice.

pi, most correct. Coordinate-consistent, distance softening to avoid singularities, removes comets that hit the Sun, planet labels, and the only one with touch support. Less flashy, most robust.

hermes, flashiest, but physically wrong. Only one with real elliptical orbits + a nice drag-vector arrow. But it computes planet gravity on comets at a different time step than it renders the planets, so comets pull toward where the planets aren't. Looks best, simulates worst.

qwen code, most minimal. Shortest, runs, but crude: huge launch-velocity multiplier flings comets off instantly, no softening, no stars.

Takeaway: with a fixed local model, the agent's scaffolding visibly changes the output (integration strategy, coordinate hygiene, edge-case handling). The prettiest demo (hermes) was the buggiest; the plain-looking one (pi) was the most correct; opencode hit the best balance of clean code + stable physics. Curious whether others get the same ranking on their own local setups.

92 Upvotes

67 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jun 22 '26

[deleted] — view deleted comment

1

u/therealpygon Jun 23 '26

Which situation do you think would be more accurate if I want to measure the 1/4 mile time of a car?

I borrow 3 other people's cars and I measure their times going roughly a quarter mile on the odometer with my phone. I test one car going downhill, one going uphill, one in the rain, and my car on the curved neighborhood road outside my house with stop signs.

OR, I have 3 other people bring their cars to the race track, then I have a professional drive each one straight down the same track. Different cars, same track, same measurements.

You cannot change two variables at the same time and expect useful results. You can either change the seed, or change the harness. If you change both, you've basically only tested randomness.

0

u/[deleted] Jun 23 '26

[deleted] — view deleted comment

2

u/therealpygon Jun 23 '26 edited Jun 23 '26

I don't think that is entirely representative of the role RNG plays and takes a "baby with the bath water" approach as in, "everything is irrelevant because one thing changed". If I lay out my trajectory on a map, "my house, the airport, flight to city, the hotel", you are suggesting that by taking a different turn on the first street out of my house, all other decisions are irrelevant and that in fact, you aren't going to go to the airport anymore, even though you have tickets, because now you're going to drive the whole way.

What I'm suggesting is, while you might take a different path, you are still likely to end up in the same general area where the same decisions may need to be made, and by changing the seed, you fundamentally change the decisions that would be made beyond the differences due to the harness. When all other things are equal, using a different seed can result in worse results; not using a consistent seed is simply injecting unnecessary variability and negates the usefulness of the tests because you have no ability to say whether the change was the result of a harness, or the result of a bad seed, even if the available tokens are different at some specific time.

0

u/soyalemujica Jun 22 '26

Because even though the harness of each CLI (system prompt) might give a slightly different outcome, the model is more reliable to yield the same results by the prompt you give them with the same seed value.

6

u/_TheWolfOfWalmart_ Jun 22 '26

I don't think that's accurate. As soon as one token is different, we're back to total unpredictability.

1

u/therealpygon Jun 23 '26 edited Jun 23 '26

It seems like you are suggesting that generating a maze and choosing to go left instead of right, is the same as generating an entirely different maze every time you run it?

To me, that seems inaccurate, but I would enjoy an explanation of how using a consistent psuedo-random generator has the same randomness as using a different generator every time.

I've always thought of the seeded randomness like using different rulers. If I measure 3 units on a consistent ruler, that is the same number every time. If I use differently numbered rulers with randomized values and at a different angle of measurement every time, it is unlikely I'll ever end up with the same result twice. So I'm interested in correcting my understanding.

0

u/KURD_1_STAN Jun 22 '26

So we can test the difference each harness's system prompt do.

3

u/_TheWolfOfWalmart_ Jun 22 '26

But using the same seed is irrelevant for this.

What you really need to do is multiple tests with each agent if you want to see if you can find a true difference.