Automated Planning: Theory and Practice