Optimality - Heuristic search strategies:
The path cost of a solution is considered as the sum of the costs of the actions that led to which solution is given. This is only one example of a measure of value on the solution of a search problem, and there are so many others. These measures may or may not be just related to the heuristic functions that estimate the likelihood of a particular state being in the path to a solution. We can say that - given a measure of value on the possible solutions to a search problem - one particular solution is optimal if it scores higher other than the all with respect to this measure (or costs less, in the case of path cost). Like if we look at example, in the maze example given in section 3.2, there are many paths from the start to the finish of the maze, but there is only one which crosses the fewest squares. This is the only optimal solution in terms of the distance travelled.
Optimality can be guaranteed through a particular choice of search strategy just like instance the uniform path cost search described below. Otherwise an agent can be chosen to prove that a solution is optimal by appealing to some mathematical argument. As in a last resort w got that, if optimality is necessary, then an agent must exhaust a complete search strategy to find all solutions, then it would be possible to choose the one scoring the highest (alternatively costing the lowest).