stack_machine_golf
hardinstructionsText
results
Measured by instruction count — lower is better.
5132 insn1026 insn
sota
Usage
Run the reference answer to verify your environment is set up correctly
$ harbor run -p tasks/stack_machine_golf
Test model
$ harbor run -p tasks/stack_machine_golf \ -a claude-code -m claude-opus-4-6
Description
Write a program for a pure stack machine (no registers) to compute a 256-element integer dot product using as few executed instructions as possible. The VM supports stack/memory ops, basic arithmetic, and simple control flow. The result must be on top of the stack at halt.
Files
path
permission
/app/program.stk✎ Edit/app/main.cRead-only/app/MakefileRead-onlyRules
- 01Edit /app/program.stk only.
- 02Scratch memory at addresses 1024..1039.
- 03Wrong final result or infinite loops score 0.
Tags
stack-machinesuperoptimizationassemblyvminstruction-countcode-golf
Model Results
Click a row to view its trajectory in Live Lab
model
reward
score
1.000
1.000
DeepSeek-V4-Pro
1.000
Grok-4-20
0.960
MiMo-V2.5-Pro
0.790
Kimi-K2.6
0.670
0.480
Hunyuan-3-Preview
0.380
0.190
0.160
Qwen-3.6-Plus
0.000