Developing cooperative policies for multi-stage tasks