Learning to Shape Rewards using a Game of Switching Controls