Non-ergodicity in reinforcement learning: robustness via ergodicity transformations