Logical Agents and Planning

Learn how an AI system can store what it knows as logical sentences and work out what follows from them. Write knowledge in propositional and first-order logic, prove conclusions with resolution and chaining, find models with SAT solvers, organize facts in ontologies and knowledge graphs, and describe planning problems so that a planner can find a sequence of actions that reaches a goal.

IntermediateLesson 5 of 10 in Artificial Intelligence Course

What you will learn

  1. Explain how a knowledge-based agent stores facts and reaches conclusions, write its knowledge as propositional sentences, and decide what follows from those sentences by checking models.
    • Describe how a knowledge-based agent works
      Explain the knowledge base, the TELL and ASK operations and the agent's perceive–reason–act cycle, using the wumpus world as a running example.
    • Write sentences in propositional logic
      Use the syntax and truth-table meaning of propositional logic to encode rules about a world, including facts that change over time.
    • Decide entailment by checking models
      Define entailment, validity and satisfiability, and use truth-table enumeration to decide whether a conclusion follows from a knowledge base.
  2. Build proofs with inference rules and resolution, reason efficiently with Horn clauses by chaining, and use SAT solvers to find models or show that none exist.
    • Build proofs with inference rules
      Apply Modus Ponens, And-Elimination and standard equivalences to build step-by-step proofs, and treat finding a proof as a search problem.
    • Prove entailment by resolution
      Convert sentences to conjunctive normal form and use resolution refutation to show that a knowledge base entails a query.
    • Reason with Horn clauses by forward and backward chaining
      Recognize definite and Horn clauses and decide entailment with forward chaining and backward chaining, comparing when each fits.
    • Find models with SAT solvers
      Decide satisfiability with the DPLL backtracking algorithm and the WalkSAT local search, and judge what each result shows.
  3. Read, evaluate and write first-order sentences about objects and relations, and build a small knowledge base for a domain.
    • Read and evaluate first-order sentences
      Use the syntax and semantics of first-order logic, evaluate sentences in a model, and contrast standard and database semantics.
    • Translate statements into first-order logic
      Write English statements as first-order sentences, choosing quantifiers, connectives and equality correctly and avoiding the classic translation errors.
    • Build a knowledge base for a domain
      Follow the knowledge-engineering process to choose a vocabulary, write general axioms and instance facts, pose queries and debug a small knowledge base.
  4. Match first-order sentences with unification, chain forward and backward through first-order rules, and prove queries by first-order resolution.
    • Match sentences with substitution and unification
      Apply universal and existential instantiation, explain propositionalization, and compute most general unifiers for Generalized Modus Ponens.
    • Chain forward and backward with first-order rules
      Run forward chaining to a fixed point and backward chaining on goals with first-order definite clauses, and explain how logic programming in Prolog works.
    • Prove first-order queries by resolution
      Convert first-order sentences to clausal form with Skolemization and prove queries by resolution refutation, using strategies that keep the search small.
  5. Structure general knowledge with categories, ontologies and semantic networks, and explain how knowledge graphs store, query and extend facts.
    • Structure knowledge with categories and ontologies
      Represent categories, membership, subclasses and parts, describe semantic networks and description logics, and explain default reasoning with exceptions.
    • Explain how knowledge graphs store and use facts
      Describe knowledge graphs as sets of triples with a schema, query them, derive new facts by rules and recognize their uses and limits.
  6. Describe planning problems in PDDL, search for plans forward and backward with domain-independent heuristics, and compare planning approaches and their limits.
    • Describe a planning problem in PDDL
      Write states, action schemas, initial states and goals in PDDL, and compute how an action changes a state.
    • Search for plans with domain-independent heuristics
      Run forward and backward state-space search on planning problems and estimate plan length with relaxed-problem heuristics.
    • Compare planning approaches and their limits
      Explain subgoal interaction, SAT-based, partial-order and hierarchical planning, the complexity of planning, and what classical planning cannot model.

Logical Agents and Planning study guide

6 chapters

1

Represent what an agent knows in propositional logic

An agent can draw useful conclusions from observations before it sees the whole world. Formal sentences make those conclusions checkable: you can ask which possible worlds fit the observations and whether every one supports the proposed action. Start with the knowledge-based agent, encode its rules with propositional connectives, and then use models to distinguish justified conclusions from facts that remain unknown.

1.1 Describe how a knowledge-based agent works

A knowledge-based agent acts on a description of its world. Its knowledge base (KB) contains formal sentences: initial facts and rules, called axioms, and information added during operation. Inference connects those sentences to conclusions the agent has never directly observed.

Connect perception to action

TELL adds a sentence to the KB. ASK requests an answer supported by it, either already stored or derived. At each time step the agent records its percept, asks what action to take, records the chosen action, and executes it. Recording actions matters because later reasoning needs to know how the world has changed.

At the knowledge level, we might say that a robot knows a passage is blocked and wants to reach a storage area. At the implementation level, we describe data structures and inference procedures. A declarative design supplies facts and rules; a procedural design writes behavior directly in code. A working agent can combine them.

Read the wumpus world

The wumpus world is a 4 × 4 grid. Coordinates are [column, row]; the agent starts at [1, 1] facing right. There is one wumpus, one piece of gold, and a pit probability of 0.2 in each square except the start. Pits and the wumpus stay put. The world is discrete, deterministic and single-agent, but partially observable: the layout is hidden.

A Breeze signals a pit in a directly adjacent square; a Stench signals the wumpus there. Diagonal squares do not count. Glitter marks gold in the current square, Bump reports a wall, and Scream reports the wumpus's death anywhere in the cave. Actions are Forward, TurnLeft, TurnRight, Grab, Shoot and Climb. The agent has one arrow; Climb exits only from [1, 1]. Leaving with gold earns 1000 points, dying loses 1000, every action costs 1, and shooting costs another 10.

Combine observations

At [1, 1], no Breeze rules out pits at [1, 2] and [2, 1]; no Stench rules out the wumpus there. Both squares are safe. At [2, 1], a Breeze puts a pit in [2, 2] or [3, 1], because the start has none. No Stench rules out the wumpus in [2, 2] and [3, 1].

The agent next visits [1, 2]. No Breeze excludes a pit at [2, 2], so the earlier disjunction forces a pit at [3, 1]. A Stench at [1, 2] locates the wumpus in [1, 3] or [2, 2]. The earlier no-Stench observation excludes [2, 2], leaving [1, 3]. The agent has established that [2, 2] contains neither hazard without entering it.

This reasoning depends on both the percepts and the rules linking percepts to hazards. An unexplored square is unknown when the KB supports neither safety nor danger. Failure to derive danger is insufficient for a claim of safety. Choosing to enter such a square requires a decision about risk, beyond the entailments alone.

Key Takeaways

  • A KB combines background axioms with recorded percepts and actions.
  • TELL adds sentences; ASK returns supported answers.
  • The agent records a percept, chooses and records an action, then acts.
  • Knowledge can establish facts about unvisited squares.
  • Unknown and safe are different conclusions.

1.2 Write sentences in propositional logic

Propositional logic gives an agent precise rules for combining yes-or-no claims. An atomic symbol names a whole claim, such as P₁₂ for "there is a pit in [1, 2]." A literal is an atom or its negation. Larger sentences combine them with ¬, ∧, ∨, ⇒ and ⇔.

Evaluate the connectives

A model assigns true or false to each symbol. With n symbols there are 2ⁿ assignments. Negation reverses a truth value; a conjunction needs both sides true; inclusive disjunction needs at least one. An implication is false only with a true premise and a false conclusion. A biconditional needs equal truth values on both sides.

PQP ⇒ QP ⇔ Q
TrueTrueTrueTrue
TrueFalseFalseFalse
FalseTrueTrueFalse
FalseFalseTrueTrue

The binding order is ¬, ∧, ∨, ⇒, ⇔. Thus ¬A ∧ B ⇒ C means ((¬A) ∧ B) ⇒ C. Use parentheses when the intended grouping might be unclear. With A true, B false and C true, (A ∨ B) ⇒ C is true, while A ⇒ (B ∧ C) is false.

Logical implication states a constraint on truth values, not a cause. A false premise makes the implication true. It also gives no license to reverse the direction: from "if the battery is empty, the robot stops," stopping alone cannot establish an empty battery.

Encode both directions of a rule

The breeze rule at the start is B₁₁ ⇔ (P₁₂ ∨ P₂₁). It says a breeze occurs exactly when a neighboring pit exists. The direction B₁₁ ⇒ (P₁₂ ∨ P₂₁) supports hazard detection from a breeze. The reverse direction supports pit exclusion from no breeze. Omitting it loses the inference from ¬B₁₁ to ¬P₁₂ ∧ ¬P₂₁.

Each square needs its own propositional rule. Encoding exactly one wumpus among 16 squares needs an at-least-one disjunction plus an at-most-one constraint for each pair. There are 16 × 15 / 2 = 120 distinct pairs. Propositional symbols cannot quantify over squares, so general rules become many separate sentences.

Represent change without losing persistence

A fluent is a fact whose truth can change. A time superscript distinguishes its values: L₁₁⁰ records location at time 0. An effect axiom can say that moving right from [1, 1] produces location [2, 1] at time 1 and removes the old location. It leaves open what happens to unrelated facts, such as possession of the arrow. Describing all these unchanged facts is the frame problem.

A successor-state axiom gives one complete update rule per fluent: Fᵗ⁺¹ ⇔ (an action makes F true) ∨ (Fᵗ ∧ no action makes F false). For the arrow, HaveArrowᵗ⁺¹ ⇔ (HaveArrowᵗ ∧ ¬Shootᵗ). With no action that supplies another arrow, it persists until shooting and remains absent afterward.

Key Takeaways

  • An implication fails only when its premise is true and its conclusion false.
  • Inclusive or allows both alternatives to hold.
  • A biconditional encodes two implications.
  • Propositional general rules require separate instances.
  • Successor-state axioms describe both change and persistence.
  • Exactly one combines at least one with pairwise exclusions.

1.3 Decide entailment by checking models

An agent needs a standard for deciding whether a conclusion is justified. Entailment, written KB ⊨ α, means that α is true in every model satisfying the KB. One compatible world where α is false defeats the entailment.

Keep exactly the compatible models

Model checking enumerates assignments, discards those that make any KB sentence false, and tests the query in those that remain. Suppose the KB contains A ∨ B and ¬A. Of the four assignments to A and B, only A false, B true satisfies both sentences. The KB entails B and ¬A. It fails to entail A because its surviving model makes A false.

In the wumpus KB, ¬P₁₁, B₁₁ ⇔ (P₁₂ ∨ P₂₁), B₂₁ ⇔ (P₁₁ ∨ P₂₂ ∨ P₃₁), ¬B₁₁ and B₂₁ use seven symbols. There are 128 assignments. Exactly three satisfy the KB: P₁₂ and P₂₁ are false, while P₂₂ and P₃₁ are respectively true/false, false/true or true/true. Thus ¬P₁₂ is entailed. P₂₂ varies across the three models, so neither P₂₂ nor ¬P₂₂ is entailed. These pit rules alone establish absence of a pit, not absence of the wumpus.

Distinguish the main logical tests
TestWhat it asks
SatisfiableIs the sentence true in at least one model?
UnsatisfiableIs it true in no model?
ValidIs it true in every model?
EquivalentDo two sentences have exactly the same models?

P ∨ ¬P is valid; P ∧ ¬P is unsatisfiable. P ⇒ Q and ¬P ∨ Q are equivalent. Equivalence requires entailment in both directions. A ∧ B entails A, but A allows models with B false, so the reverse entailment fails.

Turn a query into a contradiction test

KB ⊨ α exactly when KB ∧ ¬α is unsatisfiable. Adding the negated query looks for a world where the KB holds and the query fails. Finding none proves entailment; finding one gives a countermodel. Equivalently, α ⊨ β exactly when α ⇒ β is valid. Validity of α can itself be tested by checking whether ¬α is unsatisfiable.

The connective ⇒ belongs inside a sentence. The symbol ⊨ describes a relationship between sentences and their models. Similarly, "not entailed" can mean the query is ruled out or that it remains unknown. Check whether the negation is entailed before choosing between them.

Enumeration is sound and complete for propositional logic because it checks a finite set exhaustively. Depth-first enumeration takes O(2ⁿ) time and O(n) memory; 50 symbols already yield about 1.13 × 10¹⁵ assignments. Propositional entailment is co-NP-complete. Also check consistency: a KB with no models entails every sentence, because it has no compatible model that could violate any query.

Key Takeaways

  • Entailment means truth in every KB model.
  • A countermodel satisfies the KB and falsifies the query.
  • Unknown means neither a claim nor its negation is entailed.
  • KB ⊨ α exactly when KB ∧ ¬α is unsatisfiable.
  • An inconsistent classical KB entails every sentence.
2

Prove conclusions with propositional inference and SAT solvers

Enumerating every possible world can be costly even when a conclusion has a short proof. Inference rules, resolution and Horn-clause chaining offer different ways to derive consequences from a knowledge base. SAT solvers approach the same logical constraints by searching for satisfying assignments. Understanding what each procedure returns helps you distinguish a proved conclusion, a counterexample and a search that has simply stopped.

