liveBook · Manning

Action-value function

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

A Q-function maps a state and an action to the estimated cumulative reward obtained by taking that action and following a policy afterward.

An action-value function, or Q-function, estimates the cumulative reward for taking an action in a state and then following a policy. In financial planning, Q(W,t,a) assigns value to an asset allocation a at wealth W and time t, extending the state-only value V(W,t). section 6.2.2 section 6.2.2

Q-learning initializes Q, moves forward through episodes, and updates the selected state-action estimate using the reward, learning rate α, discount rate γ, and the maximum estimated Q at the next state. The next-state maximum is itself an iterative estimate. section 6.2.2 section 6.2.2

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

How deep it goes
Explains the update equation and implementation loop, stopping short of broader algorithmic variations.
Examples
Uses wealth-time-action arrays, random wealth transitions, terminal goals, exploratory action selection, and repeated Python episodes.
What it assumes
Assumes state, action, policy, reward, and value-function ideas while contrasting state-only values with state-action values.
What you can do after
Builds a Q-learning loop that estimates action values and supports policy selection through exploration and exploitation.
How it connects
Connects reinforcement learning, policies, value functions, dynamic programming, asset allocation, learning rates, and discount rates.

Also explained in

Compare how 5 books explain action-value function →

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.