added fullyLearnedAgentsLeave mechanism