def commit_outcomes(initiates, terminates): for (fluent, time) in initiates: if KB.add_fluent(fluent): KB.log_fluent(fluent, time, F_INITIATE) for (fluent, time) in terminates: if KB.remove_fluent(fluent): KB.log_fluent(fluent, time, F_TERMINATE)
def _handle_initial(self): for fluent in KB.initial_fluents: KB.add_fluent(fluent) KB.log_fluent(fluent, 0, F_INITIATE)