  In this paper, we propose and study opportunistic reinforcement learning - a
new variant of reinforcement learning problems where the regret of selecting a
suboptimal action varies under an external environmental condition known as the
variation factor. When the variation factor is low, so is the regret of
selecting a suboptimal action and vice versa. Our intuition is to exploit more
when the variation factor is high, and explore more when the variation factor
is low. We demonstrate the benefit of this novel framework for finite-horizon
episodic MDPs by designing and evaluating OppUCRL2 and OppPSRL algorithms. Our
algorithms dynamically balance the exploration-exploitation trade-off for
reinforcement learning by introducing variation factor-dependent optimism to
guide exploration. We establish an $\tilde{O}(HS \sqrt{AT})$ regret bound for
the OppUCRL2 algorithm and show through simulations that both OppUCRL2 and
OppPSRL algorithm outperform their original corresponding algorithms.
