Skip to content
IFAI

Research

Sakana AI's coding agent beats 804 humans to win AtCoder contest

Published Reach 36

Sakana AI's ALE-Agent just took first place in the AtCoder Heuristic Contest 058, beating 804 human competitors in real time. Operating over four hours at a compute cost of roughly $1,300 across frontier models, the agent autonomously devised an optimization algorithm that outperformed the problem setter's intended solution. It marks the first time an AI agent has won a major competitive optimization programming contest.

Sakana AI's coding agent beats 804 humans to win AtCoder contest
Image: sakana.ai

Most people think of AI coding benchmarks in terms of LeetCode puzzles or simple autocomplete. But in the real world, the hardest engineering tasks are messy, open-ended optimization problems: factory scheduling, logistics routing, and complex supply chain logistics. These don’t come with clean answer keys.

Tokyo-based Sakana AI showed off a wild breakthrough: its ALE-Agent took first place in the AtCoder Heuristic Contest 058, leaving 804 human coders in the dust. It marks the first time an autonomous AI agent has won a major competitive optimization programming contest in real time.

AHC058 was a four-hour sprint held on December 14, 2025. The challenge revolved around planning hierarchical machine production, like apple-making machines and the upstream machines required to build them. While it sounded playful, the setup directly mirrored real-world manufacturing dependencies. Contestants had to devise algorithms that maximized total production by deciding exactly which machines to upgrade and in what order.

Outsmarting the contest designers

The most fascinating part is that the agent didn't follow the problem setter's playbook.

The contest author expected human experts to use a Greedy algorithm or Beam Search for broad planning, then polish the steps with Simulated Annealing (SA). Instead, ALE-Agent developed what Sakana calls a quintessential AI-style solution.

It invented a proprietary heuristic dubbed Virtual Power, which assigned speculative value to inactive machines before they were even built, effectively keeping the algorithm from taking short-sighted paths. When it ran Simulated Annealing, rather than just tweaking tiny individual steps, it introduced three distinct large-scale plan reorganizations using Greedy routines to escape local traps.

It also threw in relentless low-level speedups, precomputing lookup tables and shaving off redundant calculations that human coders rarely have the patience to write under time pressure. Two hours into the contest, ALE-Agent dropped its first submission and immediately jumped to first place. After a mid-contest dogfight with top competitor yosupo, the agent reclaimed the lead at the two-and-a-half-hour mark and held it all the way to the finish.

A $1,300 run across frontier models

Winning a four-hour high-level contest isn't cheap. The run cost around $1,300 in total compute, including roughly $1,000 in model API fees and AWS infrastructure.

Under the hood, ALE-Agent fired off 2,654 calls to GPT-5.2 set to high reasoning effort, and 2,119 calls to Gemini 3 Pro Preview set to high thinking level. It generated candidate programs in parallel, tested them, digested the telemetry into written insights, and fed those lessons back into the next iteration loop.

The problem's creator, Hiroomi Nochide, admitted he was stunned. Before the match, he assumed LLMs would struggle because greedy search requires nuanced intuition. Instead, the agent found a simulated annealing strategy that Nochide hadn't even anticipated. TopCoder veteran Yoichi Iwata similarly praised the agent's aggressive large-neighborhood search.

Still, Sakana is quick to point out that AI isn't invincible just yet. While ALE-Agent has notched top finishes before, this was its first actual trophy. Its virtual rating currently sits at 2592, which ranks 66th among active human competitors on the platform.

Why it matters

We think this is a huge moment because it takes AI reasoning out of synthetic math benchmarks and drops it squarely into real-world operations research.

In heavy industry, companies routinely spend millions of dollars and months of consulting hours just to squeeze a 2% gain out of warehouse logistics or chip floorplanning. If an agent loop can burn $1,300 over four hours and discover non-intuitive optimization tricks that outperform top human specialists, the enterprise economics are a no-brainer.

It also proves that inference-time scaling works best when you pair raw model reasoning with structured domain scaffolding. Sakana didn't just ask a single LLM to write code; they built an autonomous discovery loop that generates hypotheses, validates code against real simulations, and reflects on failures.

The obvious catch is cost and reliability. Burning $300 an hour on API calls makes this inaccessible to casual tinkerers, and a 66th-place overall ranking means human intuition still wins when edge cases get weird. But for enterprise optimization bottlenecks, the era of AI autonomously finding better engineering answers than human experts has officially arrived.

Sources (1)

  1. [1]
    sakana.ai(opens in a new tab)Originalsakana.ai

Best of AI, daily