-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sarsop won't compute policy after changing observation model #28
Comments
I’m not exactly sure. Can you check if the observation probabilities sum to 1 using the new model? |
I just checked, it does add up to 1: decision = BCIAction(2)
next_state = BCIState(3)
obs_model = vep_problem.agent.observation_model
all_observations = obs_model.get_all_observations()
obs_p = [obs_model.probability(obs, next_state, decision) for obs in all_observations]
print(obs_p)
>[0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333,
0.08333333333333333]
print(sum(obs_p))
> 1.0 |
In that case, I’m not really sure. I’ve also run into cases where a small change caused the sarsop solver to not run. I personally don’t understand the error message. If I am debugging this, I would start by looking at what min_ratio means. |
I personally don't know any C++ in order to check the error myself, so I am stuck... |
It is possible that this is a numerical error. Looking at the source code in sarsop where this error is produced, it's ok if min_ratio is slightly bigger than 1 (tolerance When a POMDP agent in pomdp_py gets converted into a .pomdpx file for sarsop, this function gets called that writes the file. You can see that floats are converted to string via |
Yeah, I was looking at the source code or sarsop and found that the MIN_RARIO_EPS to be defined as |
I wouldn't change the source code of the solver, unless you really know what you're doing. You don't want to introduce potential bugs. |
True! I forked the repo to change the precision of the float to str conversion of |
Nice. Feel free to open a PR about that change. For now, please make the PR against the dev-1.3.3 branch. Thanks! typo: "not everything works" --> "now everything works" I suppose |
Hello. I have a model using SARSOP that was working until now. Following the discussion we had on #27 , I thought about re-running this model with a small change on the observation model's
probability()
function. The old function was:And I changed it to:
Then, when I try to compute the SARSOP policy, I get:
What may be the cause of this?
The text was updated successfully, but these errors were encountered: