Model-Agnostic Dynamic Programming