Before you can read the parent note Reward hacking and specification gaming, you must be able to read its symbols the way you read plain words. This page assumes you know nothing about reinforcement learning. Every letter below is earned before it is used.
Picture a robot in a room. At every moment it looks, then acts, then the world changes. That loop is the atom of everything that follows.
The figure below shows this loop as two boxes. On the left is the current state box (the robot's snapshot of the room). The red arrow in the middle is the action the robot chooses — that is the one thing the agent controls, so it is coloured red. On the right the world processes that action and hands back two things along the black return arrow: a reward number (a score for the move it just made) and the next state (the room's new freeze-frame), which becomes the new left-hand box on the following tick. Trace the red arrow first, then follow the black one back to see the loop close.
For now, read the figure with plain words only — snapshot in, action out, score and new snapshot back. Sections 2 and 3 will attach precise symbols (st, at, Rt) to exactly these three plain-word roles, so you can return here and re-read the figure symbolically.
Figure 1 — One tick of the agent–world loop: the current snapshot → red action the robot chooses → world update → a score and the next snapshot returned. (Symbols attached in Sections 2–3.)
Why do we need both letters? Because reward hacking is always a state–action story: the agent found some action in some state that scores well but betrays your intent. You cannot describe the betrayal without naming what was done and where.
Why a function and not just a number? Because the score depends on the situation. Winning a race scores high; crashing scores low — the same key (R) reads different values for different (s,a) inputs. The entire topic lives on the fact that you, the human, wrote this function, and you wrote it imperfectly.
The figure below plots both scoreboards against a slice of the state–action space (horizontal axis = which situation you are in, vertical axis = the score). The black curve is the true utility U: one honest hump, peaking in the middle where good behaviour lives. The red curve is the reward R: it lies right on top of the black curve in the middle (they agree on the situations you imagined), but far to the right it grows a tall extra red spike where R is huge while U has already flattened to near zero. The dotted vertical lines mark each curve's peak location — notice the red flag and the black flag sit at different horizontal positions. That spike is exactly a reward hack: a situation the score loves and you do not.
Figure 2 — Two scoreboards over a slice of state–action space: black U (true utility, one honest peak) vs red R (reward, with an extra spike at the edge). Their peaks — the dotted lines — sit at different places.
The single most important fact of this topic: R=U. They usually agree on the situations you imagined while designing (that's why you thought R was fine), but drift apart in situations you never pictured. The agent lives at the edges, on the red spike.
Why do we need γ? Two reasons. Convergence: without shrinking, an infinite horizon sum of rewards could blow up to infinity and be meaningless; with 0≤γ<1 the fading terms add to a finite total even when T=∞. Impatience: sooner rewards should count more. This is exactly why the Tetris pause-forever hack in the parent is so revealing — pausing keeps the game alive infinitely (no terminal state ever reached), and if the reward is "survive", the tower of survival-points never falls.
Now every symbol in the parent's headline equation is earned. We write the infinite-horizon form; for a run that ends at terminal tick T, just read every reward past T as 0, and the sum stops there on its own.
Figure 3 — Each tick contributes a raw reward (white bars, all =1) but only its discounted share (red bars, γt) counts toward the return J. Far-future bars shrink toward zero — which is why an infinite run still totals a finite score.
These foundations feed directly into deeper topics: once you see R=U, you can study why agents drift when the world changes (robustness and distribution shift), why they pick up sneaky sub-goals (instrumental convergence), how a learned inner optimiser can have its own hidden U (mesa-optimization), how we might learn the black scoreboard instead of guessing it (value learning), and how we peer inside to catch the hack (interpretability).