bvh_raytracer

mediumruntimeC++
results

Measured by wall-clock runtime in seconds — lower is better.

3.8s0.030s
sota
Claude-Opus-4.6
reward 0.440

Usage

Run the reference answer to verify your environment is set up correctly

$ harbor run -p tasks/bvh_raytracer

Test model

$ harbor run -p tasks/bvh_raytracer \
  -a claude-code -m claude-opus-4-6

Description

Optimize ray-triangle intersection for a primary ray tracer rendering a 638x638 image against a scene of 4096 triangles. The brute-force approach tests every triangle for every ray (1.67 billion tests per render). Build a Bounding Volume Hierarchy (BVH) to reduce intersection tests to O(log N) per ray.

Files

path
permission
/app/solve.cpp✎ Edit
/app/main.cppRead-only
/app/solve.hRead-only
/app/MakefileRead-only

Rules

  • 01Edit /app/solve.cpp only.
  • 02Standard library and SIMD intrinsics (<immintrin.h>) are allowed.
  • 03No external libraries. No multithreading.
  • 04ray.t errors > 0.01 units score 0.

Tags

cppbvhray-tracingsimdavx2

Model Results

Click a row to view its trajectory in Live Lab

model
reward
score
Claude-Opus-4.6
0.440
Kimi-K2.6
0.410
MiMo-V2.5-Pro
0.400
Gemini-3.1-Pro
0.390
DeepSeek-V4-Pro
0.370
Hunyuan-3-Preview
0.370
Grok-4-20
0.360
GLM-5
0.280
GPT-5.4
0.130
Qwen-3.6-Plus
0.110
MiniMax-M2.7
0.070