JuliaPOMDP / JuliaPOMDP/POMDPModels.jl

Allowing SparseMatrices for TabularProblem

Open
#41 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
34
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Following on from one of the issues raised in #38, I've been tinkering around the new `Tabular` type, trying to make it compatible with sparse transition matrices, and I've noticed something problematic with allowing the transition matrix to be sparse.

Sparse matrices in Julia currently do not explicitly allow 3-dimensional matrices, only 2-d. What can be done on the other hand is make a sparse matrix of sparse vectors. This way, to get element `matrix[i,j,k]`, you instead get `sparse_matrix[i,j][k]`.

This workaround works as long as you don't try to do matrix algebra, which is not the case here since it's only storing transitions, basically like a dictionary. However the problem is that currently the transition matrix is stored as `T: SPxAxS`, and the function all get the `SP` dimension by using `T[:,a,s]`.

This notation is incompatible with the way 3D sparse matrices work as explained previously, therefore putting me in a bit of a pickle.

I don't see any solution except making the transition matrix `T:SxAxSP`, which could be problematic for current user code and which is why I'm reporting it here, to see if any other solutions are proposed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.