Skip to content

Discretiser method str_to_state depends on predicate order, causing errors on load #34

@SaraMo14

Description

@SaraMo14

A state of a policy representation is composed of a set of predicates. When the representation is saved, each state is serialized as a string. However, since sets are unordered, the same state may be saved with predicates in a different order.

Currently, the str_to_state method in the CartPole discretizer assumes a specific order of predicates when parsing these strings, but no error arises because the sample Policy Graphs used for testing are simple and crafted so that the order of predicates is consistent among states.

Proposed next steps:

  • Update str_to_state to handle unordered predicates or use a consistent order when saving states,
  • Add new tests for saving and loading policy representations using more realistic Policy Graphs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions