Closed GijsMargadant closed 2 months ago
Thanks for the report. What happened likely is that here agent.generative_model.sample
(i.e. blackbox model's sample
that you implemented) returns a 3-tuple but sample_generative_model
(here) and line 409 in _rollout
expect a 4-tuple.
You can work around this by returning a 4-tuple (s', o, r, n_steps)
from your blackbox models sample
function where n_steps
could be just 1. I'll make a note about this -- should be a minor fix.
This fixed my problem indeed, thanks!
I'm experimenting with POMDPs to plan maintenance actions based on noisy sensor data. For this purpose, I would like to use a Blackbox model to determine successor states. From the examples, the code and the documentation, I can't quite figure out how I should implement this.
I have implemented the sample method from the
pomdp_py.BlackboxModel
interface. It returns a tuple containing the successor state, successor observation and reward. I have set theblackbox_model
parameter for both the environment and the agent and left the other models out. When I call plan on myPOMCP
object, a ValueError is raised when the_rollout
function is called in thePOUCT
class. The full traceback is listed below.Does someone know why does bug occurs? And is there perhaps a working example where a Blackbox is used that I can use as a guide?
Thanks in advance for any help!