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

change policy tree output format #53

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

laDok8
Copy link
Contributor

@laDok8 laDok8 commented Nov 24, 2024

This list adheres to DTcontrol format. For POMDP it results in

{ 
"p0" : [<CONTROLER0>],
"p1" : [<CONTROLER1>],
...
"pn" : [<CONTROLER2>],

}

As is structure is not parsable by DT control but each separate controller is

policies_string += "}\n"

policies_filename = export_filename_base + ".json"
policies_filename = export_filename_base + ".paynt.json"
Copy link
Owner

Choose a reason for hiding this comment

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

I would keep the extension of the file simply .json, it does not have to be consistent with .storm.json.

import json
json_string = "[\n"
def policy_to_json(self, state_valuation_to_action):
""" DT-Control json format """
Copy link
Owner

Choose a reason for hiding this comment

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

I prefer to keep the output format as simple as possible, e.g. for use in other projects. Could we maybe add a parameter to this method that determines whether its output is simple or dtControl-specific?

@laDok8 laDok8 force-pushed the compare_dt_MAP_vs_Control branch from d49ffcd to 1cd8fd0 Compare November 25, 2024 15:49
@laDok8 laDok8 force-pushed the compare_dt_MAP_vs_Control branch from 1cd8fd0 to df74941 Compare December 5, 2024 13:59
@randriu randriu merged commit a4dfd23 into randriu:master Dec 5, 2024
2 checks passed
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.

2 participants