Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
pymdptoolbox
Commits
033b7755
Commit
033b7755
authored
Jan 01, 2015
by
Steven A W Cordwell
Browse files
Merge pull request #5 from yasserglez/fix-V-init-undiscounted
Fix V initialization in PolicyIterationModified
parents
3d20ccb4
e997f549
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mdptoolbox/mdp.py
View file @
033b7755
...
...
@@ -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
,))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment