Square Minus Square – A coding agent benchmark
aedm.net·23h·
Discuss: Hacker News
📐Computational Geometry
Preview
Report Post

I tried several coding agents to implement the following task:

There are two squares on a 2D plane, possibly overlapping. They are not axis-aligned and have different sizes. Write a function that triangulates the area of the first square minus the area of the intersection. Use the least amount of triangles.

There is a single Rust function to be implemented in a standalone file, no dependencies:

pub fn generate(
center1: [f32; 2], rotation1: f32, size1: f32,
center2: [f32; 2], rotation2: f32, size2: f32,
) -> Vec<[f32; 2]> {
// TODO
}

I made a little framework that displays results. It can capture screenshots and video footage.

Several coding agents were tasked to implement the function, and I did it myself without AI, too. Agents are encouraged to generate screen…

Similar Posts

Loading similar posts...