working on changing when the agent learns the termination rule.