“Quality” of being in a certain state and taking a certain action.

The quality function is a value function which is only implicity a function fo the future state, which allows us to do model-free RL.

We can recover the state-value function from it by averaging over the actions the policy takes:

The optimal policy always chooses the best action:

And we can use directly as a policy (here greedily):