Multi-agent Cooperation in a Planning Framework