2.1 Build proofs with inference rules

A proof derives a query by applying rules to sentences already known. KB ⊢ α records a derivation; KB ⊨ α records a semantic guarantee across models. A sound proof procedure connects them: every conclusion it derives really follows. A complete procedure can derive every entailed conclusion within its intended language.

Apply rules to their premises

Modus Ponens takes P ⇒ Q and P to Q. And-Elimination takes P ∧ Q to either conjunct. If SensorOn ∧ Calibrated is known and SensorOn ⇒ ReadingAvailable is known, And-Elimination yields SensorOn, then Modus Ponens yields ReadingAvailable. Each line names the information and rule that justify it.

These rules preserve truth, but their restricted vocabulary makes them incomplete as a complete proof system. From P, the sentence P ∨ Q follows semantically, yet neither rule introduces ∨. A set of sound rules can still miss valid conclusions.

Rewrite without changing meaning

Useful equivalences can be applied in either direction:

  • Double negation: ¬¬P ≡ P.
  • Implication: P ⇒ Q ≡ ¬P ∨ Q.
  • Contraposition: P ⇒ Q ≡ ¬Q ⇒ ¬P.
  • Biconditional: P ⇔ Q ≡ (P ⇒ Q) ∧ (Q ⇒ P).
  • De Morgan: ¬(P ∨ Q) ≡ ¬P ∧ ¬Q, and ¬(P ∧ Q) ≡ ¬P ∨ ¬Q.
  • Distribution: P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R), with the dual law for ∧ over ∨.

Conjunction and disjunction also allow regrouping and reordering. These rewrites expose a sentence's useful structure without adding a new factual assumption.

For B₁₁ ⇔ (P₁₂ ∨ P₂₁) and ¬B₁₁, split the biconditional and select (P₁₂ ∨ P₂₁) ⇒ B₁₁. Contraposition gives ¬B₁₁ ⇒ ¬(P₁₂ ∨ P₂₁). Modus Ponens yields ¬(P₁₂ ∨ P₂₁); De Morgan yields ¬P₁₂ ∧ ¬P₂₁. And-Elimination then proves ¬P₁₂. The proof never needs to enumerate every cave layout.

Test an invalid shortcut

From P ⇒ Q and Q, inferring P is affirming the consequent. From P ⇒ Q and ¬P, inferring ¬Q is denying the antecedent. Both fail in the model P false, Q true. A server outage may stop a page loading, but a loading failure has other possible causes; absence of an outage does not ensure success either.

Proof finding is a search problem. The initial state contains the KB; an action applies an inference rule and adds its conclusion; the goal state contains the query. The proof length can serve as path cost. Selecting relevant sentences avoids spending effort on unrelated chains. Classical logic is monotonic: adding premises preserves earlier entailments. Default rules with exceptions need a different treatment because later information can withdraw an earlier default conclusion.

Key Takeaways

  • Sound inference preserves truth from premises to conclusion.
  • Modus Ponens needs both an implication and its premise.
  • Equivalences can rewrite a sentence in either direction.
  • Affirming the consequent and denying the antecedent are invalid.
  • Proof search adds justified sentences until it reaches the query.
  • Classical entailment is monotonic.

2.2 Prove entailment by resolution

Resolution proves entailment by looking for a contradiction. Its input is conjunctive normal form (CNF): an AND of clauses, each an OR of literals. A one-literal clause is a unit clause. The empty clause has no possible true literal and represents falsehood.

Convert sentences to clauses

First eliminate ⇔ and ⇒. Next move negations inward with De Morgan's laws and double-negation elimination. Finally distribute ∨ over ∧. A biconditional can therefore create several clauses.

For B₁₁ ⇔ (P₁₂ ∨ P₂₁), the forward direction gives ¬B₁₁ ∨ P₁₂ ∨ P₂₁. The reverse gives ¬(P₁₂ ∨ P₂₁) ∨ B₁₁. Moving the negation inward and distributing yields ¬P₁₂ ∨ B₁₁ and ¬P₂₁ ∨ B₁₁. All three clauses are needed for the full biconditional.

Resolve one complementary pair

From P ∨ A and ¬P ∨ B, resolution derives A ∨ B. Whichever value P has, at least one remaining part must hold. Unit resolution uses a single-literal clause: P with ¬P ∨ B yields B. Duplicate literals are factored out, so resolving A ∨ B with A ∨ ¬B yields A.

Resolve exactly one complementary pair at a time. A ∨ B and ¬A ∨ ¬B are jointly satisfiable when A is true and B false. Removing both pairs would incorrectly yield the empty clause. Resolving on A alone produces B ∨ ¬B, a tautology that adds no constraint.

Refute the negated query

To prove KB ⊨ α, add ¬α, convert the combined sentence to CNF, and derive new resolvents. Reaching the empty clause proves that no countermodel exists.

For the pit query ¬P₁₂, add P₁₂. Resolve it with ¬P₁₂ ∨ B₁₁ to get B₁₁. Resolve that with the observed ¬B₁₁ to reach the empty clause. The proof establishes absence of the pit, not its presence: the positive pit literal was a temporary negated query.

A second example uses R ⇒ C, (C ∨ I) ⇒ G and R. The CNF clauses are ¬R ∨ C, ¬C ∨ G, ¬I ∨ G and R. Add ¬G. It resolves with ¬C ∨ G to give ¬C, which yields ¬R using the first clause. Resolving ¬R with R closes the refutation. No fact about I was required.

Propositional resolution is sound and refutation-complete. It terminates because finitely many symbols permit finitely many distinct clauses. If exhaustive closure produces no new clause and no contradiction, the query is not entailed. It need not derive every entailed sentence directly: from A alone, resolution does not construct A ∨ B.

Distribution can expand CNF exponentially. A Tseitin encoding introduces symbols for subformulas and yields linear-size CNF. The new sentence is equisatisfiable with the original; it need not be logically equivalent over the expanded vocabulary. Preserving satisfiability is enough for SAT-based contradiction tests.

Key Takeaways

  • CNF is a conjunction of disjunctions of literals.
  • Resolution eliminates one complementary pair per step.
  • Refutation adds the negation of the query.
  • The empty clause proves unsatisfiability.
  • Propositional resolution is refutation-complete and terminates.
  • Tseitin encoding preserves satisfiability while controlling CNF size.

2.3 Reason with Horn clauses by forward and backward chaining

Rules with one positive conclusion permit a simpler inference procedure than general resolution. A definite clause has exactly one positive literal; ¬A ∨ ¬B ∨ C is written A ∧ B ⇒ C. A fact has an empty body. A Horn clause has at most one positive literal, including a goal clause with none, such as A ∧ B ⇒ False.

Let facts drive the rules

Forward chaining starts with known facts. When every premise of a rule is known, add its head. Continue until the query appears or a fixed point adds nothing. Efficient implementations keep an agenda of new facts and a count of unmet premises per rule.

Take PowerOn, FanSpinning and LoadLow as facts. The rules are PowerOn ∧ FanSpinning ⇒ Cooling; Cooling ∧ LoadLow ⇒ TempNormal; PowerOn ⇒ LedLit; LedLit ∧ TempNormal ⇒ SystemOK; FanSpinning ⇒ NoiseHeard. Processing PowerOn enables LedLit and partly satisfies the cooling rule. FanSpinning enables Cooling and NoiseHeard. Cooling plus LoadLow gives TempNormal, then TempNormal plus LedLit gives SystemOK. NoiseHeard is a valid extra conclusion even though the query did not need it.

Let a query choose the rules

Backward chaining starts with SystemOK. Its rule requires LedLit and TempNormal. LedLit reduces to the known PowerOn. TempNormal requires Cooling and LoadLow; Cooling requires PowerOn and FanSpinning. Every leaf is a fact, so the query succeeds. The noise rule is never examined.

MethodStarting pointUseful setting
Forward chainingAvailable factsMaintain consequences as observations arrive
Backward chainingA requested conclusionAnswer a specific query with relevant rules

For definite-clause KBs and atomic queries, both methods are sound and complete with appropriate search control. Propositional forward chaining can run in time linear in KB size. At its fixed point, assigning true to derived symbols and false to all others gives a model of the definite clauses.

Handle cycles without losing answers

A ⇒ B and B ⇒ A give a naive backward procedure an endless loop. A branch can stop when its goal is already on the active goal stack. Successful subgoals can be cached, but a failure caused by a loop is temporary. With B ⇒ A, A ⇒ B, C ⇒ A and fact C, an early attempt to prove B while A is active can fail. After proving A from C, trying B again succeeds. Caching that first failure permanently would lose the proof. Tabling tracks dependent goals and revisits them when answers appear.

Chaining depends on the rule form. A ∨ B has two positive literals, so it is not Horn. Together with A ⇒ C and B ⇒ C, it entails C by considering both alternatives. No definite rule fires from the disjunction alone. General resolution can prove this conclusion even though simple chaining stalls.

Key Takeaways

  • Definite clauses have one positive literal; Horn clauses have at most one.
  • Forward chaining is data-driven.
  • Backward chaining is goal-driven.
  • A fixed point adds no new facts.
  • Loop-based failures must not be cached as final.
  • Disjunctive premises can require reasoning beyond chaining.

2.4 Find models with SAT solvers

A SAT solver searches for an assignment satisfying every clause in a CNF sentence. A returned model can be checked directly. An unsatisfiable result rules out all assignments. SAT is NP-complete, but structured instances often admit much faster solutions than exhaustive truth-table enumeration.

Reduce the search with DPLL

DPLL is depth-first backtracking with three shortcuts. A true literal satisfies its entire clause, while a fully false clause ends the branch. A pure symbol occurs with only one sign among unsatisfied clauses, so it can be set to satisfy those occurrences. A unit clause has only one remaining possible true literal, which must be set true. Repeating such forced choices is unit propagation.

Consider (A), (¬A ∨ B), (¬B ∨ C ∨ D), (¬C ∨ ¬D), (D ∨ E). E is pure, so set it true. The unit A forces A true, which forces B true. The remaining constraint C ∨ D and the clause ¬C ∨ ¬D require exactly one of C and D. Branch on C true; propagation forces D false. A, B, C and E true with D false satisfy every clause.

For (A ∨ B), (A ∨ ¬B), (¬A ∨ C), (¬A ∨ ¬C), branch on A. A false forces both B and ¬B; A true forces both C and ¬C. Both branches conflict, so the whole sentence is unsatisfiable.

Learn from conflicts

Conflict-driven clause learning (CDCL) extends this search. A learned clause blocks a combination responsible for a conflict. Backjumping skips irrelevant choices; variable activity guides branching; restarts change the search route; watched literals speed propagation. Learned clauses are justified by the formula, so they preserve its possible solutions.

Search by changing a complete assignment

WalkSAT begins with a random complete assignment. It chooses an unsatisfied clause and flips a variable in it, sometimes randomly and sometimes to leave the most clauses satisfied. Random moves help escape local traps. Starting with all five symbols false in the earlier example leaves (A) and (D ∨ E) false. Flipping A fixes (A) but breaks (¬A ∨ B). A move can repair one clause while damaging another.

ResultDPLL or CDCLWalkSAT
Satisfying model foundEstablishes satisfiabilityEstablishes satisfiability
Search ends without a modelExhaustive failure proves unsatisfiabilityA flip limit leaves the answer unresolved

For entailment, submit KB ∧ ¬α. Unsatisfiability proves α; a model is a counterexample. A WalkSAT timeout leaves both possibilities open. In large random 3-CNF formulas, the clause-to-variable ratio has an estimated transition near 4.26, with hard instances often near it. This is an ensemble pattern, not a cutoff that decides an individual formula. Clause structure and solver strategy also affect difficulty.

Key Takeaways

  • Unit propagation makes forced assignments.
  • Pure-symbol choices preserve satisfiability.
  • DPLL branches and backtracks; CDCL also learns from conflicts.
  • WalkSAT searches among complete assignments.
  • A WalkSAT timeout leaves satisfiability unresolved.
  • SAT tests entailment by checking KB ∧ ¬α.
  • The random 3-SAT threshold describes a distribution, not each instance.
3

Represent knowledge in first-order logic

A rule about every object should not need a separate symbol for each one. First-order logic adds objects, relations, functions and quantifiers so that a compact sentence can describe a whole domain. Its expressive power also makes modeling choices more important: quantifier order, identity and assumptions about missing facts can change the answers. Build a small knowledge base to see how these choices work together.

3.1 Read and evaluate first-order sentences

First-order logic describes objects and their relationships. Instead of giving every square an unrelated symbol, it can express a rule for all squares: ∀s (Breezy(s) ⇔ ∃r (Adjacent(r, s) ∧ Pit(r))). Quantifiers make generality part of the language.

Separate objects from claims

A constant names an object, such as Ada. A variable, such as x, ranges over objects. A function maps objects to an object: MotherOf(Ada) is a term referring to someone. A predicate forms a claim: Owns(Ada, Atlas) is true or false. A term may be a constant, variable or function applied to terms.

