JuliaPOMDP / GenerativeModels.jl

Extension to POMDPs.jl for problems with a generative model (eliminates the need for distributions)
Other
7 stars 2 forks source link

Separate generate functions for different combinations of return values #1

Closed zsunberg closed 8 years ago

zsunberg commented 8 years ago

Hi all,

If anyone is watching this (especially @ebalaban ) I'd appreciate any feedback. I think I am going to switch this interface from having a single generate() function to having a generate_ function for each combination of return values. For example generate_s() would return only a state, while generate_sor() returns a state observation reward tuple.

There are two reasons for this

  1. It was weird for generate(::POMDP, ...) to return (s', o, r) and generate(::MDP, ...) to return only (s', r)
  2. I think this will actually be clearer and more flexible (for example, a solver might just need s and r rather than s, o, and r for a POMDP) for everyone, and it might even be simpler (for example, it seems simpler to just implement generate_s() and reward() for a problem than generate that returns a tuple).

See the spec_ret branch for a complete explanation and documentation.

Does this seem reasonable? Does anyone see any potential consequences/difficulties that I missed?

zsunberg commented 8 years ago

I'm getting more and more confident that this is the right way to do things, so I'm going to merge into master. Still soliciting comments if anyone has any