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
99ac82ac
Commit
99ac82ac
authored
Sep 10, 2013
by
Steven Cordwell
Browse files
add a __repr__ to the MDP class
parent
984d489d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mdptoolbox/mdp.py
View file @
99ac82ac
...
@@ -203,6 +203,14 @@ class MDP(object):
...
@@ -203,6 +203,14 @@ class MDP(object):
# policy can also be stored as a vector
# policy can also be stored as a vector
self
.
policy
=
None
self
.
policy
=
None
def
__repr__
(
self
):
P_repr
=
"P:
\n
"
R_repr
=
"R:
\n
"
for
aa
in
range
(
self
.
A
):
P_repr
+=
repr
(
self
.
P
[
aa
])
+
"
\n
"
R_repr
+=
repr
(
self
.
R
[
aa
])
+
"
\n
"
print
(
P_repr
+
"
\n
"
+
R_repr
)
def
_bellmanOperator
(
self
,
V
=
None
):
def
_bellmanOperator
(
self
,
V
=
None
):
# Apply the Bellman operator on the value function.
# Apply the Bellman operator on the value function.
#
#
...
...
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