The algorithm now passes the previous starting states and the policy to the dp function. Added a changelog to the README.