Concepts / Function Approximation in Reinforcement Learning

Function Approximation in Reinforcement Learning

The desired function is the function the learner would like to represent.

  • Programming

From Bandit Choices to Generalization

The 10-armed testbed shows that UCB generally performs better than epsilon-greedy action selection. UCB still explores: it investigates actions whose values are uncertain rather than eliminating exploration. However, this result belongs to a compact bandit setting. When reward distributions change over time or the state space becomes large, extending UCB becomes much more difficult. Function approximation addresses a related large-scale problem by helping reinforcement-learning systems generalize from available examples instead of treating every possible situation as completely separate.

Key point

The central transition is from selecting among a manageable set of actions to representing useful information across a potentially large state space.

UCB's Startup Choices

UCB has a special startup period. During the first k steps, it selects randomly among actions that have not yet been tried. These actions do not yet have reward experience available for comparison, so the startup behavior ensures that each action gets investigated. After this initial period, UCB can use the information collected about the actions and continue balancing estimated value with uncertainty.

First startup stepuntried actions remainRandom untried actionone action receives itsfirst trialFurther startup stepschoose randomly amongremaining untried actionsAfter k stepseach action has been triedchooserepeatuntil k steps
What happens during UCB's first k choices when actions have not yet been tried?
Worked example

A startup with three actions

Imagine a bandit with three actions and no previous trials. Describe the purpose of the first three UCB choices.

  1. 1
    Beginning

    All three actions are untried, so UCB has no collected experience with which to compare them.

  2. 2
    Startup selection

    During the startup period, UCB selects randomly among actions that have not yet been tried.

  3. 3
    Coverage

    After the initial three steps, each action has been tried, giving UCB experience from which to continue its selection process.

Result

The startup period is not ordinary exploitation. It is an initial investigation that makes every action available for later comparison.

Why UCB Wins in the Testbed

On the 10-armed testbed, UCB generally achieves higher reward than epsilon-greedy action selection. The comparison is about how effectively the selection rule handles exploration and action choice. Epsilon-greedy explores by choosing actions outside its current preferred choice according to its exploration rule. UCB also explores, but its startup and uncertainty-directed behavior allow it to investigate actions whose value is not yet well established. The testbed therefore favors UCB in general, although the result is not a guarantee that UCB transfers easily to every reinforcement-learning problem.

UCBinvestigates uncertainactionsEpsilon-greedyuses its exploration ruleHigher rewardgenerally in the 10-armedtestbedLower rewardgenerally in the 10-armedtestbedselection behaviorselection behavior
How do UCB and epsilon-greedy differ in their exploration behavior, and why does UCB generally obtain higher reward in the testbed?

When UCB's Evidence Ages

UCB is easiest to interpret when the underlying action-reward behavior does not require continual adaptation to a changing probability distribution. In a nonstationary problem, the underlying probability distribution changes over time. Evidence collected earlier may then become less useful for judging what an action is like now. Historical estimates and confidence information can no longer describe the current situation as reliably as they did when the evidence was collected.

Earlierdistributionpast action-reward behaviorHistorical estimateevidence collected earlierChangeddistributioncurrent action-rewardbehaviorLess reliablejudgmentpast evidence may notdescribe nowproducescarried intochanges
How do changing reward distributions make old UCB evidence less reliable?
Key point

The problem is not simply that UCB has too little data. In a changing environment, older data may describe an earlier distribution rather than the current one.

Why Large State Spaces Matter

A bandit presents a compact decision problem, but general reinforcement learning can involve a large state space. Extending UCB from bandits to these settings is difficult, especially when function approximation is needed. The source identifies no currently known practical way to use the idea of UCB action selection in these advanced settings. This limitation motivates a separate question: how can a learner represent useful value information when it has examples but not a complete description for every possible state?

What Function Approximation Builds

Definition

Function approximation uses examples from a desired function to construct a broader representation that can generalize beyond the examples. In reinforcement learning, the desired function can be a value function. The learner may have examples of that function without having a complete description of the function itself.

Three parts must be kept separate. The desired function is the function the learner would like to represent. The examples are the evidence available to the learner. The approximation is the generalized representation constructed from those examples. The purpose is not merely to store the examples; it is to use them to represent the function more broadly.

Desired functiontarget to representAvailable examplesobserved evidenceApproximationbroader learnedrepresentationUnseen-inputpredictiongeneralization beyondstored examplesprovides evidenceconstructsupports
How do examples of a desired function become an approximation that can make broader predictions?
Worked example

Keeping the three parts distinct

Suppose reinforcement learning provides several examples related to a value function. Identify the desired function, the examples, and the approximation.

  1. 1
    Desired function

    This is the value function the learner wants to represent, even though it does not have a complete description of it.

  2. 2
    Examples

    These are the available pieces of evidence about the desired function.

  3. 3
    Approximation

    This is the broader representation constructed from the available examples.

  4. 4
    Purpose

    The approximation supports generalization rather than merely memorizing the examples.

