Reinforcement learning-based model matching in COBRA, a slithering snake robot