In automated planning, a cost function assigns a numerical cost to each possible action. The total cost of a plan is the sum of the costs of its constituent actions, and the planner's objective is to find the plan with the minimum total cost. This transforms planning into an optimization problem, guiding search algorithms like A* through the state space by evaluating the quality of different action sequences. The function is a core component of Markov Decision Processes (MDPs) and heuristic search.
