Discrete Probabilistic Inference as Control in Multi-path Environments