Path planning through variational dynamic programming | Synapse