When reading Reinforcement Learning by Sutton and Barto, I came across the importance sampling ratio.
I don't understand how this ratio could lead to this:
The $G_t$ rewards are obtained through the $b$ policy, not the $\pi$ policy.
I think there is something to do with Bayes Rule, but I could not derive it. Could someone guide me through the derivation?