h2r / pomdp-py

A framework to build and solve POMDP problems. Documentation: https://h2r.github.io/pomdp-py/
MIT License
209 stars 49 forks source link

Add float_precision parameter to to_pomdp_file() #29

Closed Hororohoruru closed 1 year ago

Hororohoruru commented 1 year ago

As discussed in #28, a particular case where the uniform belief over states is a periodic number (0.083333333 in this case) created an error when running SARSOP on the .pomdp file created by to_pomdp_file(). This was because the float to str conversion defaults to 6 decimals.

Adding a parameter to control for this precision in to_pomdp_file() fixed the issue.