Book(x) is a sentence, not an object, so Owns(Ada, Book(x)) puts the wrong kind of expression in an argument position. Equality compares what terms refer to: MotherOf(Ada) = Clara says both terms denote the same object.

Evaluate a sentence in a model

A first-order model supplies a nonempty domain and an interpretation. Constants denote domain objects, predicates denote relations, and functions give outputs for every suitable tuple of domain objects. A universally quantified sentence must hold for every possible value of its variable; an existential sentence needs at least one witness.

Let the domain be {a, b, k}; Ada names a, Ben names b and Atlas names k. Person contains a and b, Book contains k, and Owns contains only (a, k). Owns(Ada, Atlas) is true. ∃x (Book(x) ∧ Owns(Ben, x)) is false because Ben owns no object. ∀x (Person(x) ⇒ ∃y (Book(y) ∧ Owns(x, y))) is false because Ben is a counterexample. Yet every book has an owner: ∀x (Book(x) ⇒ ∃y Owns(y, x)) holds.

Make modeling assumptions explicit
AssumptionMeaning
Unique namesDifferent constant names denote different objects
Closed worldAn atomic fact absent from the known consequences counts as false
Domain closureEvery object is named

Standard FOL does not impose these database assumptions. Book(Atlas), Book(Beowulf), Owns(Ada, Atlas) and Owns(Ada, Beowulf) leave open whether the two names denote the same book and whether Ada owns more books. Under database semantics, they describe exactly two owned books.

To obtain that exact claim in standard semantics, keep the four facts and add ¬(Atlas = Beowulf) and ∀x ((Book(x) ∧ Owns(Ada, x)) ⇒ (x = Atlas ∨ x = Beowulf)). The inequality establishes two distinct books; the universal restriction excludes additional owned books.

First-order models can have arbitrarily large domains, so the finite enumeration method for propositional models does not provide a general decision procedure here. Proof methods work with the sentences' structure instead. A free variable needs an assignment for evaluation; bind variables when writing a closed claim for the KB.

Key Takeaways

  • Terms refer to objects; predicates form claims.
  • A model supplies a domain and interpretations of symbols.
  • ∀ checks every object; ∃ needs a witness.
  • Standard FOL does not assume unique names or a closed domain.
  • Exact counts require distinctness and an upper-bound condition.

3.2 Translate statements into first-order logic

Translation begins by deciding what the sentence claims about each object. Quantifier scope, implication direction and equality determine the meaning; predicate names alone do not fix it. Parentheses make the intended scope visible.

Use the right connective with a quantifier

"Every cat is a mammal" becomes ∀x (Cat(x) ⇒ Mammal(x)). An object outside the category passes the implication without being a cat. Writing ∀x (Cat(x) ∧ Mammal(x)) incorrectly makes everything a cat.

"Some cat is black" becomes ∃x (Cat(x) ∧ Black(x)). The witness must satisfy both properties. With ∃x (Cat(x) ⇒ Black(x)), any non-cat is already a witness, even in a world with no black cats. Universal category rules usually use implication; existential category claims usually use conjunction.

Check who can depend on whom

∀x ∃y Loves(x, y) permits a different loved person for each x. ∃y ∀x Loves(x, y) requires one person loved by everyone. In a two-person world where each loves only the other, the first holds and the second fails. Swapping quantifiers of different kinds can change a claim; swapping two adjacent universal quantifiers or two adjacent existential quantifiers preserves it.

Negation swaps quantifiers: ¬∀x P(x) ≡ ∃x ¬P(x), and ¬∃x P(x) ≡ ∀x ¬P(x). Therefore "Not every student passed" means ∃x (Student(x) ∧ ¬Passed(x)). It requires a student who failed; it does not claim that every student failed.

Express direction and number

"Only members borrow" means ∀x (Borrows(x) ⇒ Member(x)). Borrowing is enough to establish membership, while membership alone says nothing about borrowing. "No reptile is a mammal" means ∀x (Reptile(x) ⇒ ¬Mammal(x)).

To express at least two owned books, write ∃x ∃y (Book(x) ∧ Book(y) ∧ Owns(Ada, x) ∧ Owns(Ada, y) ∧ ¬(x = y)). The inequality matters: two variable names may refer to the same object. Exactly one uses a witness plus uniqueness: ∃x (Book(x) ∧ Owns(Ada, x) ∧ ∀y ((Book(y) ∧ Owns(Ada, y)) ⇒ y = x)).

Give definitions both directions

A sibling definition can be ∀x ∀y (Sibling(x, y) ⇔ (¬(x = y) ∧ ∃p (Parent(p, x) ∧ Parent(p, y)))). The forward direction constrains siblings; the reverse lets shared-parent facts establish siblinghood. A one-way implication supplies only half that meaning.

In an agent domain, diagnostic rules run from observations to possible causes, while causal rules run from causes to effects. "Every breezy square has an adjacent pit" is diagnostic. "Every pit makes every adjacent square breezy" is causal. Together they support the full breeze biconditional. Finish a translation by checking every variable's binding and testing a small world where the English claim should fail.

Key Takeaways

  • Universal category rules use implication; existential witnesses use conjunction.
  • Quantifier order controls whether witnesses can vary.
  • Negation swaps ∀ and ∃.
  • Only reverses a common mistaken implication direction.
  • Counting needs equality or inequality.
  • Definitions often need a biconditional.

3.3 Build a knowledge base for a domain

Building a useful knowledge base is a modeling task. Formal notation only helps after the relevant questions, objects and relationships have been chosen. Knowledge engineering turns those choices into axioms that can be checked against intended examples.

Build around the questions

A practical sequence is to identify the task, gather relevant knowledge, choose a vocabulary, write general axioms, add instance facts, ask queries, and debug the results. Start with concrete questions such as "Can this student enroll in this course?" That question determines what the representation must support.

For enrollment, use Student(s), Course(c), Prereq(p, c), Passed(s, c) and CanEnroll(s, c). Prereq(p, c) means that p must be passed before c; reversing its arguments would reverse the dependency. A rule is ∀s ∀c ((Student(s) ∧ Course(c) ∧ ∀p (Prereq(p, c) ⇒ Passed(s, p))) ⇒ CanEnroll(s, c)). It requires every prerequisite, not merely one.

Separate reusable rules from an instance

Suppose the facts are Student(Mia), Course(AI), Prereq(Logic, AI), Prereq(Programming, AI), Passed(Mia, Logic) and Passed(Mia, Programming). The general rule can be reused for other students and courses, while these instance facts describe one case.

Under standard FOL, these facts leave open additional prerequisites for AI. A compatible model could include an unpassed third prerequisite, so CanEnroll(Mia, AI) is not yet entailed. Add ∀p (Prereq(p, AI) ⇔ (p = Logic ∨ p = Programming)) to complete the list. Now every prerequisite is one of the two passed courses, and the enrollment rule applies. A closed-world database can obtain the same answer by treating absent prerequisite facts as false.

Choose what becomes an object

An ontology is the vocabulary and its structural assumptions. Red(x) treats red as a property. Color(x, Red) makes Red an object, allowing ∃c (Color(x, c) ∧ Color(y, c)) to express a shared color. This move is reification: it lets the language talk about a property or category as something in its own right.

ASK can request whether CanEnroll(Mia, AI) follows. ASKVARS can request bindings for CanEnroll(x, AI), returning a substitution such as {x/Mia}. The same KB supports both truth questions and queries for matching objects.

Debug meaning, not just syntax

A missing axiom can block a desired entailment; an incorrect axiom can support an unwanted one. Test positive examples, negative examples and boundary cases. The rule ∀c (Course(c) ⇒ ∃t Teaches(t, c)) is too strong if some courses have no teacher yet. The rule ∀p ∀c (Prereq(p, c) ⇒ Passed(Mia, p)) is too strong because it grants Mia every prerequisite of every course.

Predicate names are labels for the reasoner. Calling a relation Prereq supplies no enrollment policy by itself. The rules must connect prerequisite facts, passed courses and eligibility in the intended direction.

Key Takeaways

  • Choose the questions before choosing the vocabulary.
  • Keep general axioms separate from instance facts.
  • A universal requirement may need a completed list under open-world semantics.
  • ASKVARS returns satisfying substitutions.
  • Reification makes a property or category available as an object.
  • Debug both missing and overstrong axioms.
4

Draw inferences in first-order logic

Rules with variables become useful only when the reasoner can match them to particular facts. Substitution and unification provide that match, allowing chaining and resolution to work directly with first-order sentences. Follow how bindings move through a proof, how existential witnesses keep their dependencies, and how search control determines whether a logically justified answer is actually reached by an implementation.

4.1 Match sentences with substitution and unification

First-order inference works with patterns containing variables. Substitution replaces variables with terms; unification finds replacements that make two expressions identical. Together they let one general rule serve many particular facts without generating every possible instance first.

Instantiate quantified sentences carefully

Universal Instantiation replaces a universally bound variable with any ground term. From ∀x (Cat(x) ⇒ Mammal(x)), derive Cat(Tom) ⇒ Mammal(Tom), or the corresponding instance with MotherOf(Tom). A ground term contains no variable.

Existential Instantiation introduces a fresh witness name. From ∃x (Crown(x) ∧ OnHead(x, John)), introduce a new constant C₁ and add Crown(C₁) and OnHead(C₁, John). Naming Ben as the witness instead would wrongly identify an unspecified object with an existing one. The expanded KB preserves satisfiability, not equivalence in the enlarged vocabulary.

Propositionalization generates ground instances, then uses propositional reasoning. Function symbols can produce infinitely many terms: Ada, MotherOf(Ada), MotherOf(MotherOf(Ada)), and so on. Entailed first-order queries have finite proofs, but a general prover may run forever when the query is not entailed. This is semidecidability.

Find a consistent substitution

To unify Knows(Ana, x) with Knows(y, Bo), first match the predicate and arity. The first arguments require y = Ana; the second require x = Bo. The substitution {y/Ana, x/Bo} makes both expressions Knows(Ana, Bo).

Knows(Ana, x) and Knows(y, MotherOf(y)) instead give {y/Ana, x/MotherOf(Ana)}. A binding must be propagated through the other terms. If the same variable x occurs in both expressions Knows(Ana, x) and Knows(x, Bo), it would need to become both Ana and Bo, so syntactic unification fails.

Variables in separately quantified sentences are independent. Standardizing apart renames them before combining sentences. Renaming the second x to z in that last pair allows {z/Ana, x/Bo}. This preserves the intended independence of two rules' local variables.

A most general unifier (MGU) imposes no unnecessary bindings. Knows(Ana, x) and Knows(y, z) unify with {y/Ana, x/z}; also setting z to Ana would specialize the result without need. The occurs check rejects x = MotherOf(x), since a finite term cannot contain itself. Prolog's ordinary unification may allow cyclic terms, so its behavior needs care when finite-term FOL is intended.

Apply the matched rule

Generalized Modus Ponens matches every premise under one consistent substitution. Owns(Ada, Atlas) and Book(Atlas) match Owns(x, y) ∧ Book(y) ⇒ Reader(x) with {x/Ada, y/Atlas}, yielding Reader(Ada). Matching one premise with y = Atlas and another with y = Beowulf would not justify firing the rule: shared variables enforce shared objects.

Key Takeaways

  • Substitutions replace variables with terms.
  • Existential witnesses need fresh names.
  • Unification must satisfy every argument match consistently.
  • Standardize independent variables apart.
  • An MGU leaves unnecessary choices open.
  • The occurs check excludes self-containing finite terms.
  • Generalized Modus Ponens uses one substitution for all premises.

4.2 Chain forward and backward with first-order rules

A first-order definite clause has atomic premises and one atomic conclusion, with its variables universally understood. Forward and backward chaining use unification to apply these rules to named objects. Datalog keeps this rule form and excludes function symbols, giving a finite space of possible ground facts in the usual finite-database setting.

Derive reachable locations

Take Link(A, B), Link(B, C) and Link(C, D). Use Link(x, y) ⇒ Reach(x, y), and Link(x, y) ∧ Reach(y, z) ⇒ Reach(x, z). In synchronous rounds, each rule reads the facts available before that round.

Round 1 derives Reach(A, B), Reach(B, C) and Reach(C, D). Round 2 adds Reach(A, C) and Reach(B, D). Round 3 adds Reach(A, D). Round 4 adds nothing. There are six Reach facts at the fixed point. An implementation that immediately reuses new facts may find them in a different order but reaches the same closure.

With n constants and predicates of arity at most k, only finitely many tuples are possible; an upper bound is p · nᵏ for p predicates. In contrast, NatNum(0) and NatNum(n) ⇒ NatNum(S(n)) generate endlessly deeper terms. Function symbols remove the finite-domain guarantee.

Matching a multi-premise rule is a constraint problem. A selective premise can greatly reduce the substitutions considered next. Incremental forward chaining focuses on rules affected by newly added facts. Rete networks retain partial matches across updates, avoiding repeated work in production-rule systems.

Work backward with bindings

