Training agents: an architecture for reusability