From Action Models to Valid Plans

Classical planning constructs an action sequence that transforms a known initial state into a state satisfying a specified goal. You encounter it when modelling tasks such as moving materials, configuring equipment, or processing documents. The central challenge is that an action can enable a later action while destroying something another action needs. A useful plan therefore depends on the effects of the entire sequence, not just the usefulness of each action in isolation.

What the model assumes

The basic setting has a finite collection of discrete facts, a fully known initial state, and known, deterministic action effects. The environment changes only through the modelled actions. We consider sequential execution: one action completes before the next begins. These assumptions let you predict a single state after every executable sequence.


Let FF be the available facts. A state s⊆Fs \subseteq F records exactly those facts currently true. Under the closed-world assumption, omission means false, rather than unknown. A goal set GG specifies facts that must hold together at completion; it need not describe every fact in the final state.


Real equipment can have uncertain outcomes, but that uncertainty is outside this basic model. A classical plan is justified by the supplied deterministic model, so its guarantee depends on that model representing the task accurately.

Actions and state transitions

An action model specifies the facts required before an action and the changes it makes. In the STRIPS representation, write an action aa using three sets: pre⁡(a)\operatorname{pre}(a), add⁡(a)\operatorname{add}(a), and del⁡(a)\operatorname{del}(a). We use positive preconditions and disjoint add and delete sets here.


The governing rules are:


pre⁡(a)⊆s\operatorname{pre}(a) \subseteq s


s′=(s∖del⁡(a))∪add⁡(a).s' = \bigl(s \setminus \operatorname{del}(a)\bigr) \cup \operatorname{add}(a).


The first rule determines whether the action is applicable. Only then does the second rule construct the next state. Preconditions are checked in the old state; an action cannot supply its own missing precondition through its effects.


Three connected boxes show checking preconditions, removing delete effects, and inserting add effects.


Example: A door-opening action might require Closed and Unlocked, delete Closed, and add Open. Unlocked remains true because it is not deleted. Merely requiring a fact does not consume it. Conversely, forgetting to delete Closed would leave both door-status facts true in this representation.



An action schema can use parameters, such as Move(object, source, destination). Replacing every parameter with a specific object produces a ground action. Its actual preconditions and effects are the ones you check during execution.

Validity, goals, and cost

For a proposed sequence π=⟨a1,…,an⟩\pi = \langle a_1,\ldots,a_n\rangle, start at s0s_0 and apply the transition rule repeatedly. If a precondition is missing, stop: the proposed sequence is not executable. If every action is applicable, test the goal in the final state:


G⊆sn.G \subseteq s_n.


Goal facts must hold simultaneously at completion. Achieving one earlier does not help if a later action deletes it. Unrequested facts may remain true, so testing G=snG=s_n would usually be too strict.


Property

Required check

Executable sequence

Every action is applicable when reached

Valid plan

The sequence is executable and its final state satisfies the goal

Minimum-cost plan

No valid plan has a smaller total action cost


With nonnegative action costs c(a)c(a), total cost is


C(π)=∑i=1nc(ai).C(\pi)=\sum_{i=1}^{n}c(a_i).


When every action costs one unit, minimizing cost means minimizing action count. With unequal costs, a longer plan can be cheaper. To establish optimality, give a valid plan and a lower bound that matches its cost; a successful simulation alone establishes validity.



What to remember

  • Check all preconditions before applying any effects.
  • Remove delete effects, insert add effects, and preserve everything else.
  • Validate the full sequence and test the final goal by set inclusion.
  • Distinguish finding a valid plan from proving that its cost is minimal.

Example: Delivering a sealed laboratory sample

A laboratory robot must deliver one sample to an incubator and return to the preparation station. Use plan validation, the replay of a proposed sequence against its action model, to check the instructions before execution.


The initial state is


s0={AtPrep,SampleAtPrep,Empty,Unsealed},s_0=\{\mathrm{AtPrep},\mathrm{SampleAtPrep},\mathrm{Empty},\mathrm{Unsealed}\},


and the goal is G={Delivered,AtPrep}G=\{\mathrm{Delivered},\mathrm{AtPrep}\}. Every fact absent from a state is false. The table gives all available actions and all their effects; unchanged facts persist.


Action

Preconditions

Add effects

Delete effects

Time (s)

Load

AtPrep, SampleAtPrep, Empty

Carrying

SampleAtPrep, Empty

2

Seal

Carrying, Unsealed

Sealed

Unsealed

1

Go

AtPrep

AtIncubator

AtPrep

3

Unload

AtIncubator, Carrying, Sealed

Delivered, Empty

Carrying

2

Return

AtIncubator

AtPrep

AtIncubator

3


Actions execute sequentially without overlap. Treat each listed time as a fixed additive cost; the state changes at action completion, and nothing else changes during execution.


a) Find the complete state after Load followed by Seal.


First, check Load against the initial state. AtPrep, SampleAtPrep, and Empty are all present, so Load is applicable. Load deletes ________ current facts and inserts ________ new fact. Applying those changes gives


s1={AtPrep,Unsealed,Carrying}.s_1=\{\mathrm{AtPrep},\mathrm{Unsealed},\mathrm{Carrying}\}.


Next, check Seal. Both Carrying and Unsealed are present. Remove Unsealed and insert Sealed, preserving AtPrep and Carrying:


s2={AtPrep,Carrying,Sealed}.s_2=\{\mathrm{AtPrep},\mathrm{Carrying},\mathrm{Sealed}\}.


The final state after the two actions is AtPrep, Carrying, and Sealed. Carrying remains true because Seal requires it but does not delete it.


b) Identify the first inapplicable action in the proposed sequence Load, Go, Unload. Repair the sequence so that it achieves the complete goal.


Three connected boxes show the proposed sequence Load, Go, and Unload.


Load is applicable and produces s1s_1 from part a. Go then requires AtPrep, which is present. It deletes AtPrep and adds AtIncubator, producing


{AtIncubator,Unsealed,Carrying}.\{\mathrm{AtIncubator},\mathrm{Unsealed},\mathrm{Carrying}\}.


Immediately before the attempted unload, the robot's location fact is ________. However, Sealed is absent. Unload requires Sealed as well as AtIncubator and Carrying, so Unload, the third action, is the first inapplicable action.


Insert Seal after Load, and append Return after Unload. The repaired sequence is


⟨Load,Seal,Go,Unload,Return⟩.\langle\mathrm{Load},\mathrm{Seal},\mathrm{Go},\mathrm{Unload},\mathrm{Return}\rangle.


After Load and Seal, the state is s2s_2 from part a. Go replaces AtPrep with AtIncubator. Unload then removes Carrying and adds Delivered and Empty. Return replaces AtIncubator with AtPrep. The final state is


{AtPrep,Sealed,Delivered,Empty},\{\mathrm{AtPrep},\mathrm{Sealed},\mathrm{Delivered},\mathrm{Empty}\},


which contains both goal facts. The extra true facts are allowed because the goal specifies requirements rather than an exact final-state description.


c) Calculate the repaired plan's execution time and determine whether any valid plan can take less time.


First, add the fixed times of the repaired sequence. The time through completion of Unload is ________. Including Return gives


C=2+1+3+2+3=11 s.C=2+1+3+2+3=11\ \text{s}.


Next, establish a lower bound. Unload is the only action that adds Delivered, so every valid plan needs Unload. Its requirements force Load to establish Carrying, Seal to establish Sealed, and Go to establish AtIncubator. Go deletes AtPrep, and Return is the only action that can restore it. Therefore every valid plan includes all five actions at least once.


Their combined cost is 11 s11\ \text{s}. All action times are positive, so adding actions cannot reduce that bound. The repaired plan attains it and therefore has minimum execution time 11 s.

A laboratory wants a fixed action sequence for moving trays. Each proposed model uses finitely many discrete facts. Which description satisfies the usual assumptions of classical planning? Judge the model as described.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A finishing station starts in state {Raw,Free}\{\mathrm{Raw},\mathrm{Free}\}. Its goal is {Polished,Free}\{\mathrm{Polished},\mathrm{Free}\}. The table lists all available actions; unlisted facts are false, and facts not changed by an action persist.


Action

Preconditions

Add effects

Delete effects

Cut

Raw, Free

Cut, Occupied

Raw, Free

Release

Occupied

Free

Occupied

Polish

Cut, Free

Polished, Occupied

Cut, Free


Find the minimum number of actions needed to achieve the goal. Give an exact integer. The station must be Free in the final state.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A parcel robot starts in {Home,Token,Locked,ParcelHome}\{\mathrm{Home},\mathrm{Token},\mathrm{Locked},\mathrm{ParcelHome}\}. An access gate consumes its single-use token when unlocked. All other facts are initially false, and each action changes only its listed effects.


Action

Preconditions

Add effects

Delete effects

Pick

Home, ParcelHome

Holding

ParcelHome

Unlock

Home, Token, Locked

Open

Token, Locked

Enter

Home, Open

Inside

Home

Drop

Inside, Holding

Delivered

Holding


The robot executes Pick, Unlock, Enter, Drop. Complete each cell with true or false for the fact named in its column. Record the state immediately after the named action.


Four connected boxes show the supplied action sequence Pick, Unlock, Enter, and Drop.


State afterHomeTokenOpenHoldingDelivered
Unlock
Enter
Drop

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice