Reinforcement learning algorithms constrained by a partial program