To prove Reach(A, D), try the direct-link rule, which requires the absent Link(A, D). The recursive rule instead requires Link(A, y) and Reach(y, D). The first binds y to B. Continuing through B and C reaches the known Link(C, D). The query Reach(A, w) has three answers: w = B, C or D.

Prolog writes rules with the head first and uses uppercase variables and lowercase constants:

reach(X, Y) :- link(X, Y).
reach(X, Z) :- link(X, Y), reach(Y, Z).

It tries clauses top to bottom and premises left to right using depth-first backward chaining. Arithmetic can use N is M + 1. Negation as failure, written \+ p, succeeds if the attempt to prove p finitely fails. It is an operational test of failure, not a general proof of classical negation.

Keep recursion from trapping the search

Putting reach(X, Y) first in the recursive body can immediately call the same unresolved goal again. Base clauses first and recursion that consumes a link help, but cycles can still trap unsuccessful searches. Tabling records subgoal answers and manages repeated dependencies. Forward chaining is complete for finite Datalog; naive depth-first backward search needs this kind of control to avoid missing reachable answers behind infinite branches.

Key Takeaways

  • First-order chaining matches rules using substitutions.
  • Datalog excludes function symbols and has finitely many ground facts.
  • Forward chaining reaches a fixed point.
  • Prolog uses ordered depth-first backward chaining.
  • Negation as failure requires finite failure.
  • Tabling manages repeated subgoals and their answers.

4.3 Prove first-order queries by resolution

First-order resolution extends clause reasoning with unification. It can prove conclusions involving unnamed objects because Skolem terms preserve the dependencies of existential witnesses. As in propositional refutation, begin with the KB and the negation of the query.

Prepare first-order clauses

Eliminate ⇔ and ⇒, move negations inward, standardize bound variables, Skolemize existentials, drop universal quantifiers, then distribute ∨ over ∧. Moving negation first matters because ¬∀x P(x) becomes ∃x ¬P(x), changing the kind of witness required.

For "Every course has a teacher," ∀c (Course(c) ⇒ ∃t Teaches(t, c)), the existential teacher can depend on c. Introduce a fresh function T(c) to obtain ¬Course(c) ∨ Teaches(T(c), c). A single constant would impose one shared teacher, which the original sentence never requires. For ∃t ∀c (Course(c) ⇒ Teaches(t, c)), a fresh constant is appropriate because the witness precedes the universal quantifier.

"Not every bird flies" becomes ∃x (Bird(x) ∧ ¬Flies(x)), then Bird(B₁) and ¬Flies(B₁). Both clauses use the same fresh witness. Skolemization preserves satisfiability; it is not ordinary equivalence over the extended vocabulary.

Apply a unifier to the whole resolvent

Standardize the two clauses apart. Find complementary literals that unify, remove them and apply their MGU to every remaining literal. Factoring also merges unifiable literals within a clause. Resolution with factoring is refutation-complete for first-order clauses.

Take ¬Course(c) ∨ Teaches(T(c), c), ¬Teaches(u, v) ∨ Staff(u), and Course(Logic). The query is ∃w Staff(w); its negation gives ¬Staff(w), universally quantified. Resolve the course fact with the first clause to obtain Teaches(T(Logic), Logic). Resolve with the second under {u/T(Logic), v/Logic}, giving Staff(T(Logic)). Resolve with ¬Staff(w) under {w/T(Logic)} to reach the empty clause. A staff member exists even though the KB never gives that person an ordinary name.

Control the clause search

Unit preference chooses short clauses first. Set of support requires a parent from the negated query or its descendants and preserves completeness when the remaining KB is satisfiable. Input resolution requires an original parent at every step and is complete for Horn KBs. Subsumption removes a weaker clause already covered by a stronger general one, such as deleting P(Ana) ∨ Q(Bo) when P(x) is known.

Equality needs dedicated treatment: equality axioms, rewriting by equations through demodulation, or inferences such as paramodulation. Pure syntactic resolution alone does not capture every meaning of equality. A fair complete search finds a contradiction for every unsatisfiable first-order clause set, but can run forever otherwise. Resolution-based provers include Vampire and E; EQP proved the Robbins conjecture in 1996.

Key Takeaways

  • Negate the query before conversion.
  • Move negation inward before choosing Skolem witnesses.
  • A Skolem function records dependence on universal variables.
  • Apply the unifier to every remaining literal.
  • Resolution with factoring is refutation-complete.
  • Equality and search control need explicit treatment.
5

Organize knowledge in ontologies and knowledge graphs

Large collections of facts need a shared structure. Categories and ontologies organize what kinds of things exist and how they relate, while knowledge graphs record particular entities and links. Reasoning can extend those links, queries can retrieve matching objects, and statistical models can suggest additions. These operations answer different questions, so their results need different interpretations when a graph is incomplete.

5.1 Structure knowledge with categories and ontologies

An ontology organizes a domain's categories, objects, relations and assumptions. An upper ontology supplies broad ideas such as objects, events and time; a domain ontology supplies the distinctions useful in a particular field. Clinical and biological ontologies illustrate why a useful shared vocabulary often serves a specific community.

Keep membership and subclass separate

A category can appear as a predicate, Laptop(x), or as an object, Laptops. Membership x ∈ Laptops says an individual belongs to it. Laptops ⊂ Computers says every laptop is a computer. A taxonomy arranges such subclass relationships in a hierarchy. If every computer has a processor, laptops inherit that property.

Subclass is transitive: Penguins ⊂ Birds and Birds ⊂ Animals give Penguins ⊂ Animals. Membership is not transitive. Pingu ∈ Penguins and Penguins ∈ Species do not make Pingu a species. One statement concerns an individual bird; the other concerns a category treated as an object.

Categories are disjoint when they share no members. An exhaustive decomposition covers every member of the parent. A partition does both: negative integers, zero and positive integers partition the integers. Exhaustiveness permits overlap unless disjointness is also stated.

Represent parts, events and inherited values

PartOf describes composition, not category membership. PartOf is transitive: a spoke belonging to a wheel that belongs to a bicycle is part of the bicycle. A bicycle is not thereby a kind of wheel. Events can be objects too: Happens(e, t), Initiates(e, f, t) and HoldsAt(f, t) connect events to changing fluents. Switching on a lamp initiates a fluent that persists until an event terminates it.

A semantic network draws objects and categories as nodes with labeled relations. In a network with defaults, "birds normally fly" can supply a value inherited by ordinary birds, while a more specific penguin category overrides it. This is different from asserting the exceptionless classical axiom ∀x (Bird(x) ⇒ Flies(x)), which would also apply to penguins.

Choose the reasoning language
ApproachMain strengthImportant constraint
Semantic networkReadable relation and inheritance pathsA simple network lacks arbitrary FOL negation and disjunction
Description logicCategory definitions and decidable reasoningExpressiveness is deliberately restricted
Default reasoningTypical rules with exceptionsConclusions can be withdrawn

Description logics support subsumption, classification and consistency checks. A definition can classify a person with at least three children into an appropriate category. These logics form the basis of OWL's description-logic languages.

Default reasoning is nonmonotonic: learning a bird is a penguin can retract a flying default. Circumscription minimizes abnormal cases in rules such as Bird(x) ∧ ¬Abnormal(x) ⇒ Flies(x). Default logic permits conclusions while they remain consistent with the knowledge. Truth maintenance systems record support so that conclusions depending on a withdrawn belief can be removed.

Key Takeaways

  • An ontology gives a formal vocabulary and assumptions.
  • Membership differs from subclass; only subclass is transitive in the category hierarchy.
  • A partition is both disjoint and exhaustive.
  • PartOf and subclass describe different relationships.
  • Description logics trade expressiveness for decidable reasoning.
  • Default conclusions can be withdrawn when exceptions appear.

5.2 Explain how knowledge graphs store and use facts

A knowledge graph stores entities and their relationships as a directed graph. A simple edge becomes a triple: subject, predicate, object. For example, (Ada, worksAt, Lab) corresponds to WorksAt(Ada, Lab); (Ada, type, Researcher) states category membership. A schema gives these labels shared meaning and enables further inference.

Distinguish the web standards

RDF represents graphs as triples. Subjects are IRIs or blank nodes, predicates are IRIs, and objects may also be literal values. IRIs identify resources across datasets; a blank node represents a resource without giving it a global identifier. RDFS adds classes, subclass relations, and property domain and range. OWL provides richer ontology definitions. SPARQL matches graph patterns to return variable bindings. Property graphs offer another model with key–value properties on nodes and edges; Cypher and GQL are query languages for that family.

If Ada is typed Researcher and Researcher is a subclass of Scientist, a subclass rule derives that Ada is a Scientist. This is first-order forward chaining over Member(x, c) ∧ Subset(c, d) ⇒ Member(x, d). A graph query engine needs the relevant entailment support or materialized conclusions to expose this inferred fact.

Match a query and preserve detail

With ex: declared as an IRI prefix, a query can be:

SELECT ?p WHERE {
  ?p a ex:Researcher .
  ?p ex:worksAt ex:Lab .
}

The same ?p must satisfy both patterns. It is a join, not two unrelated searches. Results are bindings such as ?p = ex:Ada, like substitutions in logical queries.

A binary edge cannot by itself express every role in a dated event. For an award, create an event or statement node and connect it to the recipient, prize and year. This keeps one award's details together and avoids accidentally attaching the date to every award of that type. Wikidata supports statement qualifiers for such detail.

Separate absent, inferred and predicted links

RDF and OWL use an open-world reading: a missing spouse edge leaves the relationship unknown. Closed-world applications make a different choice about missing facts. A query's empty result reports lack of a match under that query setup; it does not by itself establish a universal negative fact.

Wikidata, DBpedia, Google's Knowledge Graph and internal organizational graphs support factual queries, record linking, recommendations and retrieval for generative systems. Their facts can be incomplete or outdated. Entity resolution identifies records referring to the same thing even when identifiers differ.

Embeddings assign vectors to entities and relations. In TransE, the head vector plus the relation vector is trained to be close to the tail vector. A high score suggests a missing link; it is a statistical prediction. Logical inference derives a consequence from stated facts and rules. Keep this difference visible when deciding whether a new edge belongs among verified facts.

Key Takeaways

  • A triple records a directed subject–predicate–object relation.
  • RDF, RDFS, OWL and SPARQL serve different roles.
  • Shared query variables join patterns.
  • Event nodes keep multi-part facts together.
  • A missing edge is unknown under open-world semantics.
  • Predicted links need checking; they are not logical entailments.
  • Entity resolution connects different identifiers for the same thing.
6

Formulate and solve classical planning problems

A planning problem connects logical descriptions to action. Represent the current state, the conditions each action needs, and the facts it changes; then search for a sequence reaching the goal. Action structure supports backward reasoning and useful heuristics, but subgoals can interfere. Comparing state search, SAT encodings and task refinement shows how planners manage that difficulty and where classical assumptions need extensions.

6.1 Describe a planning problem in PDDL

Classical planning seeks actions that take a known initial state to a goal. The model is fully observable, deterministic, discrete and single-agent; the world changes through the modeled actions. A factored representation describes each state through fluents, so a planner can reason about what each action changes.

Write the state and action schemas

In the basic STRIPS-style fragment of PDDL, a state lists true ground atomic fluents. Unlisted fluents are false under the closed-world assumption. The reusable domain declares predicates and action schemas; the problem declares objects, the initial state and a goal. PDDL was introduced for the 1998 planning competition, building on STRIPS.

An action schema has parameters, a precondition and effects. Go(r, from, to) requires At(r, from) and Connected(from, to); it adds At(r, to) and deletes At(r, from). Pick(r, p, l) requires At(r, l), In(p, l) and HandEmpty(r); it adds Holding(r, p) and deletes In(p, l) and HandEmpty(r). Drop requires location and holding; it adds the package's location and an empty hand, and deletes holding.

A ground action applies only when its preconditions hold. Its update is RESULT(s, a) = (s − DEL(a)) ∪ ADD(a). Other fluents persist, including static Connected facts. This implicit persistence handles the frame problem without a separate axiom for every unaffected fluent.

Follow a four-action delivery

Initially R is at Dock, Box is at Shelf and R's hand is empty. Connected links join Dock to Shelf and Shelf to Packing in both directions. The goal is In(Box, Packing).

  1. Go(R, Dock, Shelf) changes R's location and preserves the box and hand facts.
  2. Pick(R, Box, Shelf) removes the box from the shelf and makes R hold it.
  3. Go(R, Shelf, Packing) moves R while preserving Holding(R, Box).
  4. Drop(R, Box, Packing) places the box at Packing and frees the hand.

The goal leaves the robot's final location unspecified except where the actions require it. Goals generally describe many acceptable states, not one complete state.

Read and check a schema
(:action pick
 :parameters (?r ?p ?l)
 :precondition (and (at ?r ?l) (in ?p ?l) (hand-empty ?r))
 :effect (and (holding ?r ?p)
              (not (in ?p ?l)) (not (hand-empty ?r))))

Omitting a delete effect can leave a robot in two places or a package both held and on a shelf. Putting a required condition only in an effect makes the action create it instead of checking it.

