01 · Define rewards and costs
02 · Compare the lowest gain
ALPRQv1v2v3v4BA₀ = hB₀P · reward 14Q · reward 10B: 5 stepsto junction hA→P/Q: 2 · B→P/Q: 7PlanABMinX₀A → P14 − 2 = 12B → Q10 − 8 = 22Total 14XA → P14 − 2 = 12B → Q10 − 7 = 33Total 15YA → Q10 − 2 = 8B → P14 − 7 = 77Total 15
Each step before arrival costs 1Moving and waiting both count
X and Y total 15; Y has the higher minimum.
Illustrative example · rewards, costs and updates are constructed. All candidate routes are shown in the next view.