Text this: Likelihood and cost as path integrals.