A python experiment in dynamic programming.