POMDPs.jl icon indicating copy to clipboard operation
POMDPs.jl copied to clipboard

Compatibility with Alg4dm book

Open zsunberg opened this issue 4 years ago • 3 comments

I have been noticing that many of my students are translating between the MDP struct in algorithmsbook.com and POMDPs.jl. We should automate this. I think we should make a new package called AlgorithmsBook.jl or similar that provides a convert(AlgorithmsBook.MDP, ::POMDPs.MDP) and vice versa.

@mykelk @tawheeler any thoughts about this? Do you have a repo of code that was used to test the algorithms in the book? That might be useful for developing this package.

zsunberg avatar Feb 02 '21 05:02 zsunberg

Great idea! We haven't made the code available in a repo yet; we've been so focused on getting the book content in shape. In addition to @tawheeler , I think @mossr might have some thoughts.

mykelk avatar Feb 02 '21 05:02 mykelk

Oh interesting. The MDP / POMDP representation in the book is decidedly less efficient than what one typically wants to use "for real" with POMDPs.jl. We could certainly provide a translation though. For example, we don't template on state / action types, and sometimes just leave some fields as "nothing" when they aren't used.

struct MDP
    γ  # discount factor
    𝒮  # state space
    𝒜  # action space
    T  # transition function
    R  # reward function
    TR # sample transition and reward
end

It should be pretty straightforward to support the translation you suggest.

tawheeler avatar Feb 03 '21 04:02 tawheeler

I'm all for this! There's talk about turning alg4dm into its own Julia package, so this would be useful to do alongside that work.

mossr avatar Feb 03 '21 18:02 mossr