

![0_image_0.png](0_image_0.png)

## 4.3 Writing Domains That Include Optimization

In previous planning competitions, the planning benchmarks compared only the speed of the planners and the length of the output plans, so domain designers concentrated on trying to find a reasonably short plan as quickly as possible. In contrast, most of the problems in this year's competition included a linear objective function that needed to be optimized: the best plan was no longer the one that minimizes the number of steps, but instead was the one that minimized the objective-function value. We tried three approaches for searching for optimal plans:
1. Structure the SHOP2 methods in such a way as to take SHOP2 more-or-less directly toward a plan that minimizes the objective function.

2. Write methods, operators, and axioms to generate plans quickly, and use the "sort-by" feature to tell SHOP2 to sort the alternatives and try the most promising ones first.

3. Assign costs to the operators, and use a branch-and-bound **search to find the best**
plan within the execution time limit.