concepts.dm.pdsketch.domain.Problem#
- class Problem[source]#
Bases:
object
The representation for a planning problem. It contains the set of objects, a inital state (a set of propositions), and a goal expression.
Methods
add_object
(name, typename)Add an object to the problem.
add_proposition
(proposition)Add a proposition to the initial problem.
set_goal
(goal)Set the goal of the problem.
to_state
(executor)Convert the problem to a
State
object.Attributes
The set of objects, which are mappings from object names to object type names.
The initial state, which is a set of propositions.
The goal expression.
- __new__(**kwargs)#
- add_proposition(proposition)[source]#
Add a proposition to the initial problem.
- Parameters:
proposition (FunctionApplicationExpression) – the proposition to add.
- set_goal(goal)[source]#
Set the goal of the problem.
- Parameters:
goal (ValueOutputExpression) – the goal expression.
- to_state(executor)[source]#
Convert the problem to a
State
object.- Parameters:
executor (PDSketchExecutor) – the executor to use to instantiate the state.
- Returns:
the state object.
- Return type:
- goal: ValueOutputExpression | None#
The goal expression.
- objects: Dict[str, str]#
The set of objects, which are mappings from object names to object type names.
- predicates: List[FunctionApplicationExpression]#
The initial state, which is a set of propositions.