MCPcopy Create free account
hub / github.com/caelan/pddlstream / optimistic_process_instance

Function optimistic_process_instance

pddlstream/algorithms/refinement.py:34–43  ·  view source on GitHub ↗
(instantiator, instance, verbose=False)

Source from the content-addressed store, hash-verified

32##################################################
33
34def optimistic_process_instance(instantiator, instance, verbose=False):
35 for result in instance.next_optimistic():
36 if verbose:
37 print(result) # TODO: make a debug tools that reports the optimistic streams
38 new_facts = False
39 complexity = instantiator.compute_complexity(instance)
40 for fact in result.get_certified():
41 new_facts |= instantiator.add_atom(evaluation_from_fact(fact), complexity)
42 if isinstance(result, FunctionResult) or new_facts:
43 yield result
44
45def prune_high_effort_streams(streams, max_effort=INF, **effort_args):
46 # TODO: convert streams to test streams with extremely high effort

Callers 1

Calls 5

evaluation_from_factFunction · 0.90
add_atomMethod · 0.80
next_optimisticMethod · 0.45
compute_complexityMethod · 0.45
get_certifiedMethod · 0.45

Tested by

no test coverage detected