value iteration using policy now works when first using encoded value grid