In blocks world, moving a clear block b from x onto a clear block y requires On(b, x), Clear(b), Clear(y), Block(b), Block(y) and ¬(b = y). It adds On(b, y) and Clear(x), and deletes On(b, x) and Clear(y). The distinctness and block checks prevent self-stacking and treating the table like a single block. A separate MoveToTable action keeps the table available for other blocks.

Key Takeaways

  • States contain true ground fluents; missing fluents are false.
  • An action must satisfy its preconditions before execution.
  • Delete effects remove facts and add effects insert facts.
  • Unmentioned facts persist.
  • A domain is reusable; a problem supplies objects, initial facts and goals.
  • Model checks prevent impossible ground actions.

6.2 Search for plans with domain-independent heuristics

A planning model defines a search space, but choosing useful actions is still difficult. Progression searches forward through complete states. Regression searches backward through the conditions that a preceding state must satisfy. Both can reuse general search methods while exploiting action structure.

Search from either end

Progression starts at the initial state and applies applicable ground actions. It can waste effort on irrelevant actions: one robot, 20 boxes and 10 locations already give 200 possible ground Pick combinations before applicability filtering.

Regression considers an action that achieves a goal literal without negating another goal literal. Regress a goal set g through a by removing achieved literals and adding preconditions: g′ = (g − EFFECT(a)) ∪ PRECOND(a). EFFECT includes signed positive and negative literals. Reject an inconsistent result containing a literal and its negation.

For In(Box, Packing) ∧ At(R, Dock), regressing through Drop(R, Box, Packing) gives Holding(R, Box) ∧ At(R, Packing) ∧ At(R, Dock). These conditions conflict with the intended single-location invariant. A valid plan must deliver the box before the robot's final return. Regressing through Go(R, Shelf, Dock) instead gives In(Box, Packing) ∧ At(R, Shelf) ∧ Connected(Shelf, Dock), which preserves the delivered package.

Estimate distance using simpler problems

A heuristic is admissible when it never overestimates the remaining optimal cost. A* with an admissible heuristic finds an optimal plan. Counting unsatisfied goals is not always admissible: a single action might achieve several.

Ignoring preconditions makes all actions immediately usable. Ignoring delete effects makes progress permanent, for problems expressed with positive preconditions and goals. Negative conditions must first be compiled into explicitly maintained positive fluents. The optimal relaxed-plan length h⁺ is a lower bound on real plan length, but computing it is NP-hard. FF finds a relaxed plan quickly without guaranteeing its optimality; its length can overestimate h⁺ and is not guaranteed admissible.

For the warehouse delivery plus return goal, the real shortest plan has six actions: go to Shelf, pick, go to Packing, drop, return to Shelf, return to Dock. Delete relaxation needs only the first four because At(R, Dock) remains true after departure. Thus h⁺ = 4 while the real cost is 6. The unsatisfied-goal count starts at only 1 and misses most of that work.

Combine estimates without double counting

A planning graph alternates possible fluent and action levels, with mutex links marking incompatible pairs. A goal's first appearance gives a level estimate. Taking the maximum of individual goal levels is admissible; adding them can count shared work repeatedly. State abstraction removes some fluents to reduce the state space. Subgoal decomposition also benefits from checking shared actions: the maximum of admissible subgoal costs is safe, while their sum needs extra justification.

Key Takeaways

  • Progression searches complete states; regression searches goal conditions.
  • Regression requires achievement without conflicting goal effects.
  • Relaxations remove constraints to estimate remaining work.
  • Optimal delete-relaxed cost h⁺ is admissible but hard to compute.
  • FF relaxed-plan length is not guaranteed admissible.
  • Adding subgoal costs can double-count shared work.

6.3 Compare planning approaches and their limits

Planning methods differ in what they search over: states, truth assignments, ordering constraints or refinements of expert procedures. Their usefulness depends on subgoal interaction and the assumptions the model makes about execution.

Recognize interacting subgoals

In the Sussman anomaly, C is on A, with A and B on the table. The goal is On(A, B) ∧ On(B, C). Completing the A-on-B subgoal first blocks the later placement of B. Placing B onto C immediately leaves A buried. A shortest plan frees A first, then builds the stack from the bottom: move C to the table, move B onto C, then move A onto B. The three moves interleave preparation and goal achievement.

Encode a bounded plan as SAT

SATPlan chooses a horizon T. It asserts initial fluents at time 0, goal fluents at T, action preconditions, successor-state constraints and exclusions for incompatible actions. A satisfying assignment selects actions forming a plan. An unsatisfiable result excludes plans within that encoding and horizon.

Trying horizons in order finds the smallest satisfiable horizon. With parallel actions this minimizes layers, not necessarily the total number of actions. A stopping bound is needed to turn repeated unsatisfiable horizons into a conclusion that no plan exists.

Keep only the necessary order

Partial-order planning records actions, order constraints and causal links. A link A —p→ B says A establishes precondition p for B. An action C that could delete p between them is a threat. Demotion orders C before A; promotion orders it after B. Unrelated actions can remain unordered until execution, following least commitment.

HTN planning refines high-level tasks through a library of methods. DeliverBox can become travel to the box, pick it up, travel to the destination and drop it. These methods encode expert procedures, so the search can focus on useful refinements instead of considering every primitive action at every point.

MethodMain search object
State-space planningStates and applicable actions
SATPlanTime-indexed satisfying assignments
Partial-order planningActions, causal links and ordering constraints
HTN planningTask decompositions using supplied methods
Match the model to the world

Plan existence for general propositional STRIPS is PSPACE-complete. Blocks world has an easier existence problem for possible arrangements: clear the blocks to the table and rebuild, using at most 2n moves for n blocks. Finding a shortest blocks-world plan is still NP-hard.

Classical models leave out uncertain outcomes, hidden state and action durations. Conformant plans work without observations, contingent plans branch on observations, online replanning responds to execution differences, and scheduling handles times and resources. A missing battery precondition can make a model-valid plan fail physically. Execution monitoring checks this gap. Automated planning has reached real systems, including NASA's Remote Agent on Deep Space 1 in 1999.

Key Takeaways

  • Subgoal interactions may require interleaving actions.
  • SATPlan tests one horizon at a time.
  • A minimum parallel horizon need not minimize action count.
  • Causal-link threats are resolved by promotion or demotion.
  • HTN methods encode expert task refinements.
  • General STRIPS plan existence is PSPACE-complete.
  • Execution monitoring checks whether the world follows the model.

Logical Agents and Planning examples

6 Walkthroughs

1

From a percept to a justified move

12 steps
Build an agent’s knowledge, encode its rules and check what every compatible model supports.
  1. 1
    IntroductionReason before entering

    A cave agent can learn about a square without entering it. Its observations constrain possible layouts, and its background rules connect those observations to hazards.

    Follow one chain from a recorded percept to a propositional sentence and then to an entailment. The important question is whether every compatible layout supports the proposed conclusion.

  2. 2
    ExplanationRecord, reason and act

    The knowledge base stores formal sentences. TELL adds information; ASK requests an answer already stored or derived by inference.

    At a time step, the agent records its percept, asks what to do, records its chosen action and executes it. That action record helps later reasoning distinguish what was true before movement from what should be true afterward.

  3. 3
    ExampleUse a missing breeze

    The agent starts at [1, 1] and senses no Breeze. The breeze rule says a square is breezy exactly when a directly adjacent square contains a pit.

    The only neighbors of the start are [1, 2] and [2, 1]. If either had a pit, the start would be breezy. The observation therefore excludes a pit from both neighbors, without requiring the agent to visit them.

  4. 4
    ChallengeIs no pit enough?

    The agent has ruled out a pit in [1, 2], but it has no stench information. Can it already call the square fully safe?

    ---reveal---

    No. Full safety also requires excluding the wumpus. A proof about pits supplies no wumpus information by itself. No Stench at [1, 1], together with the stench rule, would supply the missing exclusion for its neighbors.

  5. 5
    ExplanationGive the rule both directions

    Write B₁₁ ⇔ (P₁₂ ∨ P₂₁). Here B₁₁ means breeze at the start, and each P names a pit square. The biconditional says both that a breeze needs a neighboring pit and that a neighboring pit produces a breeze.

    Its reverse direction is what makes no breeze useful for excluding pits. A one-way observation-to-cause rule would lose that inference.

  6. 6
    ExampleEvaluate an implication

    For B₁₁ ⇒ (P₁₂ ∨ P₂₁), suppose B₁₁ is false and both pit symbols are true. The implication is true because its premise is false.

    That assignment shows why this one-way rule permits pits without a breeze. Adding the reverse implication excludes it. Logical truth follows the connective’s table, even when a sentence is an incomplete physical model.

  7. 7
    ChallengeChoose the time update

    An agent has one arrow, and nothing supplies another. What next-step condition exactly captures keeping the arrow?

    ---reveal---

    HaveArrowᵗ⁺¹ ⇔ (HaveArrowᵗ ∧ ¬Shootᵗ). The arrow persists if it was present and shooting does not remove it. Starting without the arrow leaves it absent. This successor-state axiom covers persistence as well as change.

  8. 8
    ExplanationRetain only compatible worlds

    Entailment means that a query is true in every model satisfying the KB. To test it directly, list assignments, discard those violating the KB and inspect the query in each survivor.

    A single survivor with the query false is a countermodel. If both true-query and false-query survivors remain, the query is unknown from this KB.

  9. 9
    ExampleInspect three layouts

    No Breeze at the start excludes P₁₂ and P₂₁. A Breeze at [2, 1], together with no pit at the start, requires P₂₂ ∨ P₃₁.

    There are three compatible choices for those last two pit symbols: true/false, false/true and true/true. Thus ¬P₁₂ is true throughout, but P₂₂ varies. The KB entails the first claim and leaves the second unknown.

  10. 10
    ChallengeFind the countermodel

    For KB = {A ∨ B}, does A follow? Give a compatible assignment that decides the question.

    ---reveal---

    No. A false and B true satisfies the KB while falsifying A, so it is a countermodel. The reverse assignment also satisfies the KB. A is therefore unknown, not ruled out: the KB entails neither A nor ¬A.

  11. 11
    ConnectionTurn the move query into SAT

    To test a proposed safety conclusion α, ask whether KB ∧ ¬α is satisfiable. A model describes a compatible world where the conclusion fails; unsatisfiability establishes entailment.

    This connects the agent’s decision to a solver’s formal result. A missing safety proof leaves a risk unresolved; it does not turn the unvisited square into a proved hazard.

  12. 12
    RecapKeep the three outcomes distinct

    TELL records the evidence, and the encoding decides what it means. Inference then separates a supported conclusion, a supported negation and an unknown claim.

    Before acting, check that the encoded rule includes the directions needed for the inference and that the conclusion excludes every relevant hazard. A countermodel pinpoints exactly why a proposed conclusion fails.

2

Prove a query and interpret solver results

16 steps
Work through proof rules, resolution, chaining and SAT search without confusing their guarantees.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionOne query, several methods
  2. 2
    ExampleExtract a premise
  3. 3
    ChallengeCheck a tempting reversal
  4. 4
    ExplanationPrepare the clause form
  5. 5
    ExampleNegate the release query
  6. 6
    ExampleClose the refutation
  7. 7
    ChallengeCan two pairs disappear?
  8. 8
    ExplanationExploit a single rule head
  9. 9
    ExampleTrace the relevant chain
  10. 10
    ChallengeHandle a cycle carefully
  11. 11
    ExplanationPropagate forced assignments
  12. 12
    ExampleExplore both branches
  13. 13
    Key InsightLearn versus repair
  14. 14
    ChallengeRead a local-search timeout
  15. 15
    ChallengeConnect rules to a solver result
  16. 16
    RecapKnow what each result earns
3

Make a quantified rule say what you mean

12 steps
Choose terms, scope and domain axioms, then debug a small knowledge base.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFrom individual facts to general rules
  2. 2
    ExplanationIdentify each symbol’s job
  3. 3
    ExampleEvaluate a small world
  4. 4
    ChallengeDo two names mean two books?
  5. 5
    ExplanationPair the quantifier and connective
  6. 6
    ExampleMove the shared witness
  7. 7
    ChallengeNegate the universal correctly
  8. 8
    ExplanationStart from the intended query
  9. 9
    ExampleComplete the prerequisite relation
  10. 10
    ChallengeFind the missing policy
  11. 11
    ChallengeCombine scope and completeness
  12. 12
    RecapCheck meaning in a small model
4

Follow bindings through a first-order proof

15 steps
Unify rule patterns, run recursive queries and preserve existential dependencies in resolution.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionLet the rule find its objects
  2. 2
    ExampleMatch the first premise
  3. 3
    Key InsightLeave unnecessary choices open
  4. 4
    ChallengeCheck all argument constraints
  5. 5
    TipUse a fresh existential witness
  6. 6
    ExampleBuild paths in rounds
  7. 7
    ExplanationRead the query as a search
  8. 8
    ChallengeTest a self-repeating call
  9. 9
    ConnectionKnow where finiteness comes from
  10. 10
    ExplanationKeep a witness’s dependence
  11. 11
    ExampleAdd the negated staff query
  12. 12
    ExampleApply the binding to the result
  13. 13
    ChallengeNegation changes the witness
  14. 14
    ChallengeDistinguish proof from termination
  15. 15
    RecapCarry one meaning through every step
