diff --git a/models/archive/tac24-synthesis/refuel-06-res/._sketch.templ b/models/archive/tac24-synthesis/refuel-06-res/._sketch.templ deleted file mode 100644 index 400937d77..000000000 Binary files a/models/archive/tac24-synthesis/refuel-06-res/._sketch.templ and /dev/null differ diff --git a/payntbind/src/synthesis/translation/SubPomdpBuilder.cpp b/payntbind/src/synthesis/translation/SubPomdpBuilder.cpp index d236d3021..652cca8e3 100644 --- a/payntbind/src/synthesis/translation/SubPomdpBuilder.cpp +++ b/payntbind/src/synthesis/translation/SubPomdpBuilder.cpp @@ -98,6 +98,8 @@ namespace synthesis { observability_classes[translated_initial_state] = pomdp.getNrObservations(); components.observabilityClasses = observability_classes; + state_sub_to_full = state_translator.translationToItem(); + clearMemory(); return std::make_shared>(std::move(components)); } diff --git a/payntbind/src/synthesis/translation/SubPomdpBuilder.h b/payntbind/src/synthesis/translation/SubPomdpBuilder.h index 96f1f8245..5317750ad 100644 --- a/payntbind/src/synthesis/translation/SubPomdpBuilder.h +++ b/payntbind/src/synthesis/translation/SubPomdpBuilder.h @@ -24,6 +24,12 @@ namespace synthesis { std::map const& initial_belief ); + /** + * Sub-POMDP-to-POMDP state mapping. Fresh states have an invalid value + * equal to the number of states in the POMDP. + */ + std::vector state_sub_to_full; + private: /** The original POMDP. */ diff --git a/payntbind/src/synthesis/translation/bindings.cpp b/payntbind/src/synthesis/translation/bindings.cpp index ab8a17963..586c6fc84 100644 --- a/payntbind/src/synthesis/translation/bindings.cpp +++ b/payntbind/src/synthesis/translation/bindings.cpp @@ -7,6 +7,7 @@ void bindings_translation(py::module& m) { py::class_, std::shared_ptr>>(m, "SubPomdpBuilder") .def(py::init const&>()) .def("start_from_belief", &synthesis::SubPomdpBuilder::startFromBelief) + .def_property_readonly("state_sub_to_full", [](synthesis::SubPomdpBuilder& b) {return b.state_sub_to_full;} ) ; }