Commit 033b7755 authored by Steven A W Cordwell's avatar Steven A W Cordwell

Merge pull request #5 from yasserglez/fix-V-init-undiscounted

Fix V initialization in PolicyIterationModified
parents 3d20ccb4 e997f549
......@@ -852,7 +852,7 @@ class PolicyIterationModified(PolicyIteration):
self.thresh = self.epsilon
if self.discount == 1:
self.V = _np.zeros((self.S, 1))
self.V = _np.zeros(self.S)
else:
Rmin = min(R.min() for R in self.R)
self.V = 1 / (1 - self.discount) * Rmin * _np.ones((self.S,))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment