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
d8733c36
Commit
d8733c36
authored
Mar 10, 2014
by
Steven Cordwell
Browse files
finish docstring example of PolicyIterationModified
parent
4bc83923
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mdptoolbox/mdp.py
View file @
d8733c36
...
@@ -778,9 +778,9 @@ class PolicyIterationModified(PolicyIteration):
...
@@ -778,9 +778,9 @@ class PolicyIterationModified(PolicyIteration):
>>> pim = mdptoolbox.mdp.PolicyIterationModified(P, R, 0.9)
>>> pim = mdptoolbox.mdp.PolicyIterationModified(P, R, 0.9)
>>> pim.run()
>>> pim.run()
>>> pim.policy
>>> pim.policy
FIXME
(0, 0, 0)
>>> pim.V
>>> pim.V
FIXME
(21.81408652334702, 25.054086523347017, 29.054086523347017)
"""
"""
...
@@ -812,7 +812,7 @@ class PolicyIterationModified(PolicyIteration):
...
@@ -812,7 +812,7 @@ class PolicyIterationModified(PolicyIteration):
self
.
V
=
zeros
((
self
.
S
,
1
))
self
.
V
=
zeros
((
self
.
S
,
1
))
else
:
else
:
Rmin
=
min
(
R
.
min
()
for
R
in
self
.
R
)
Rmin
=
min
(
R
.
min
()
for
R
in
self
.
R
)
self
.
V
=
1
/
(
1
-
discount
)
*
Rmin
*
ones
((
self
.
S
,))
self
.
V
=
1
/
(
1
-
self
.
discount
)
*
Rmin
*
ones
((
self
.
S
,))
# Call the iteration method
# Call the iteration method
#self.run()
#self.run()
...
...
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