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
132b0364
Commit
132b0364
authored
Feb 09, 2013
by
Steven Cordwell
Browse files
initial changes
parent
80a0b065
Changes
1
Hide whitespace changes
Inline
Side-by-side
mdp.py
View file @
132b0364
...
...
@@ -717,9 +717,9 @@ class MDP(object):
except
AttributeError
:
raise
TypeError
(
"bellman: V must be a numpy array or matrix."
)
Q
=
matrix
(
empty
((
self
.
S
,
self
.
A
))
)
Q
=
empty
((
self
.
S
,
self
.
A
))
for
aa
in
range
(
self
.
A
):
Q
[:,
aa
]
=
self
.
R
[:,
aa
]
+
(
self
.
discount
*
self
.
P
[
aa
]
*
V
)
Q
[:,
aa
]
=
self
.
R
[:,
aa
]
+
(
self
.
discount
*
self
.
P
[
aa
]
.
dot
(
V
)
)
# Which way is better?
# 1. Return, (policy, value)
...
...
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