5

Follow a fact through an ontology and graph

11 steps
Separate membership, inheritance, query matches, defaults and predictions.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionSeveral kinds of graph claim
  2. 2
    ExplanationSeparate category and individual
  3. 3
    ExampleAdd an exception without contradiction
  4. 4
    ChallengeCheck whether a division is a partition
  5. 5
    ConnectionChoose a category reasoner
  6. 6
    ExampleTurn the relation into triples
  7. 7
    ExampleJoin two patterns
  8. 8
    ChallengeRead a missing relationship
  9. 9
    Key InsightKeep a prediction’s status visible
  10. 10
    ChallengeTrace the support for a new type
  11. 11
    RecapAsk what justifies the edge
6

Build, check and search a delivery plan

16 steps
Update states, regress goals, compare relaxed costs and handle interacting actions.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMake action consequences explicit
  2. 2
    ExplanationRead the initial state
  3. 3
    ExampleTravel and pick up
  4. 4
    ExampleTravel while holding and drop
  5. 5
    ChallengeFind the missing delete effect
  6. 6
    ExplanationSearch through states or conditions
  7. 7
    ExampleWork backward from delivery
  8. 8
    ChallengeAdd the return goal
  9. 9
    ExampleRemove deletions for an estimate
  10. 10
    ChallengeCan goal counting overestimate?
  11. 11
    ExampleInterleave blocks-world goals
  12. 12
    ExplanationEncode a time horizon
  13. 13
    ChallengeProtect a delivery condition
  14. 14
    ConnectionUse methods and monitor execution
  15. 15
    ChallengeChoose an extension for observation
  16. 16
    RecapCheck the plan against its objective

Logical Agents and Planning practice questions

50 Practice Questions in 5 sets

Set 1: Quantifiers, bindings and first-order proofs10 Practice Questions

Question 1 of 10

In Owns(Lea, Notebook), what kind of expression is Notebook?
  1. A unary predicate
  2. A constant term
  3. A bound variable
  4. An atomic sentence
Show answerHide answer
Answer: B
Notebook names an object and is therefore a constant term. Owns(Lea, Notebook) is the atomic sentence with a truth value. Confusing the named object with a predicate would treat an argument as a property and change the syntactic role it has here.

Question 2 of 10

How do you express "Only certified workers operate the machine"?
  1. ∀x (Certified(x) ⇒ Operates(x))
  2. ∃x (Certified(x) ∧ Operates(x))
  3. ∀x (Certified(x) ∧ Operates(x))
  4. ∀x (Operates(x) ⇒ Certified(x))
Show answerHide answer
Answer: D
Operating the machine is enough to require certification, so the implication points from Operates to Certified. The reverse direction would make every certified worker operate it, which the sentence never asserts. The universal rule also does not require any operator to exist.

Question 3 of 10

A domain contains only Ivo and Noor. Each helps the other, and neither helps themself. What are the truth values of ∀x ∃y Helps(x, y) and ∃y ∀x Helps(x, y), respectively?
  1. True, false
  2. True, true
  3. False, true
  4. False, false
Show answerHide answer
Answer: A
Each person has someone they help, so the first sentence is true. There is no single person helped by both: each candidate fails because they do not help themself. Thus the second is false; allowing the witness to vary with x is the key difference.

Question 4 of 10

A rule allows registration after every prerequisite is passed. The KB lists two prerequisites for Robotics and says Ken passed both. Under standard FOL, why can registration still be unproved?
  1. The two course names must co-refer.
  2. Universal rules cover only named students.
  3. An additional prerequisite may exist.
  4. Facts cannot occur in quantified rules.
Show answerHide answer
Answer: C
Standard FOL leaves room for additional prerequisites beyond the two listed facts. A compatible model can include an unpassed third course, blocking the universal condition. Different course names possibly co-referring does not by itself create that missing requirement or invalidate the listed passes.

Question 5 of 10

Why does finite-term unification reject x with ParentOf(x)?
  1. The terms have different truth values.
  2. The replacement contains x itself.
  3. A variable cannot match a function term.
  4. Function names must match constant names.
Show answerHide answer
Answer: B
The occurs check detects that x would appear inside its own replacement, requiring an endless finite-term expansion. Variables can normally match function terms, so rejecting every variable–function match would be too strong. It is the self-reference in this match that causes failure.

Question 6 of 10

What is an MGU of Reads(Nia, x) and Reads(y, Guide)?
  1. {y/Nia, x/Guide}
  2. {y/Guide, x/Nia}
  3. {y/Nia, x/Nia}
  4. {y/Guide, x/Guide}
Show answerHide answer
Answer: A
The first arguments require y to become Nia, and the second require x to become Guide. This substitution makes both expressions Reads(Nia, Guide). Swapping the bindings fails to match the corresponding argument positions even though it uses the same two names.

Question 7 of 10

A network has Edge(U, V), Edge(V, W), Edge(W, X) and Edge(X, Y). Rules are Edge(a, b) ⇒ Path(a, b) and Edge(a, b) ∧ Path(b, c) ⇒ Path(a, c). How many distinct Path facts are in its closure?
  1. 6
  2. 9
  3. 16
  4. 10
Show answerHide answer
Answer: D
There are four direct paths, three spanning two edges, two spanning three edges and one spanning four edges: 10 in total. Counting nine misses Path(U, Y), which needs the full chain. The rules derive directed paths only; they do not create reverse paths or self-paths in this acyclic network.

Question 8 of 10

How should ∀p (Project(p) ⇒ ∃r Reviews(r, p)) be Skolemized?
  1. ¬Project(p) ∨ Reviews(K, p)
  2. Project(p) ∧ Reviews(F(p), p)
  3. ¬Project(p) ∨ Reviews(F(p), p)
  4. ¬Project(p) ∨ Reviews(p, p)
Show answerHide answer
Answer: C
The reviewer’s witness is chosen inside the universal scope of p, so it may depend on the project. A fresh function F(p) preserves that dependence after implication elimination. A single constant K would impose one reviewer for every project, which is a stronger requirement.

Question 9 of 10

The KB contains ∀x (Device(x) ⇒ ∃y (Part(y, x) ∧ Metal(y))), ∀a ∀b (Part(a, b) ⇒ Component(a)), and Device(D7). What follows about metal components?
  1. At least one metal component exists.
  2. Every component is metal.
  3. D7 must itself be a metal component.
  4. One component belongs to every device.
Show answerHide answer
Answer: A
Device(D7) supplies a witness F(D7) that is both Metal and Part of D7. The second rule makes that same witness a Component, proving ∃z (Metal(z) ∧ Component(z)). The rules concern parts of devices; they do not assert that every component anywhere is metal.

Question 10 of 10

Facts are Assigned(Elin, Task1), Assigned(Omar, Task2), Needs(Task1, KitA) and Needs(Task2, KitB). Rule: Assigned(p, t) ∧ Needs(t, k) ⇒ Uses(p, k). What Uses fact follows for Elin?
  1. Uses(Elin, KitB)
  2. Uses(Omar, KitA)
  3. Uses(Elin, Task1)
  4. Uses(Elin, KitA)
Show answerHide answer
Answer: D
Matching Assigned for Elin binds t to Task1, so Needs must use that same task binding and supplies k = KitA. Applying the full substitution yields Uses(Elin, KitA). Combining Elin’s assignment with Task2’s requirement would break the shared-variable constraint.
Set 2: From observations to justified conclusions10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A robot has just sensed that a passage is blocked. What KB operation records this percept?
  1. ASK
  2. Resolve
  3. TELL
  4. Unify
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

What is the truth value of P ⇒ Q when P and Q are both false?
  1. True
  2. False
  3. Unknown
  4. Inconsistent
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A KB contains U ∨ V and ¬V. What does it entail about U?
  1. U is false.
  2. U remains unknown.
  3. The KB has no model.
  4. U is true.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

From Tested and Tested ⇒ Approved, what conclusion does Modus Ponens license?
  1. ¬Approved
  2. Approved
  3. Approved ⇒ Tested
  4. ¬Tested
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A sensor rule is Alarm ⇔ (Heat ∨ Smoke). The KB records ¬Alarm. What follows about Heat and Smoke?
  1. Both are false.
  2. Smoke is unknown.
  3. Heat is unknown.
  4. Just one is false.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

What CNF represents (M ∨ N) ⇒ R?
  1. (¬M ∨ ¬N ∨ R)
  2. (M ∨ R) ∧ (N ∨ R)
  3. (¬M ∨ R) ∧ (¬N ∨ R)
  4. (¬R ∨ M) ∧ (¬R ∨ N)
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Facts are Input and Valid. Rules are Input ⇒ Parsed, Parsed ∧ Valid ⇒ Stored, and Stored ⇒ Logged. What new facts are present at the forward-chaining fixed point?
  1. Parsed and Stored only
  2. Parsed, Stored and Logged
  3. Stored and Logged only
  4. Parsed and Logged only
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Under X = true, what does unit propagation infer from ¬X ∨ Y and ¬Y ∨ Z?
  1. Y = false and Z = true
  2. Y = true and Z = false
  3. Y = false and Z = false
  4. Y = true and Z = true
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A KB has (¬L ∨ M), (¬M ∨ N), and L. A complete SAT solver is asked whether the KB entails N. What must its refutation test return?
  1. Satisfiable for KB ∧ ¬N
  2. Unsatisfiable for KB ∧ N
  3. Unsatisfiable for KB ∧ ¬N
  4. Satisfiable for KB ∧ ¬L
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A KB contains J ∨ K, J ⇒ H, K ⇒ H and H ⇒ T. What happens when resolution tests whether T follows?
  1. Negating T leads to the empty clause.
  2. Negating T leaves one model with J true.
  3. Negating T leaves one model with K true.
  4. Negating T leaves both J and K unknown.
Show answerHide answer

Save this lesson to see this answer.

Set 3: Organizing facts and changing states10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What makes a decomposition of a category a partition?
  1. It is disjoint but may omit members.
  2. It is exhaustive but may overlap.
  3. It is transitive and nonempty.
  4. It is disjoint and exhaustive.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

An RDF graph has no relationship about a device’s manufacturer. Under open-world semantics, what is the status of the manufacturer claim?
  1. False in every model
  2. Unknown from the graph
  3. True for an unnamed maker
  4. Inconsistent with the graph
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

An action has a precondition Charged(R). What must be true when the action is applied?
  1. Charged(R) holds before the action.
  2. Charged(R) is added by the action.
  3. Charged(R) is deleted by the action.
  4. Charged(R) holds only after the action.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

The KB says Scout ∈ Rovers, Rovers ⊂ Robots and Rovers ∈ ProductFamilies. What follows about Scout?
  1. Scout ∈ ProductFamilies
  2. Scout ⊂ Robots
  3. Scout ∈ Robots
  4. Scout ⊂ ProductFamilies
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A graph contains (Uma, type, Engineer), (Uma, worksAt, EastLab), (Vik, type, Engineer) and (Vik, worksAt, WestLab). What binding matches both (?p, type, Engineer) and (?p, worksAt, WestLab)?
  1. ?p = Uma
  2. ?p = Engineer
  3. ?p = WestLab
  4. ?p = Vik
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

State s contains At(Bot, Gate), At(Crate, Store) and Charged(Bot). A move deletes At(Bot, Gate) and adds At(Bot, Store). What state results?
  1. At(Bot, Gate), At(Bot, Store), At(Crate, Store), Charged(Bot)
  2. At(Bot, Store), At(Crate, Store), Charged(Bot)
  3. At(Bot, Store), At(Crate, Store), ¬Charged(Bot)
  4. At(Bot, Gate), At(Crate, Store), Charged(Bot)
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

The goal is Packed ∧ Labeled. Action Seal requires Filled and adds Packed without other effects. What is the regression of the goal through Seal?
  1. Packed ∧ Filled
  2. Filled only
  3. Filled ∧ Labeled
  4. Packed ∧ Labeled ∧ Filled
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A causal link runs from Load to Deliver through Loaded. Unload could delete Loaded between them. What ordering protects the link by promotion?
  1. Deliver before Unload
  2. Unload before Load
  3. Load before Unload before Deliver
  4. Unload simultaneous with Deliver
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Initially P holds and Q, R and S do not. A has precondition P, adds Q and deletes P. B has precondition Q and adds R. C has precondition P ∧ R and adds S. No action restores P. What are the real and delete-relaxed possibilities for S?
  1. Real: reachable in 3; relaxed: reachable in 3.
  2. Real: unreachable; relaxed: reachable in 3 actions.
  3. Real: unreachable; relaxed: unreachable.
  4. Real: reachable in 2; relaxed: reachable in 2.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A graph says Type(Sol, Analyst), Subclass(Analyst, Specialist), and Subclass(Specialist, Staff). Its rules propagate types through subclass links. An embedding also predicts Leads(Sol, Team). What can strict inference establish?
  1. Type(Sol, Staff) together with Leads(Sol, Team)
  2. Type(Sol, Specialist), but not Type(Sol, Staff)
  3. Leads(Sol, Team), without Type(Sol, Staff)
  4. Type(Sol, Staff), without establishing Leads(Sol, Team)
Show answerHide answer

Save this lesson to see this answer.

Set 4: Diagnosing subtle reasoning errors10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A complete SAT solver returns a satisfying assignment. What does that establish about its input formula?
  1. The formula is satisfiable.
  2. The formula is valid.
  3. The formula is unsatisfiable.
  4. Every assignment satisfies it.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A cave agent proves that a square has no pit but has no information about the wumpus there. What can it conclude about entering safely?
  1. The square is fully safe.
  2. Full safety remains unresolved.
  3. The square contains the wumpus.
  4. The KB is inconsistent.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A log contains Failed ⇒ Alert and Alert. Why is Failed not established by these sentences?
  1. Failed must be false whenever Alert holds.
  2. An implication requires both sides to be true.
  3. The two sentences cannot be true together.
  4. Alert can hold while Failed is false.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What clauses represent ¬∀x (Sensor(x) ⇒ Working(x)) after Skolemization?
  1. ¬Sensor(K) and Working(K), with fresh K
  2. ¬Sensor(x) ∨ Working(x), universally
  3. Sensor(K) and ¬Working(K), with fresh K
  4. Sensor(F(x)) ∨ ¬Working(F(x)), universally
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A default system concludes Flies(Rio) from Bird(Rio). Later Penguin(Rio) activates a more specific non-flying exception. What should happen to the default conclusion?
  1. Withdraw the flying conclusion.
  2. Keep both contradictory conclusions.
  3. Delete Bird(Rio) to keep flying.
  4. Reject the later Penguin fact.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A formula contains U ∨ V, ¬U ∨ W, ¬V ∨ W, ¬W ∨ X, and ¬X. What does complete DPLL search establish?
  1. Satisfiable with U false
  2. Satisfiable with U true
  3. Unsatisfiable
  4. Satisfiable with V = W
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A nonempty domain has two objects a and b. R contains exactly (a, a) and (b, b). How do ∀x ∃y R(x, y), ∃y ∀x R(x, y), and ∃x ∃y (R(x, y) ∧ ¬(x = y)) evaluate?
  1. True, true, false
  2. True, false, false
  3. False, false, true
  4. True, false, true
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Two independently quantified clauses contain P(x, F(x)) and ¬P(G(y), z) ∨ Q(z). After standardizing apart, what resolvent follows by matching the P literals?
  1. Q(F(G(y)))
  2. Q(G(F(y)))
  3. Q(F(F(y)))
  4. Q(G(G(y)))
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Goal: A ∧ ¬B. Action Finish has precondition C, adds A and deletes B. What predecessor condition does regression produce?
  1. C ∧ ¬B
  2. C ∧ A
  3. C ∧ A ∧ ¬B
  4. C
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Two independent goal facts can each be achieved by one action, and the actions do not interfere. A SAT encoding allows both actions in the same time layer. What objective is minimized by the first satisfiable horizon?
  1. Total action count
  2. Sum of action durations
  3. Parallel layers
  4. Number of goal fluents
Show answerHide answer

Save this lesson to see this answer.

Set 5: Combining representation, inference and planning10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What planning approach refines high-level tasks using a supplied library of methods?
  1. Propositional model checking
  2. HTN planning
  3. Delete-relaxed state search
  4. Unrestricted resolution search
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A standard FOL KB contains Tool(Drill), Tool(Driver), and Used(Drill). It contains no inequality. What is the minimum number of tool objects compatible with it?
  1. 0
  2. 2
  3. 3
  4. 1
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A machine can have several repairs with different technicians and dates. How can ordinary binary triples distinguish each repair and keep its machine, technician and date together?
  1. Create a repair node linked to its machine, technician and date.
  2. Store each machine’s technicians and dates as independent links.
  3. Store each technician’s machines and dates as independent links.
  4. Replace the repairs with undated machine–technician links.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

The KB has only S ∨ T, S ⇒ U and T ⇒ U. What happens with simple definite-clause forward chaining for query U?
  1. It derives S and then U.
  2. It derives T and then U.
  3. It stalls although U is entailed.
  4. It proves ¬U at its fixed point.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

Eligibility requires every Required(p, Build) to be passed by Jo. Facts give Required(Logic, Build), Required(Code, Build), Passed(Jo, Logic), Passed(Jo, Code), and ¬(Logic = Code). What extra relation constraint makes the eligibility condition provable in standard FOL?
  1. ∀p ((p = Logic ∨ p = Code) ⇒ Required(p, Build))
  2. ∀p (Required(p, Build) ⇒ Passed(Jo, Logic))
  3. ∃p (Required(p, Build) ∧ Passed(Jo, p))
  4. ∀p (Required(p, Build) ⇒ (p = Logic ∨ p = Code))
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Consider Prolog clauses in this order: path(X, Z) :- path(X, Y), edge(Y, Z). then path(X, Z) :- edge(X, Z). Fact: edge(m, n). What happens under ordinary depth-first search for path(m, n) without tabling?
  1. It loops before reaching the direct-edge proof.
  2. It immediately returns the direct-edge proof.
  3. It finitely fails because the recursive rule fails.
  4. It returns every path before trying recursion.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A KB contains A ⇔ (B ∨ C), ¬B and C ⇒ D. Does it entail A ⇒ D, and why?
  1. No; ¬B breaks the biconditional.
  2. No; C may be false when A is false.
  3. Yes; A with ¬B forces C, then D.
  4. Yes; D holds in every KB model.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A robot starts at North with an empty hand; a parcel is at South. The only travel link runs between North and South in both directions. Go changes location, Pick needs co-location and an empty hand, and Drop needs co-location and holding. What is the shortest plan delivering the parcel to North and ending with an empty hand?
  1. Go south, Pick, Drop, Go north
  2. Go south, Pick, Go north, Drop
  3. Pick, Go south, Go north, Drop
  4. Go south, Go north, Pick, Drop
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A task has goal F ∧ G. One action establishes both with no preconditions and unit cost. Two other actions separately establish F and G at unit cost. What are the optimal cost, unsatisfied-goal count and sum of individual goal costs initially, when neither goal holds?
  1. 1, 2, 2
  2. 2, 2, 2
  3. 1, 1, 1
  4. 2, 1, 2
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A partial-order plan has MakeReady —Ready→ Use and Use ≺ Clean. Reset deletes Ready. What new ordering safely resolves Reset’s threat without creating a cycle?
  1. MakeReady ≺ Reset ≺ Use
  2. MakeReady ≺ Reset ≺ Clean
  3. Reset ≺ Use ≺ MakeReady
  4. Use ≺ Reset
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

102 Key Terms, each with its definition

A

Action schema
An action schema describes a parameterized action through the conditions required before it and the effects produced afterward.
Grounding the Pick schema selects a specific robot, package and location for applicability checking.
Add list
An action's add list contains the positive fluents made true by execution, which are inserted into the resulting planning state.
A move to the shelf adds At(R, Shelf) while leaving unrelated package facts unchanged.
Admissible heuristic
An admissible heuristic never exceeds the true optimal remaining cost, providing a lower-bound estimate for informed search.
The optimal delete-relaxed plan length is a lower bound because the real task retains more constraints.
ASK
ASK is the operation that requests an answer supported by a knowledge base, whether already stored or obtained by inference.
The agent ASKs whether a neighboring square is safe before choosing its next movement.
Axiom
An axiom is a sentence supplied as starting knowledge, so an inference procedure may use it without deriving it first.
For an agent exploring a cave, the rule linking nearby pits to breezes is an axiom in its knowledge base.

B

Backward chaining
Backward chaining works from a query by finding rules that could establish it and recursively proving the required premises.
To establish Released, the reasoner looks for a rule with Released as its head and checks its body.
Biconditional
A biconditional is a sentence P ⇔ Q requiring P and Q to have the same truth value, thereby asserting both implications.
A biconditional linking breezes to nearby pits lets an agent reason from a nearby pit to a breeze and from a breeze to pits.

C

Causal link
A causal link records that one action establishes a precondition needed by another, protecting that fact between the actions.
A Pick-to-Drop link for Holding(R, Box) is threatened by an intervening action that removes holding.
CDCL
CDCL is a SAT approach that learns clauses from conflicts and uses them with backjumping and efficient propagation to guide search.
A learned clause excludes a conflicting combination so that later branches avoid repeating it.
Classical planning
Classical planning finds actions reaching a goal from a known state using a fully observable, deterministic and discrete world model.
A delivery plan applies modeled travel and handling actions until the package reaches its required location.
Clause
A clause is a disjunction of literals; a single literal is a unit clause, and the empty clause represents falsehood.
The clause ¬A ∨ B becomes a unit requirement for B when A has been assigned true.
Closed-world assumption
The closed-world assumption treats atomic claims not established by the available knowledge as false within the modeled application.
A basic planning state lists true fluents and treats an omitted location fact as false.
Completeness
Completeness means that a procedure can derive every conclusion entailed by the premises within its stated logical scope.
Sound rules can still be incomplete if their available operations cannot construct an entailed sentence.
Completion axiom
A completion axiom explicitly restricts the possibilities for a relation, enabling reasoning that an open list of facts cannot support.
Completing a course's prerequisite list excludes additional unpassed prerequisites for enrollment in that course.
Conjunctive normal form
Conjunctive normal form is a conjunction of clauses, making a formula suitable for clause-based inference and SAT solving.
The formula (A ∨ B) ∧ (¬A ∨ C) is CNF because each conjunct is a disjunction of literals.
Contingent plan
A contingent plan branches on observations, allowing different actions depending on what an agent learns during execution.
An inspection can lead to separate action branches for an open passage and for a blocked passage.
Countermodel
A countermodel to an entailment is a model where every premise is true but the proposed conclusion is false.
P false and Q true refutes the claim that P ⇒ Q together with Q entails P.

D

Datalog
Datalog uses function-free definite clauses, so a finite set of constants permits only finitely many possible ground facts.
Reachability rules over a finite list of named locations eventually reach a forward-chaining fixed point.
Default reasoning
Default reasoning draws conclusions that hold normally while permitting their withdrawal when more specific information reveals an exception.
A flying default for a bird can be withdrawn after the system learns that the bird is a penguin.
Definite clause
A definite clause has exactly one positive literal and can express a fact or a rule with a conjunction of premises and one head.
The clause ¬A ∨ ¬B ∨ C can be read as the rule A ∧ B ⇒ C for chaining.
Delete list
An action's delete list contains the positive fluents removed by execution, preventing their persistence into the resulting state.
A move deletes the old location so that the robot is not left at both the dock and the shelf.
Delete relaxation
Delete relaxation removes negative effects from a positive-precondition, positive-goal planning task, so achieved facts persist.
A robot's initial location remains true in the relaxed task even after it moves to another location.
Description logic
A description logic defines categories in a restricted formal language designed to support decidable classification and related reasoning.
An ontology reasoner can check whether one defined category is necessarily contained in another.
Domain closure
Domain closure is the assumption that the domain contains no objects beyond those denoted by the available names.
A finite database can restrict its world to the listed objects instead of allowing unnamed books.
DPLL
DPLL is a complete SAT search procedure combining depth-first branching and backtracking with early evaluation and forced assignments.
After unit propagation stalls, DPLL chooses an unassigned symbol and explores its truth values.

E

Entailment
Entailment holds when a conclusion is true in every model satisfying the premises, so no compatible counterexample exists.
A ∨ B together with ¬A entails B because every surviving assignment makes B true.
Entity resolution
Entity resolution identifies records or identifiers referring to the same real entity, helping connect facts across data sources.
Two datasets may use different identifiers for the same laboratory and need a verified mapping.
Existential Instantiation
Existential Instantiation introduces a fresh constant as a witness to an existential sentence, preserving satisfiability of the knowledge.
A crown can be named with a new constant without claiming it is any particular already named object.
Existential quantifier
The existential quantifier ∃ requires at least one domain object to make its scope true; that object is a witness.
The sentence ∃x (Cat(x) ∧ Black(x)) needs an object that is both a cat and black.

F

Factoring
Factoring merges unifiable literals within a clause, simplifying it and supporting complete first-order resolution with unification.
Two positive literals P(x) and P(Ada) in one clause can be merged under the substitution x = Ada.
First-order logic
First-order logic expresses claims about objects, relations and functions using quantifiers, allowing reusable rules over a domain.
One quantified breeze rule can describe every square without naming a separate propositional rule for each one.
Fixed point
A fixed point is reached when applying the inference rules produces no new facts beyond those already in the knowledge base.
Once every reachable node pair has been derived, another round of reachability rules adds nothing.
Fluent
A fluent is a fact whose truth can change over time, such as the location of a robot or whether it still holds a package.
Time indices distinguish the robot's location before a move from its location after the move.
Forward chaining
Forward chaining derives consequences from known facts by firing rules whose premises hold, continuing until a query or fixed point.
A monitor starts from sensor facts and derives every alarm enabled by its stored rules.
Frame problem
The frame problem is the problem of representing what remains unchanged when an action alters only some aspects of a world.
Moving a robot should preserve its possession of an arrow without needing a separate rule for every action.
Free variable
A free variable is a variable occurrence not bound by a quantifier, so evaluating the formula requires an assignment for it.
In ∀x Likes(x, y), x is bound but the value assigned to y still affects the sentence's evaluation.

