โ† All Picat Flashcard Decks

The Planner Module Flashcards

7 cards from real Picat practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 The Planner Module flashcards as text
  1. Which directive correctly imports the Picat planner module?

    Answer: import planner.

    The correct syntax is `import planner.` placed at the top of the Picat source file.

  2. What are the two user-defined predicates that the Picat planner module requires?

    Answer: action/4 and final/1

    The planner requires `action(State, NextState, Action, Cost)` and `final(State)` to be defined by the user.

  3. What is the arity of the `action` predicate used in Picat's planner module?

    Answer: 4

    `action/4` takes four arguments: the current state, next state, the action term, and its cost.

  4. What does the second argument of `plan/2` return after a successful call?

    Answer: A list of action terms constituting the plan

    `plan(State, Plan)` unifies Plan with a list of action terms that lead from State to a final state.

  5. In `plan/4`, what does the second argument (Limit) represent?

    Answer: An upper bound on the total resource cost

    `plan(State, Limit, Plan, Cost)` uses Limit as an upper bound on the accumulated action costs, not raw depth.

  6. What does the `final/1` predicate define in a Picat planning problem?

    Answer: The goal condition that a state must satisfy for the plan to succeed

    `final(State)` succeeds when State is a goal state, telling the planner when to stop searching.

  7. Which default search strategy does Picat's planner module employ?

    Answer: Iterative-deepening depth-first search

    The planner uses iterative-deepening depth-first search (IDDFS) by default, progressively increasing the cost bound.