liveBook · Manning

Exploration-exploitation trade-off

As explained in Build a Robo-Advisor with Python (From Scratch)

The exploration-exploitation tradeoff is the decision problem of balancing actions that gather new information against actions expected to yield the best known outcome.

The exploration–exploitation trade-off balances actions that gather information with actions expected to produce the highest known reward. Exploitation uses current Q-values; exploration tests alternatives that may reveal better policies. Choosing only one side either misses undiscovered policies or wastes useful knowledge. section 6.2.2

A practical balance is epsilon-greedy action selection: explore randomly with probability ε, otherwise choose the action with the highest expected cumulative reward, Q(W,t,a). Exploration can also decrease during learning or follow a distribution derived from Q-values. section 6.2.2

Q-learning action selection

A Q-learning implementation sets ε = 0.5, randomly selects an action when a uniform draw falls below ε, and otherwise chooses a maximizing action, breaking ties randomly. It repeats this process across generated episodes while updating Q-values.

How Build a Robo-Advisor with Python (From Scratch) covers it

How deep it goes
Explains epsilon-greedy selection, tie handling, parameter schedules, and alternatives, then implements the policy in Python.
Examples
Uses epsilon-greedy Q updates, random transitions, tie-breaking, and million-episode training with ε = 0.5.
What it assumes
Assumes states, actions, rewards, and Q-values; introduces the decision between random exploration and greedy exploitation.
What you can do after
Apply it by implementing epsilon-greedy action selection and adjusting exploration as Q-learning progresses.
How it connects
Connects exploration and exploitation to reinforcement learning, Q-learning, policies, rewards, and model-free learning.

Also explained in

Compare how 3 books explain exploration-exploitation trade-off →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Robo-Advisor with Python (From Scratch). The section links point to the parts of the book it draws on.