Skip to content

Transition Systems and Propositional Logic

Source slide: B1 Transition Systems and Propositional Logic

The previous chapter described planning as search for an action sequence. This chapter makes the search space explicit. A transition system is the mathematical object behind the picture: it tells us which states exist, which labeled transitions connect them, how much those transitions cost, where execution starts, and which states count as goals.

The chapter then explains why planners rarely receive transition systems in this explicit form. Even simple domains can have too many states to list. Propositional logic gives us a compact language for describing states and sets of states without drawing the whole graph.

A transition system is a labeled directed graph with a little extra structure.

Definition: Transition system

A transition system is a tuple

T=S,L,c,T,s0,S\mathcal{T} = \langle S, L, c, T, s_0, S_\star\rangle

where SS is a finite set of states, LL is a finite set of transition labels, c:LN0c : L \to \mathbb{N}_0 is a label-cost function, TS×L×ST \subseteq S \times L \times S is the transition relation, s0Ss_0 \in S is the initial state, and SSS_\star \subseteq S is the set of goal states.

If s,,sT\langle s,\ell,s'\rangle \in T, we write

ss.s \xrightarrow{\ell} s' .

Read this as: from state ss, transition label \ell may take us to state ss'. In planning, the label will usually correspond to an action or operator.

Each component answers one practical question.

  • SS says what complete world states are possible in the model.
  • LL says what labels can appear on transitions.
  • cc says how expensive each label is.
  • TT says which labeled moves are actually allowed.
  • s0s_0 says where execution starts.
  • SS_\star says which states are acceptable endpoints.

A solution is not a state by itself. It is a path from the initial state to some goal state. If the path uses labels 1,,n\ell_1,\ldots,\ell_n, its cost is

i=1nc(i).\sum_{i=1}^{n} c(\ell_i).

When every label has cost 11, this is just the number of steps. With general non-negative costs, a shorter path need not be cheaper.

Classical planning assumes deterministic change. In transition-system language, that means a state and a label determine at most one successor.

Definition: Deterministic transition system

A transition system is deterministic if, for all states ss and labels \ell, there is at most one state ss' such that sss \xrightarrow{\ell} s'.

Determinism does not mean every action is always possible. It means that if a transition with label \ell exists from ss, there is no second different successor with the same label. An unavailable action is represented by the absence of such a transition.

Most planning terminology in transition systems comes directly from graph search.

A state ss' is a successor of ss if some label leads from ss to ss'. Conversely, ss is a predecessor of ss'. A state is reachable from ss if there is a finite sequence of transitions from ss to that state. When no starting state is mentioned, reachability is usually from s0s_0.

A trace writes both states and labels:

s01s12nsn.s_0 \xrightarrow{\ell_1} s_1 \xrightarrow{\ell_2} \cdots \xrightarrow{\ell_n} s_n .

This trace is a solution from s0s_0 if snSs_n \in S_\star. A transition system is solvable if at least one such goal-reaching trace exists.

Blocks world is a useful running example because its rules are simple but its state space grows very quickly. Blocks can be stacked on the table or on top of one another. The exact table positions do not matter, and each block can have at most one block above it and at most one block below it.

The number of possible states grows as follows:

BlocksStates
11
313
5501
8394,353
1058,941,091
1565,573,803,186,921

These numbers explain why explicit transition systems are mainly a semantic model. They tell us what a planning problem means, but they are usually not a practical input format.

There is also a useful distinction between finding any plan and finding a best plan. In blocks world, a simple strategy can find some solution by clearing blocks to the table and rebuilding the target tower. Finding a shortest solution is much harder. This distinction will later reappear as satisficing versus optimal planning.

If a planner had to receive all of SS and all of TT explicitly, even small domains would be impossible to write down. Instead, we describe states using variables and describe transitions using operators. The explicit transition system is then induced by the compact description.

Propositional logic is the first compact language we need. With nn Boolean variables, there are 2n2^n possible truth assignments. A formula over those variables can describe a single state, many states, all states, or no states.

For example, if pp means “the package is in the truck” and rr means “the truck is at the right location”, then the formula

prp \land r

describes all states in which both facts are true, regardless of other variables in the model.

Let AA be a set of atomic propositions. Formulas over AA are built from the following ingredients:

  • \top and \bot, meaning truth and falsity;
  • atoms aAa \in A;
  • negation ¬φ\neg\varphi;
  • disjunction φψ\varphi \lor \psi;
  • conjunction φψ\varphi \land \psi.

Implication and equivalence are common abbreviations:

φψabbreviates¬φψ,\varphi \to \psi \quad\text{abbreviates}\quad \neg\varphi \lor \psi ,

and

φψabbreviates(φψ)(ψφ).\varphi \leftrightarrow \psi \quad\text{abbreviates}\quad (\varphi \to \psi) \land (\psi \to \varphi).

The syntax tells us which strings are well-formed formulas. It does not yet tell us whether a formula is true.

Truth is evaluated relative to an interpretation. An interpretation I:A{T,F}I : A \to \{T,F\} assigns each atom a truth value. Satisfaction, written IφI \models \varphi, is defined recursively:

II \models \top I⊭I \not\models \bot IaiffI(a)=TI \models a \quad\text{iff}\quad I(a) = T I¬φiffI⊭φI \models \neg\varphi \quad\text{iff}\quad I \not\models \varphi IφψiffIφ or IψI \models \varphi \lor \psi \quad\text{iff}\quad I \models \varphi \text{ or } I \models \psi IφψiffIφ and Iψ.I \models \varphi \land \psi \quad\text{iff}\quad I \models \varphi \text{ and } I \models \psi .

For planning, interpretations will become states. A formula then represents the set of states that satisfy it.

A formula is satisfiable if at least one interpretation satisfies it. It is unsatisfiable if none do. It is valid if every interpretation satisfies it.

Logical consequence is written φψ\varphi \models \psi. It means every model of φ\varphi is also a model of ψ\psi. Logical equivalence, written φψ\varphi \equiv \psi, means the two formulas have exactly the same models.

A literal is an atom aa or a negated atom ¬a\neg a. A clause is a disjunction of literals. A monomial is a conjunction of literals. Normal forms such as negation normal form, conjunctive normal form, and disjunctive normal form reorganize formulas into restricted shapes that are useful for algorithms.

Do not confuse a transition system with its compact encoding. The transition system is the full state-space graph. A planning task is a compact description that induces such a graph. Algorithms often reason over the compact description while using transition-system concepts to define correctness.

Another common mistake is to treat determinism as totality. A deterministic system can still have no outgoing transition for a particular state-label pair.

A transition system is the explicit mathematical model of state-space search: states, labels, costs, transitions, an initial state, and goal states. A solution is a path from the initial state to a goal state, and its cost is the sum of the labels used. Classical planning focuses on deterministic transition systems, but explicit systems are usually too large to list. Propositional logic provides the compact language for describing states and sets of states, preparing us for planning tasks.

  1. What does each component of T=S,L,c,T,s0,S\mathcal{T} = \langle S,L,c,T,s_0,S_\star\rangle represent?
  2. Why does deterministic not mean every label is applicable everywhere?
  3. What is the difference between a trace and a label path?
  4. How many truth assignments are possible over nn propositional variables?
  5. Why are transition systems useful even when planners do not receive them explicitly?