Reward Machine Inference for Robotic Manipulation