Treating Epilepsy by Reinforcement Learning Via Manifold-Based Simulation