Пример #1
0
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)
Пример #2
0
 def _handle_initial(self):
     for fluent in KB.initial_fluents:
         KB.add_fluent(fluent)
         KB.log_fluent(fluent, 0, F_INITIATE)