= Path cost
{title2=$g(n)=\sum_{e\in\operatorname{path}(n)}c(e)$}
The <path cost> of a <search node> is the <sum> of <step costs> along the action history that reaches it:
$$
g(n)=\sum_{e\in\operatorname{path}(n)}c(e).
$$
The same physical state can have different <path costs> when reached through different histories. <Uniform-cost search> orders nodes by accumulated <path cost>; <A-star search> adds a <heuristic function> estimating the remaining cost.
If every <step cost> is at least a fixed $\varepsilon>0$, a history of depth $d$ satisfies $g(n)\geq\varepsilon d$, so a cost bound gives an upper bound $d\leq g(n)/\varepsilon$ on <search depth>. Strict positivity without a uniform lower bound is insufficient: costs $2^{-1},2^{-2},\ldots$ give arbitrarily deep prefixes of total <path cost> below one.
Back to article page