def get_automaton(self): automaton = SubgoalAutomaton() automaton.add_state("u0") automaton.add_state("u1") automaton.add_state("u2") automaton.add_state("u3") automaton.add_state("u_acc") automaton.add_state("u_rej") automaton.add_edge( "u0", "u1", [OfficeWorldObject.ROOM_A, "~" + OfficeWorldObject.PLANT]) automaton.add_edge("u0", "u_rej", [OfficeWorldObject.PLANT]) automaton.add_edge( "u1", "u2", [OfficeWorldObject.ROOM_B, "~" + OfficeWorldObject.PLANT]) automaton.add_edge("u1", "u_rej", [OfficeWorldObject.PLANT]) automaton.add_edge( "u2", "u3", [OfficeWorldObject.ROOM_C, "~" + OfficeWorldObject.PLANT]) automaton.add_edge("u2", "u_rej", [OfficeWorldObject.PLANT]) automaton.add_edge( "u3", "u_acc", [OfficeWorldObject.ROOM_D, "~" + OfficeWorldObject.PLANT]) automaton.add_edge("u3", "u_rej", [OfficeWorldObject.PLANT]) automaton.set_initial_state("u0") automaton.set_accept_state("u_acc") automaton.set_reject_state("u_rej") return automaton
def get_automaton(self): automaton = SubgoalAutomaton() automaton.add_state("u0") automaton.add_state("u1") automaton.add_state("u_acc") automaton.add_edge( "u0", "u1", [OfficeWorldObject.COFFEE, "~" + OfficeWorldObject.OFFICE]) automaton.add_edge( "u0", "u_acc", [OfficeWorldObject.COFFEE, OfficeWorldObject.OFFICE]) automaton.add_edge( "u1", "u_acc", [OfficeWorldObject.OFFICE, "~" + OfficeWorldObject.PLANT]) if self.drop_coffee_on_plant_enable: automaton.add_edge("u1", "u0", [OfficeWorldObject.PLANT]) else: automaton.add_state("u_rej") automaton.set_reject_state("u_rej") automaton.add_edge("u0", "u_rej", [ OfficeWorldObject.PLANT, "~" + OfficeWorldObject.COFFEE, "~" + OfficeWorldObject.OFFICE ]) automaton.add_edge("u1", "u_rej", [OfficeWorldObject.PLANT]) automaton.set_initial_state("u0") automaton.set_accept_state("u_acc") return automaton
def get_automaton(self): automaton = SubgoalAutomaton() automaton.set_initial_state("u0") automaton.set_accept_state("u_acc") if self._is_strict_sequence(): self._add_strict_transitions_to_automaton(automaton) automaton.set_reject_state("u_rej") else: if self.obs_to_avoid is not None: automaton.set_reject_state("u_rej") self._add_transitions_to_automaton(automaton) return automaton
def get_automaton(self): automaton = SubgoalAutomaton() automaton.add_state("u0") automaton.add_state("u1") automaton.add_state("u_acc") automaton.add_state("u_rej") automaton.add_edge("u0", "u1", [ OfficeWorldObject.MAIL, "~" + OfficeWorldObject.OFFICE, "~" + OfficeWorldObject.PLANT ]) automaton.add_edge("u0", "u_acc", [ OfficeWorldObject.MAIL, OfficeWorldObject.OFFICE, "~" + OfficeWorldObject.PLANT ]) automaton.add_edge("u0", "u_rej", [OfficeWorldObject.PLANT]) automaton.add_edge( "u1", "u_acc", [OfficeWorldObject.OFFICE, "~" + OfficeWorldObject.PLANT]) automaton.add_edge("u1", "u_rej", [OfficeWorldObject.PLANT]) automaton.set_initial_state("u0") automaton.set_accept_state("u_acc") automaton.set_reject_state("u_rej") return automaton