G

Generalized Modus Ponens
Generalized Modus Ponens applies a rule after one consistent substitution matches all its atomic premises to available facts.
Owns(Ada, Atlas) and Book(Atlas) jointly match the rule that owners of books are readers.
Ground term
A ground term is a term containing no variables, so it refers to an object without requiring a variable assignment in the model.
MotherOf(Ada) is ground even though it is a compound expression, while MotherOf(x) contains a variable.

H

Horn clause
A Horn clause has at most one positive literal, so it includes definite clauses and clauses with only negative literals.
The goal clause ¬A ∨ ¬B rules out A and B being true together without asserting a positive head.
HTN planning
HTN planning refines high-level tasks through domain-specific methods until the remaining tasks are executable primitive actions.
A delivery method decomposes the task into traveling, picking up the package, traveling again and dropping it.

I

Implication
An implication is a sentence P ⇒ Q that is false only when P is true and Q is false; it does not assert a causal relationship.
A false premise makes an implication true even when its conclusion is also false.
Interpretation
An interpretation assigns objects to constants, relations to predicates and total functions to function symbols in a first-order model.
Two constant names can denote the same object unless the model is constrained by an inequality.

K

Knowledge base
A knowledge base is a collection of formal sentences that records an agent's background information and later observations.
A robot combines its stored route rules with a newly observed blockage to decide where it can move.
Knowledge engineering
Knowledge engineering is the process of designing, populating, querying and testing a knowledge base to support a domain's questions.
An enrollment KB needs vocabulary and rules connecting passed prerequisites to eligibility for a course.
Knowledge graph embedding
A knowledge graph embedding represents entities and relations with learned vectors that score possible links for statistical prediction.
A high score can suggest a missing relationship, but a rule-based entailment needs separate logical support.
Knowledge level
The knowledge level describes an agent through its beliefs and goals, independently of the code and data structures implementing them.
Saying that a robot knows the bridge is closed describes its knowledge level, not its storage format.

L

Literal
A literal is an atomic proposition or its negation, providing the basic positive or negative claim used inside a clause.
Both P₁₂ and ¬P₁₂ are literals, while P₁₂ ∧ P₂₁ combines two literals into a larger sentence.

M

Model
A propositional model assigns truth values to proposition symbols, allowing the truth of compound sentences to be evaluated.
With A false and B true, the model satisfies A ∨ B while falsifying A ∧ B.
Modus Ponens
Modus Ponens is the inference rule that derives a conclusion Q from an implication P ⇒ Q and the matching premise P.
Ready and Ready ⇒ Checked allow the proof to add Checked as a justified new sentence.
Monotonicity
Monotonicity means that adding premises preserves conclusions already entailed, even though it may add further conclusions.
Adding a new percept to a classical KB does not withdraw the entailments it previously supported.
Most general unifier
A most general unifier makes expressions identical without unnecessary specialization, leaving other unifiers obtainable by further substitution.
Binding x to z leaves more freedom than binding both variables to a particular existing constant.
Mutex
A mutex link in a planning graph marks a pair of actions or fluents that cannot occur together at the corresponding level.
Mutually exclusive action effects can rule out treating two otherwise available actions as simultaneous.

N

Negation as failure
Negation as failure treats a finitely failed proof attempt as success for a negated goal, depending on operational search behavior.
In Prolog, \+ p waits for the proof attempt for p; an endless loop does not count as failure.

O

Occurs check
The occurs check rejects a binding that would put a variable inside its own replacement term, preserving finite-term unification.
Attempting to unify x with MotherOf(x) fails because no finite term can satisfy that replacement.
Ontology
An ontology formally specifies a domain's categories, relationships and assumptions so that facts can be interpreted consistently.
An equipment ontology distinguishes a device's category from the components that form part of it.
Open-world assumption
The open-world assumption leaves an unstated fact unresolved, since the available knowledge may omit true facts about the world.
A graph with no spouse edge for a person leaves that relationship unknown instead of declaring it false.
OWL
OWL is a web ontology language offering richer class and property definitions, with description-logic languages for formal reasoning.
A graph ontology can use OWL definitions to classify individuals beyond the explicit type assertions.

P

Paramodulation
Paramodulation is an equality inference rule that replaces an occurrence using an equation while deriving consequences of clauses.
A theorem prover needs equality reasoning to connect a named object with an equal function term.
Partition
A partition divides a parent category into disjoint categories that jointly cover every member, leaving no overlaps or omissions.
Negative integers, zero and positive integers form a partition of the set of integers.
PDDL domain
A PDDL domain declares reusable predicates and action schemas, while a problem supplies particular objects, initial facts and goals.
The same delivery domain can serve problems with different robots, packages and connected locations.
Plan
A plan is a sequence of actions whose applicable executions take an initial planning state to a state satisfying the required goal.
Going to a package, picking it up, traveling to its destination and dropping it forms a delivery plan.
Precondition
A precondition is a condition that must hold before an action can be applied in a planning state, not a result created by the action.
Pick requires an empty hand; listing that fact only as an effect would not test availability beforehand.
Predicate
A predicate names a relation over domain objects and forms an atomic sentence when supplied with the required argument terms.
Owns(Ada, Atlas) applies the binary predicate Owns to two terms identifying the owner and the object.
Progression
Progression searches forward from the initial planning state by applying actions whose preconditions hold in each reached state.
A forward planner considers legal moves from the dock even when some do not help deliver the package.
Pure symbol
A pure symbol occurs with one polarity in all currently unsatisfied clauses, allowing an assignment that satisfies those occurrences.
If E occurs only positively among the remaining clauses, setting E true preserves satisfiability.

Q

Quantifier scope
A quantifier's scope is the expression it governs, determining which variable occurrences it binds and how witnesses may depend on others.
In ∀x ∃y Helps(y, x), the helper y may vary with the object chosen for x.

R

RDF
RDF is a web data model expressing graphs as triples with IRIs, blank nodes and literal values in their permitted positions.
A dataset can connect an entity identified by an IRI to a literal year through a named property.
RDFS
RDFS adds classes, subclass relationships and property domain and range to RDF, enabling basic schema-based inferences.
A Researcher subclass link to Scientist supports an inferred Scientist type for a known researcher.
Refutation
A refutation derives a contradiction from the premises and a negated query, establishing that the query follows from the premises.
The proof of Q adds ¬Q temporarily and closes when Q and ¬Q resolve to the empty clause.
Regression
Regression works backward from goal conditions, replacing literals an action achieves with the preconditions needed before that action.
Regressing a delivery goal through Drop creates requirements that the robot hold the package at the destination.
Reification
Reification represents a property, category or relationship as an object so that further facts can refer to it directly.
Representing Red as an object allows a query to ask whether two objects share the same color.
Resolution
Resolution derives a new clause by removing one complementary literal pair from two clauses and retaining the remaining literals.
Resolving A ∨ C with ¬A ∨ D gives C ∨ D, which every model of the parents must satisfy.
Rete network
A Rete network retains partial rule matches across updates, reducing repeated matching work in systems driven by changing facts.
A rule engine reuses a stored match for one premise when a new fact satisfies another premise.

S

SAT
The SAT problem asks whether any truth assignment satisfies a propositional formula, commonly represented in conjunctive normal form.
A solver returns a satisfying assignment or, when its complete search rules out all assignments, unsatisfiable.
Satisfiability
Satisfiability is the property of being true in at least one model, even if the sentence is false in other models.
The sentence A ∧ ¬B is satisfiable because the assignment A true and B false makes it true.
SATPlan
SATPlan encodes a planning task at a chosen horizon as SAT, with clauses for initial facts, goals, preconditions and state transitions.
An unsatisfiable horizon of three steps leaves open whether a four-step plan exists for the task.
Scheduling
Scheduling assigns start times while respecting action durations, ordering requirements and constraints on shared resources.
Two tasks needing the same robot may require different start times even if both are logically achievable.
Semidecidability
Semidecidability means that a procedure can eventually confirm every positive instance but may run forever on a negative instance.
A complete first-order prover finds entailed queries but may never stop on one that does not follow.
Set of support
The set-of-support strategy restricts resolution to steps involving the negated query or its descendants, with a satisfiable remainder.
A prover focuses on clauses connected to the query instead of resolving unrelated background clauses.
Skolemization
Skolemization replaces existential variables with fresh constants or functions reflecting their universal dependencies, preserving satisfiability.
A teacher chosen within ∀c can be represented by T(c), allowing different courses to have different teachers.
Soundness
Soundness means that an inference procedure derives only conclusions that follow from its premises in the intended semantics.
A sound proof rule never turns true premises into a false conclusion within the same model.
SPARQL
SPARQL is a query language that matches RDF graph patterns to return bindings, graphs or other results under the query's form.
Using the same ?p in two patterns requires one entity to satisfy both relationships in the query.
Standardizing apart
Standardizing apart renames variables in independent sentences before combining them, preventing accidental sharing of local bindings.
Two rules using x locally should receive distinct variable names before a resolution or chaining step.
Substitution
A substitution maps variables to terms and replaces their occurrences consistently throughout an expression or inference step.
Applying {x/Ada, y/Atlas} to Owns(x, y) produces the ground sentence Owns(Ada, Atlas).
Subsumption
Subsumption removes a clause already covered by a more general clause, avoiding redundant work without losing its constraints.
The general clause P(x) makes the weaker clause P(Ana) ∨ Q(Bo) unnecessary in the clause set.
Successor-state axiom
A successor-state axiom defines a fluent's next value through actions that establish it and conditions that let it persist.
The arrow remains available at the next step exactly when it is available now and the agent does not shoot.

T

Tabling
Tabling stores answers to repeated subgoals and manages their dependencies so that recursive searches can reuse emerging results.
A tabled reachability query can handle a cycle without descending through the same calls forever.
Taxonomy
A taxonomy organizes categories through subclass relationships, allowing properties of broader categories to apply to their members.
Laptops inherit computer properties because Laptops is a subclass of Computers in the hierarchy.
TELL
TELL is the operation that adds a sentence to a knowledge base, such as a percept or a record of the chosen action.
After sensing no breeze, the agent TELLs its knowledge base the corresponding negative percept.
Term
A term is an expression referring to an object, built from a constant, a variable or a function applied to other terms.
MotherOf(Ada) is a term, whereas Person(Ada) is a claim with a truth value.
Threat
A threat is an action that could negate a causal link's condition while ordered between the action establishing it and its consumer.
Ordering a threatening action before the producer or after the consumer protects the required condition.
Triple
A triple records one directed subject–predicate–object relationship, providing the basic fact structure of an RDF knowledge graph.
The triple (Ada, worksAt, Lab) links the person to the workplace through the worksAt relation.
Truth maintenance
A truth maintenance system tracks the support for beliefs so dependent conclusions can be revised when their assumptions change.
Removing support for a default flying belief also removes conclusions that depended solely on that belief.
Tseitin encoding
A Tseitin encoding introduces auxiliary symbols for subformulas to create small CNF while preserving whether a solution exists.
A SAT solver can use the encoded clauses without expanding every disjunction over every conjunction.

U

Unification
Unification finds a substitution making two expressions syntactically identical while respecting repeated-variable constraints.
Knows(Ana, x) and Knows(y, Bo) unify by assigning y to Ana and x to Bo.
Unique names
The unique-names assumption requires distinct constant symbols to denote distinct objects, unlike unrestricted standard first-order semantics.
Atlas and Beowulf count as different books under unique names without an extra inequality fact.
Unit propagation
Unit propagation repeatedly assigns the only literal that can still make a clause true, allowing forced assignments to trigger more.
After A becomes true, ¬A ∨ B forces B true, which may reduce another clause in turn.
Universal Instantiation
Universal Instantiation substitutes a ground term for a universally quantified variable, deriving a particular instance of a general claim.
A rule about every cat can be instantiated for Tom or for the object denoted by MotherOf(Tom).
Universal quantifier
The universal quantifier ∀ requires its scope to hold for every possible object assigned to its bound variable in the domain.
The sentence ∀x (Cat(x) ⇒ Mammal(x)) checks the implication for cats and for non-cats alike.

V

Validity
Validity is the property of being true in every model, independently of any particular knowledge base or observation.
P ∨ ¬P is valid because each assignment makes one of its two disjuncts true.
Variable binding
A variable binding associates a query variable with a term, identifying an object that satisfies the query under the knowledge base.
A query CanEnroll(x, AI) can return the binding x = Mia instead of only a yes-or-no answer.

W

WalkSAT
WalkSAT searches complete assignments by flipping variables from unsatisfied clauses, mixing random choices with guided repairs.
A WalkSAT run that reaches its flip limit leaves satisfiability unresolved, even if the formula has a model.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started