Fixed a bug in Policy Iteration where action_values was formed from only the last next_state in env.P[s][a]. This has no impact when running on Gridworld since all transitions have P = 1; there is only one next_state for each state-action pair (deterministic). Nonetheless, this fix is strictly 'more correct' from a programming (and mathematical) perspective.
Fixed a bug in Policy Iteration where action_values was formed from only the last next_state in env.P[s][a]. This has no impact when running on Gridworld since all transitions have P = 1; there is only one next_state for each state-action pair (deterministic). Nonetheless, this fix is strictly 'more correct' from a programming (and mathematical) perspective.

davidbrown3/reinforcement-learning,allentran/reinforcement-learning,rockingdingo/reinforcement-learning,dennybritz/reinforcement-learning,liu-jc/reinforcement-learning