Reinforcement Learning of Simple Indirect Mechanisms