The task is for a collection of heterogeneous agents to collectively solve problems in a domain which is an unpredictable world. The inputs to each problem-solving episode are the problem specification and a collective memory of the community of agents -- the unconstrained output is a revised collective memory. The method exploits regularities in the task domain when improving the efficiency of stored plan fragments via step resequencing.