Closed yasserglez closed 9 years ago
Thanks @yasserglez, sparse reward is something that I remember not working very well and I just am looking at a branch where I tried to fix it in the past but didn't finish. That branches code probably doesn't work how it should anyway. I am at the moment converting these into test cases. I have created a branch sc/fix7 with PR #8 to test the fixes. If you happen to do any work on it then you can create a pull request against that.
Thanks @sawcordwell, I'll take a look and see if I can find the problem. I've updated the issue with a smaller example that also happens to fail with the same errors and might be easier to track down.
I expanded the tests to cover all algorithms, the new file is pymdptoolbox/src/tests/test_issue7.py
I can't see an easy way to fix it, and the code that sets up the transitions and rewards is too messy and hard to understand so I've decided to rewrite it. I will probably rebase sc/fix7 a few times
I think I have fixed it. Could you check the sc/fix7 branch to see if you are getting results that you expect?
This excerices has confirmed that the linear programming class is not working properly.
Just tested it and seems to be working perfectly. Thank you very much!
great, i'll merge it in
The following code runs fine with dense matrices, but fails in different ways when sparse matrices are used (i.e. when the lines
P = list(map(csr_matrix, P))
and/orR = list(map(csr_matrix, R))
are uncommented):With sparse
P
and denseR
:With dense
P
and sparseR
:With sparse
P
and sparseR
:I'm using Python 3.4.0, scipy 0.14.1, numpy 1.9.1 and mdptoolbox 5af7d2a50c1820aeb590b9bb7ced967b2f4e13c7.