Using geometric structure of data in reinforcement learning