Skip to content
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

Add synthesis for exact POMDPs #56

Merged
merged 8 commits into from
Jan 27, 2025
Merged

Add synthesis for exact POMDPs #56

merged 8 commits into from
Jan 27, 2025

Conversation

lukovdm
Copy link
Contributor

@lukovdm lukovdm commented Jan 10, 2025

This pull request contains a first implementation to get PAYNT to do exact calculations.
It only works for POMDPs (not sure if only memoryless). I tested it for several of the pomdp examples, and they all work. However, I thus only tested happy paths.

I also allowed the prism and drn parser to build models as exact. This can be used by calling paynt.py using the --exact flag.

paynt/parser/drn_parser.py Outdated Show resolved Hide resolved
# se.minmax_solver_environment.method = stormpy.MinMaxMethod.value_iteration
# se.minmax_solver_environment.method = stormpy.MinMaxMethod.sound_value_iteration
# se.minmax_solver_environment.method = stormpy.MinMaxMethod.interval_iteration
se.minmax_solver_environment.method = stormpy.MinMaxMethod.optimistic_value_iteration
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to use OVI by default. If you need other methods, should we introduce a CLI option?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using PAYNT from the outside, it would probably be cool if you can set the environment from the outside!

Other than that, exact solving needs policy iteration as OVI will not converge to the precise solution if there is a cycle.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep OVi as a default but use policy iteration if --exact option has been used?

# se.set_linear_equation_solver_type(stormpy.EquationSolverType.gmmxx)
# se.set_linear_equation_solver_type(stormpy.EquationSolverType.eigen)
se.set_linear_equation_solver_type(stormpy.EquationSolverType.eigen)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with these settings, so I don't have a preference, but if this change is intentional, I am curious why.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eigen has a much better exact solution engine than our native solver.

@randriu randriu merged commit b49ae0a into randriu:master Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants