On this page

The idea

One honest way to find out how good a move is: make it, keep playing to the end, and see how it went. Do it many times, with the luck falling differently each time, and average, and you have a measurement of the move: its rollout value. The policy that plays out the rest of the game does not have to be good. It has to be quick, and it has to be the same for every move you compare.

Once every move at a position has a rollout value, the improvement step is short: play the move with the best value. That is a new policy, built out of the old one plus a little measurement. Evaluating and improving in turn is policy iteration, and in the ideal case each lap produces a policy at least as good as the last.

A small example

Three cells in a row, a cliff on the left, a goal one step past the right-hand cell. Each turn you can step right, step left, or wait. A gust sometimes blows, and when it does it shoves you two cells to the left unless you spent the turn bracing, which is what waiting is. Your current habit is always step right.

  1. Evaluate the habit by rollouts. From each cell, follow the habit until you reach the goal or fall, twenty times, and count what happened. Every cell now has a number: the share of walks that reached the goal.
  2. Improve. In each cell, try each of the three actions once, then follow the habit for the rest of the walk, and keep the action whose walks came out best. If the gust is strong from the middle cell, waiting beats stepping right.
the position: middle cell, flag upcliff · 3 cells · goalhorizonreached the goalstep right5 of 8wait7 of 8step left0 of 8reached the goalwent over the cliff
From the middle cell with the flag up, each candidate first move is played out eight times with the habit (always step right) and its own run of gusts. A circle marks a walk that reached the goal before the horizon and a cross marks one that went over the cliff. The bar for each candidate is the share of its eight walks that reached the goal: the rollout value of the move.
  1. That one-step look-ahead over rollouts of the old habit is the new policy. Evaluate it, improve it, and repeat.
  2. Keep the comparison fair. Give every candidate action the same run of gusts, a device called common random numbers. Otherwise the difference between two actions is mostly the difference between two weathers.
the same eight turns of weather for every candidatestep rightgoal on turn 6gust on turn 1 shoves it to the left cellwaitgoal on turn 3braces through the gust, then walksstep leftcliff on turn 1a step into the gust, straight over
One recorded run of eight turns (a raised flag is a gust, a hanging one is calm) is replayed for every candidate. Under each tape the line shows where the walker stands after each turn, rising toward the goal flag or falling to the cross. Because the weather is identical, the difference between the three lines is the difference between the moves.
  1. Be conservative. Switch away from the habit only when the rollout advantage clears a confidence bound. A switch made on noise is worse than no switch.
middle cell, flag upthe habit's own valuestep right (the habit)waitstep left00.51share of walks that reached the goal, with an intervalthe whole interval for wait clears the habit: switchmiddle cell, flag downthe habit's own valuestep right (the habit)waitstep left00.51share of walks that reached the goal, with an intervalno interval clears the habit: keep stepping right
Each candidate's rollout value is drawn with an interval around it, and the dashed line is the value of the move the habit would make. Only an interval that sits entirely past the line earns a switch (the check); the rest keep the habit's move (the lock). The figure alternates between the same cell with the flag up, where waiting clears the line, and with the flag down, where nothing does.
  1. Notice the cost. Rollouts long enough to see what matters take a long time. Rollouts cheap enough to run in quantity are noisy.

How it works

At a position, list the candidate moves. For each one, play it, then hand the game to the rollout policy and let it play forward, either to the end or to a fixed horizon, recording the outcome you care about: points, moves survived, or both. Do this over a fixed set of imagined futures, and reuse the same set for every candidate, so that the only difference between candidates is what they did. Average each candidate's outcomes. Then compare the best candidate with what the current policy would have played, and switch only if a confidence bound on the paired difference clears a threshold fixed in advance.

Each part of that recipe trades one thing for another. More futures shrink the noise and multiply the cost. A longer horizon shows more of what a move set in motion and again multiplies the cost. A stronger rollout policy gives truer values and is slower per move. And the improvement step sees one move ahead: everything after the first move is played by the old policy, so every rollout inherits the old policy's mistakes.

In Drop7

A Drop7 position has up to seven candidate moves. A rollout here means forcing each column, then replaying the same imagined tape of next discs and hidden values through a quick continuation policy for a fixed number of moves, and recording how the game went. The experiments on this site used a one-move or two-move fair search as the continuation, horizons of 25 to 200 moves, and the fair depth-4 search (fair D4, the reference policy) as the policy to be improved. In most of them the rollout is a veto: it may override the search's choice only when a confidence bound says so.

Pages that use the method:

What it cannot do

The family that pursued this hardest summed up its own record this way: "When the measurement is cheap enough to run, it is too noisy to beat the reference; when it is faithful enough to trust, it is far too slow to play a game" (Terminal policy iteration).

Both halves have a record. The 25-move veto produced one game worth 404,047 points against 159,616 for the unchanged search on the same seed, and one game is an anecdote (Rollout veto). On 32 paired games under corrected scoring the veto was worse by 46,510.5 points per game, with 9 wins, 4 ties and 19 losses (finding-03, development tier). The cheapest policy-iteration variant improved every one of its four paired fitting games and still failed its frozen gate, which asked for 1.20 times the score and lifetime of the one-move fair search: it reached 1.0697 times the score and 1.0256 times the moves, and four games is a fitting screen (Public rollout policy iteration). The most faithful design, playing every candidate to the end of the game, took hundreds of seconds per move and was paused before it produced a policy result.

Two smaller lessons sit in the older pages. A rollout is only as good as the policy that plays it out: the earliest version lost to the very one-move policy it used as its continuation (Judging a move by playing the game out). And learning the labels instead of recomputing them did not escape the noise: the learned rankers' top-move accuracy fell below that of an exact two-move search (Long outcomes).