Skip to content

Changes to Storm for revised belief exploration - #1028

Open
AlexBork wants to merge 1 commit into
stormchecker:masterfrom
AlexBork:revbel-storm
Open

Changes to Storm for revised belief exploration#1028
AlexBork wants to merge 1 commit into
stormchecker:masterfrom
AlexBork:revbel-storm

Conversation

@AlexBork

Copy link
Copy Markdown
Contributor

This PR contains changes to Storm outside Storm-POMDP for the revised belief exploration implementation, see PR #1004.

  • Transformer for transition-based to action-based rewards by inserting intermediate states
  • Transformer for ValueTypes of sparse models
  • Getter for optional time bound in BoundedUntilFormula

std::optional<TimeBound> BoundedUntilFormula::getUpperBoundAsOptionalTimeBound(unsigned i) const {
if (hasUpperBound(i)) {
return upperBound.at(i).get();
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not just return upperBound.at(i) rather than the case split (we would need to move from boost to std then, but that would be good anyways.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR #1030 addressed the change, so I will also fix this here :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, I appreciate it!

@@ -0,0 +1,23 @@
#pragma once

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What happens here if InputType == OutputType? Why do we ever want those instantiations?

What do we do if we go from doubles to rational numbers to ensure that probabilities still sum to one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

InputType == OutputType i somthing we should never need. I can add a static assertion that those are never generated.
I indeed did not consider the sum issue.
I cannot think of anything to address this properly.
As background: I want to use this transformation to transform a rational to a double POMDP to apply the preprocessing (checking of underlying MDP there) without needing to re-parse the input model.

For now, this is also not essential, so I am considering just throwing it out. Any thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Input=Output: We are declaring them right now, right? That was what promted this in the first place.
  • I also understand the to-double use case, it is also something we sometimes do in the parametric setting.
  • We could renormalize afterwards for the sum to make sense.

Maybe rename to "toDouble" that supports going from exact rationals to doubles fixes parts of my concerns. :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wow, I somehow completely overlooked that I added the Input=Output declarations :D
Will remove those.

#include <string>
#include <vector>

#include "storm/models/sparse/Model.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some simple test cases for this would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants