GrandCode wins Codeforces: the last human coding stronghold falls
An AI system has beaten every human in live competitive programming — not in a controlled evaluation, but in three consecutive Codeforces contests, placed first in all of them, and finished every problem before any human did. The paper documenting it, quietly updated on August 5, is the closest thing coding has to an AlphaGo moment. Here is how GrandCode works, why it matters, and why you should be skeptical about parts of it.
The ladder to the top
To understand what just happened, the timeline helps. In 2022, DeepMind's AlphaCode reached a Codeforces rating of roughly 1300 — about the top 54% of competitors. It was impressive, and it was nowhere near elite humans (AlphaCode). AlphaCode2 improved to the 85th percentile in late 2023, still solidly below grandmaster level (AlphaCode2 technical report). In April 2025, OpenAI's o3 ranked 175th globally on the platform — a leap, but still behind the top few hundred humans. Then in February 2026, Google's Gemini 3 Deep Think reached 8th place, the best AI result ever — and notably, it was achieved outside live contest conditions, without the time pressure, submission penalties, and one-shot nature of a real round.
Two months later, in March 2026, the Ornith team's GrandCode took first place in three consecutive live Codeforces rounds: Round 1087 on March 21, Round 1088 on March 28, and Round 1089 on March 29 — beating every human participant, including legendary grandmasters, and finishing all tasks first in each contest (GrandCode paper, v3). That is a one-year jump from 175th to 1st. The paper's authors — Xiaoya Li, Guoyin Wang, Songqiao Su, Chris Shum, and Jiwei Li — are direct about what it means: "AI systems have reached a point where they surpass the strongest human programmers on the most competitive coding tasks."
What GrandCode actually is
The name sounds like a single model. It is not. GrandCode is a multi-agent reinforcement learning system that orchestrates several specialized components: a hypothesis generator that proposes intermediate claims and structural properties before attempting a full solution, a main solver responsible for reasoning and code generation, a test-case generator that produces adversarial inputs to break proposed solutions, and a summarization model that maintains a compact memory of long reasoning traces (Ornith announcement). The system is built on Qwen 3.5 as its foundation model, chosen — per the paper — for its accessible SFT pipeline and multimodal capabilities, with Kimi 2.5, GLM, and other closed-source models used for data generation in various modules.
The architecture is worth sitting with, because it is not what most people picture when they think "an LLM solved the problem." A lightweight classifier routes each problem to one of five difficulty levels. Easy problems get direct generation with large batch sizes. Hard problems trigger an online test-time reinforcement learning loop: the solver generates candidate solutions, the test generator attacks them, feedback flows back, and the policy keeps adapting — during the contest itself, against the clock. Only the main solver is updated at test time; the auxiliary models are fixed.
Agentic GRPO: the algorithmic core
The genuinely new research contribution is an algorithm the team calls Agentic GRPO. GRPO — Group Relative Policy Optimization — was introduced in DeepSeekMath in 2024 as a cheaper alternative to PPO that eliminates the critic model by normalizing rewards within a group of samples (DeepSeekMath). It became the workhorse of reasoning-model training, powering DeepSeek-R1 and much of the post-training wave that followed.
Standard GRPO assumes a single-stage rollout: generate an answer, score it, update. GrandCode's problem is that each agentic rollout is multi-stage — hypothesis, then solution, then test generation, then revision — and the reward is delayed until the very end, when the submitted code passes or fails the hidden judge tests. Worse, a single evaluation can take over a minute (compile plus run), so by the time a reward arrives, the policy that produced the rollout has already been updated several times. That is the "severe off-policy drift" the paper keeps returning to: you are training on tokens generated by an older version of your own model.
Agentic GRPO attacks this with two mechanisms. First, an immediate reward: intermediate stages get a reward signal as soon as they complete, so credit assignment doesn't wait for the final judge verdict. Second, a delayed correction: when the final reward does arrive, it is used to correct each earlier stage's reward, so a solution that looked good mid-rollout but failed the judge gets retroactively penalized. The paper also borrows asynchronous pipeline-RL techniques, where sampling and training run concurrently, and applies a staleness weight that downweights older off-policy tokens (M-GRPO, related multi-agent GRPO work).
This is the part that generalizes beyond competitive programming. Every agent framework — coding agents, browser agents, research agents — faces the same two problems: rewards arrive only at the end of long multi-step trajectories, and the policy drifts while the rollout is still in flight. GrandCode is one of the first systems to publish a concrete, working answer to both.
The test generator is the secret weapon
Ask any competitive programmer how they get good, and they will mention stress-testing: write a brute-force solution, generate random small inputs, compare against the fast solution, find the mismatch, fix it. GrandCode industrializes exactly this. Its test-case generator is trained — via supervised fine-tuning on a Qwen-3.5-27B base — to produce adversarial examples conditioned on the problem statement and the candidate solution.
The paper describes two complementary strategies. "Difference-driven" generation looks at how two candidate solutions diverge and generates inputs that expose the divergence. "Solution attack" generates cases specifically designed to break the candidate — boundary conditions, large inputs, pathological structures. On a benchmark of 50 real Codeforces problems judged by the actual Codeforces judge, the base test suite passed 42; adding difference-driven generation and solution attack raised it to 48; and feeding submission feedback back into online generation closed the gap to 50 out of 50 (Section 5 of the paper).
The hypothesis generator deserves its own mention. Rather than searching for a full solution, it proposes a compact conjecture — say, "the answer equals the maximum distance between first and last occurrence of any value" — then verifies it by brute force on small instances, feeds counterexamples back, and iterates until the conjecture holds. It even queries the On-Line Encyclopedia of Integer Sequences when it computes small-output sequences, using known patterns as clues. This mirrors how strong human contestants actually think: form a hypothesis, test it cheaply, refine it.
The system also trains a summarization model because reasoning traces for hard problems routinely exceed 100,000 tokens — too long for efficient inference and too hard for RL to optimize directly. Chunked summaries keep the long-context reasoning usable.
What the infrastructure says about the future
GrandCode is not cheap. The paper describes a main MoE solver on a dedicated distributed GPU mesh with expert parallelism and long-context context parallelism, auxiliary dense models served on separate GPU pools, and a CPU sandbox pool handling code execution, brute-force checking, and test generation. The attention architecture mixes DeltaNet layers with softmax attention in a pipelined context-parallel scheme — systems work that reads like an inference-optimization paper as much as an RL paper.
The honest framing: this is a laboratory-grade system with serious compute behind it, competing against a human with a laptop and two hours. The result is a milestone for AI capability, not an even match. That asymmetry matters for how you read the headline "AI beats all humans" — it is true, and it is also an arms race, not a fair fight. Still, the direction is unambiguous: when the compute is available, the ceiling is gone.
The results, in numbers
The paper reports scores under two accounting conventions. S(joint) sums scores from all submissions made through a single account — the official standings. S(separate) sums each task's score at the moment it was solved, treating submissions independently. For Round 1087: S(joint) 8,334 and finish time 00:51:11. Round 1088: 15,008, finish 01:40:35. Round 1089: 9,506, finish 00:56:43. In all three, GrandCode was first to solve every problem — the standings are reproduced in the announcement and paper.
The team's internal benchmark progression tells the training story: a post-training model at a 72% accept rate and 7/20 hardest (Level 5) problems solved; full RL training lifts that to 81% and 13/20; adding test-time RL reaches 85% and 15/20 (independent summary). Notably, the biggest gains from test-time RL come on the hardest problems — exactly where live adaptation should help most.
The skeptical case
Before declaring the humans dead, consider what a skeptic would say.
First, Codeforces itself prohibits AI-generated content — the paper concedes this directly: "Codeforces has policies against AI-generated content, and accounts suspected of using AI face removal." GrandCode competed under ordinary-looking handles (averyjones1, yokeko, Vortex1). The paper treats this as a compliance footnote; a skeptic reads it as an open question whether these placements would stand if the platform enforced its own rules retroactively. The results were not disqualified — but the rule exists because the platform does not want AI in its human leaderboard.
Second, this is a single-team preprint. There is no independent verification of the live runs, no open weights for the system, no replication by another lab. The solutions were published on GitHub, which is more than most labs do, but the training recipe — data pipelines, RL hyperparameters, compute budget — remains a black box. The same is true of most frontier results, but it is worth remembering when evaluating a "first ever" claim.
Third, the narrowness objection. Competitive programming is a beautifully well-specified domain: the problem is fully defined, the judge is objective, success is binary. GrandCode mastered that domain. Real software engineering is fuzzy, collaborative, long-horizon, and full of legacy systems and ambiguous requirements — a different sport. The jump from "wins Codeforces" to "replaces senior engineers" is the same logical leap as "wins at chess" to "runs a logistics company," and history says that leap is slow.
Fourth, the compute asymmetry noted above. A multi-GPU MoE mesh with live RL updates during the contest is a qualitatively different competitor than any human. The right comparison is not "AI vs. human" but "frontier-scale compute vs. a person."
What it means for the industry
Even with all caveats, the practical consequences are real. Competitive programming was the last benchmark where humans held the top rung, and it was doing real work in the world: elite contests were the credential for the hardest engineering roles, and algorithmic interviews are a direct descendant of contest problems. When the top of that ladder is occupied by an agent, every signal downstream — interview loops that imitate contest formats, hiring filters built on contest ratings — loses its meaning as a measure of human skill. Expect interview formats to shift toward agent-augmented evaluation faster than most companies are prepared for.
It also lands at an awkward moment for the coding-agent market, where Meta just shipped Muse Code and the incumbents are Claude Code and Codex (Reuters on the coding-agent wars). GrandCode is not a product — it is a research system with heavy infrastructure — but it demonstrates that multi-agent RL, not just bigger base models, is a compounding advantage. The same lab's earlier CUDA-L2 work used LLMs plus RL to write CUDA kernels that beat NVIDIA's cuBLAS by 19–26% (CUDA-L2 paper). RL that improves the most hand-tuned kernels in existence and RL that wins live programming contests are the same thesis: guided search beats human expertise in optimization domains. That thesis is now demonstrated twice by the same group.
There is also a geopolitical flavor worth noticing. GrandCode is built on Qwen 3.5 — an open-weight Chinese foundation model — and credits data generation to Kimi and GLM, both Chinese labs. The most significant AI milestone of the month runs on the open-weight ecosystem that US policy has been debating how to treat. The White House's new voluntary safety-review guidelines, finalized the same week, exempt open-weight models entirely; the frontier result built on them is a live demonstration of why that exemption is contentious (Politico on the open-weight exemption).
What to watch next
Three things. First, replication: whether another lab reproduces live-contest wins with a different base model, and whether Codeforces changes its rules in response — an AI division, like Chess.com's, would be the honest accommodation. Second, whether the next stronghold falls: mathematical olympiads and theorem proving are the obvious candidates, and the hypothesis-generation machinery in GrandCode is directly transferable to math. Third, the Agentic GRPO technique itself — if it becomes the standard training recipe for long-horizon agents, GrandCode's most lasting contribution will not be the trophies, but the algorithm.
The honest summary is that both the celebratory and the skeptical readings are correct. Yes, an AI system beat every human in live competitive programming, three times running, and the technical work behind it is genuinely novel. And yes, it is a single unverified preprint from a compute-heavy lab competing under a platform rule that technically forbids it, in a narrow domain. What is not in dispute is the direction: one year ago the best AI ranked 175th; this March it ranked first. The ladder is climbed, and the next rung is not in competitive programming anymore.
If an AI wins Codeforces, what does competitive programming mean now? Tell us in the comments.
Sources: AlphaCode · GrandCode paper, v3 · Ornith announcement · Reuters on the coding-agent wars