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
9256db99
Commit
9256db99
authored
May 21, 2013
by
Steven Cordwell
Browse files
fix exampleForest where sparse matrix did not take on user defined rewards
parent
9e4acf3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
mdp.py
View file @
9256db99
...
...
@@ -476,7 +476,7 @@ def exampleForest(S=3, r1=4, r2=2, p=0.1, is_sparse=False):
P
=
[]
rows
=
range
(
S
)
*
2
cols
=
[
0
]
*
S
+
range
(
1
,
S
)
+
[
S
-
1
]
vals
=
[
0.1
]
*
S
+
[
0.9
]
*
S
vals
=
[
p
]
*
S
+
[
1
-
p
]
*
S
P
.
append
(
coo_matrix
((
vals
,
(
rows
,
cols
)),
shape
=
(
S
,
S
)).
tocsr
())
rows
=
range
(
S
)
cols
=
[
0
]
*
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