Hacker News new | ask | show | jobs
by aetherspawn 53 days ago
The reason this cost so much is because the AI has the ridiculous goal of getting identical assembly output.

The agents would have had to mess around with compiler versions, optimisation options, and the phase of the moon as well.

If you just went for functional equivalence, it would probably cost 10x or 100x less tokens.

Another false economy was using Sonnet instead of a more intelligent model like Sol 6.1 (1), which would have cost more per token, but is 100x or so better at reverse engineering and coding and therefore can chew through the source code much quicker and make fewer mistakes, meaning less work needing to be scrapped.

In my testing doing a similar task, I ran multiple sonnet for weeks and burnt through ~$1000 in tokens to get 20% completion and output that was pretty bad. After switching to Sol 6.1, it finished the whole task in around 2 days, cost around $50, and it did it with zero supervision and a single /goal.

(1): struggle to use Opus for reverse engineering, too many safeguards. OAI has virtually none, and uses way less tokens so is more economical.

4 comments

Identical output isn’t ridiculous. It’s pretty much a requirement to ensure the game actually is the same in every way. These decomp projects are pitched as a high performance alternative to emulation.

No one is going to use it if it’s a kind of close but not really reimplementation.

Testing functional equivalence is also pretty much impossible. How would you for example test the new one has exactly the same bugs which haven’t been discovered yet. Or doesn’t introduce new ones? This stuff matters for speed runners.

It’s ridiculous because something as simple as the compiler picking different registers is going to make zero functional difference but give a false negative on assembly compare.

Yet the C code can’t pick what registers to use, so the poor agent is probably shuffling the code around randomly for hours or days until it matches.

That’s probably why the agent dropped down into inline assembly in the first place (the author complained about this), because I bet it’s thinking trace was that this is futile.

Compilers themselves are not even deterministic and running them multiple times creates different assembly.

> Yet the C code can’t pick what registers to use, so the poor agent is probably shuffling the code around randomly for hours or days until it matches.

Humans too do that for matching decompilation. Or at least I imagine so, given that I personally refuse to do that.

People have different goals and will use different techniques to achieve them. The video game reverse-engineering/decompilation community isn't a hive-mind, I went ahead and created ghidra-delinker-extension because I had my own ideas on how to do that.

Isn't MW2 rooted in id tech engines? Last I checked there was raw assembly inside the code base. I would have started with quake 2/3 whatever source code and tried to match that up with Claude first - some of it has to have survived (though I doubt much)
How do you know the original code didn't use some undefined variable on stack, but happened to consistently work because something else spilled a register containing "suitable" value?
I think I disagree when it comes to bug reproduction. Doesn't seem I'm alone in that.
I think you're overlooking an important point here. While the token consumption might feel extremely high, I think it's a bit deceiving.

Due to this strict harness, we were able to use extremely dumb models efficiently. I think at least 200-300B of tokens (maybe even more) were processed by Luna.

Given that Astra for example is 100x more expensive per token than Luna, a high token consumption doesn't necessarily mean high cost. So these 300B Luna tokens would equate to 3B Astra tokens and roughly 15B Sol tokens.

Unfortunately a huge part of the logs is lost, so I can't do a detailed analysis on which models were used, how much they cost, etc.

> Due to this strict harness, we were able to use extremely dumb models efficiently.

With all due respect I seriously doubt that. What are you doing that's different? Almost every test between just Opus and Opus conducting cheaper agent swarms ends up with Opus getting better results at a lower cost. People set up harnesses just like yours and see this.

> Almost every test between just Opus and Opus conducting cheaper agent swarms ends up with Opus getting better results at a lower cost.

Do you have any links to these tests? I've had a hunch that this was true for a while but haven't found any benchmarks showing it.

Interesting that you used ida mcp.

I tried giving glm 5.3 ghidra. I found that it frequently did better just reading the actual assembly, where needed writing decompilers in real time, in the terminal.

The reasoning showed that it was able to write ghidra as needed and indeed where necessary simply read assembly tokens.

Trying to think about ghidra probably confused it.

I also think that there is a gradient of losing intelligence in refusals, opposed to a simple boolean refuse. I suspect that using an abliterated model would boost the intelligence way up.

I don’t recommend always using Astra for RE but in my experience I’d use Sol as minimum. As of recently, perhaps upgraded Terra is good value, but in general it seems like you want the smartest model that is economical to run 24/7 and Astra isn’t economical.
Identical assembly output is the only way to get functional equivalence, otherwise you're getting equivalence in some percentage of situations, but not 100%. Your bug is my feature etc.
I wouldn't consider it an unreasonable goal when it's been the standard nearly all previous pre-ai re projects have held themselves to.