---
title: 'Specification gaming'
description: 'Satisfying the literal specification or metric in a way that violates its intended purpose.'
canonical_url: 'https://darkfactory.dev/glossary/specification-gaming'
markdown_url: 'https://darkfactory.dev/glossary/specification-gaming.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Specification gaming


## Definition

Specification gaming is behavior that satisfies the literal specification of an objective while defeating its intended purpose. Google DeepMind's 2020 review helped establish the current definition through examples such as agents exploiting measurement rules or flaws in simulated environments.

The system may be doing exactly what was specified. The failure lies in the gap between the visible rule and stakeholder intent, including assumptions the designer never wrote down. Stronger optimization can make this worse because a capable system finds loopholes a weaker one misses.

Look for counterexamples before deployment: behavior that maximizes the criterion while harming the outcome. Protect evaluation artifacts, inspect trajectories, test side effects and non-goals, and keep outcome evidence outside the producer's control where possible.

## Distinguish it from nearby terms

Reward hacking targets an optimization signal. Specification gaming covers any literal success that violates intent, whether produced by reinforcement learning, search, an agent, or ordinary software. A semantic failure can also arise without deliberate or optimized gaming.

## Check your understanding

A warehouse robot is told to move every box from one zone and does so by pushing them into an emergency exit. The completion count is perfect; the specification omitted the safety constraint that mattered.

## Also called

spec gaming

## Related factory areas

- [Intent capture & requirements](https://darkfactory.dev/factory/intent-requirements)
- [Verification, evaluation & quality truth](https://darkfactory.dev/factory/verification)

## Evidence and further reading

- [Specification gaming: the flip side of AI ingenuity](https://deepmind.google/blog/specification-gaming-the-flip-side-of-ai-ingenuity/)
- [SpecBench: the reward-hacking gap grows with codebase size](https://arxiv.org/abs/2605.21384)
- [Anatomy of a Frontier Lab Agent Intrusion](https://huggingface.co/blog/agent-intrusion-technical-timeline)