Result

The desired function is the target, examples are the evidence, and the approximation is the learned representation built from that evidence.

Function Approximation as Supervised Learning

Function approximation is an instance of supervised learning. Supervised learning is also studied in artificial neural networks, pattern recognition, and statistical curve fitting. This connection matters because reinforcement learning does not need an entirely new approach to generalization. Methods from these fields can take the role of a function approximator within reinforcement-learning algorithms.

The combination has a clear division of roles. Reinforcement learning supplies the learning problem and the information produced through interaction. A generalization method supplies a way to construct a broader representation from available examples. In practice, these methods are not equally convenient: some fit more easily into reinforcement-learning algorithms than others.

Reinforcementlearninglearning problem andexamplesSupervised learninggeneralization methodsFunctionapproximationbroader representationLarge state spacegeneralization acrossstatesprovides examplesprovides methodssupports generalization
How can supervised-learning methods support value or policy estimation across a large state space?
Best practice

When analyzing a function-approximation method, ask two separate questions: what examples does reinforcement learning provide, and how does the chosen supervised-learning method generalize from those examples? Keeping these roles separate prevents the approximation from being confused with the desired function.

Common Conceptual Mistakes

  • Common mistake

    Treating UCB's better testbed performance as a universal guarantee.

    What it looks like

    Assuming that success on the 10-armed testbed means UCB is practical for every large-state-space reinforcement-learning problem.

    Why it fails

    The testbed is a compact bandit comparison, while large state spaces and function approximation make UCB difficult to extend in general.

    Do this instead

    Interpret the result as a setting-specific comparison: UCB generally performs better than epsilon-greedy on the testbed, but transfer is not guaranteed.

  • Common mistake

    Saying that UCB does not explore.

    What it looks like

    Describing UCB as purely greedy because it often obtains higher reward.

    Why it fails

    UCB investigates actions whose values are uncertain and randomly selects among untried actions during its first k steps.

    Do this instead

    Describe UCB as an exploration method whose uncertainty-directed choices can perform better in the testbed.

  • Common mistake

    Confusing old evidence with current evidence in a nonstationary problem.

    What it looks like

    Assuming that an action's historical estimate always describes its current reward behavior.

    Why it fails

    A changing probability distribution can make earlier evidence less useful over time.

    Do this instead

    Check whether the underlying action-reward distribution is changing before treating historical estimates as reliable.

  • Common mistake

    Calling the available examples the function approximation.

    What it looks like

    Saying that storing observed value-function examples is the same as constructing an approximation.

    Why it fails

    Examples are evidence; the approximation is the broader representation built from that evidence.

    Do this instead

    Name the desired function, examples, and approximation as three distinct parts.

  • Common mistake

    Assuming reinforcement learning must invent all generalization methods itself.

    What it looks like

    Ignoring supervised learning, neural networks, pattern recognition, and statistical curve fitting when discussing approximation.

    Why it fails

    Function approximation is an instance of supervised learning, and methods from related fields can serve as approximators.

    Do this instead

    Explain how reinforcement-learning methods can be combined with existing generalization methods, while recognizing that some methods fit more easily than others.

Check Your Understanding

MEDIUM

Explain, in your own words, why UCB generally performs better than epsilon-greedy on the 10-armed testbed. Then describe what happens during UCB's first k steps, identify one reason nonstationarity is difficult for UCB, and distinguish the desired function, examples, and approximation in a reinforcement-learning function-approximation problem.

Hints
  • Mention UCB's treatment of uncertain or untried actions.
  • Remember that changing probability distributions can reduce the usefulness of historical evidence.
  • Use the three-part distinction: target, evidence, and broader representation.

Key Takeaways

  1. 1
    UCB generally performs better than epsilon-greedy action selection on the 10-armed testbed, while still preserving exploration.
  2. 2
    During its first k steps, UCB selects randomly among actions that have not yet been tried.
  3. 3
    Changing probability distributions make historical estimates and confidence information less reliable over time.
  4. 4
    Large state spaces and function approximation make it difficult to extend UCB practically beyond bandits.
  5. 5
    Function approximation uses examples of a desired function to construct a broader representation, and it can use generalization methods from supervised learning and related fields.

At a glance

  • UCB generally outperforms epsilon-greedy selection on the 10-armed testbed because its exploration behavior handles uncertain actions effectively in that setting.
  • UCB's first k choices form a special startup period in which it randomly selects among untried actions.
  • Nonstationary reward distributions weaken the usefulness of historical evidence, and large state spaces make practical UCB extensions difficult.
  • Function approximation constructs a broader representation of a desired function from available examples.
  • Because function approximation is an instance of supervised learning, reinforcement learning can combine with generalization methods from related fields.

Related concepts

More concepts starting with F