The theory of dynamic programming | Synapse