Knowledge Representation and Reasoning Intro

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which of the following is a primary objective of knowledge representation and reasoning?

  • To form representations of the world.
  • To use inference to derive new representations about the world.
  • To use new representations to deduce what to do.
  • All of the above. (correct)

What is a 'knowledge base' in the context of knowledge representation?

  • A process of deriving new sentences from existing ones.
  • A set of sentences expressed in a knowledge representation language. (correct)
  • An approach to system building.
  • A programming code that encodes desired behaviors.

What distinguishes a declarative approach from a procedural approach in system building?

  • A procedural approach uses sentences to represent the environment.
  • A declarative approach focuses on encoding behaviors directly as program code.
  • A procedural approach is based on expressing knowledge in a knowledge base.
  • A declarative approach expresses knowledge of the environment as sentences. (correct)

In the Wumpus world, what does it mean for a square to 'glitter'?

<p>The square contains gold. (C)</p> Signup and view all the answers

In the Wumpus world, what can the agent infer from perceiving a 'stench' in its current square?

<p>There is a wumpus in an adjacent square. (C)</p> Signup and view all the answers

What does it mean for the Wumpus world to be 'deterministic'?

<p>The world's outcomes are exactly specified. (A)</p> Signup and view all the answers

What does it mean for the Wumpus world to be 'fully accessible'?

<p>The agent only has local perception of the square it is in. (D)</p> Signup and view all the answers

In logical reasoning, what does the fundamental property ensure?

<p>Conclusions are guaranteed to be correct if the available information is correct. (C)</p> Signup and view all the answers

What is the role of 'syntax' in logical representation?

<p>To define the sentences (allowable expressions) in the language. (D)</p> Signup and view all the answers

What does the semantics of a sentence define?

<p>The 'meaning' of sentences, in terms of a mapping to a real world. (D)</p> Signup and view all the answers

In logic terminology, what is a 'model'?

<p>A mathematical abstraction that fixes the truth or falsehood of every relevant sentence. (B)</p> Signup and view all the answers

What is 'entailment' in logical reasoning?

<p>A relationship where one sentence follows logically from another sentence. (B)</p> Signup and view all the answers

What is the meaning of the notation α ⊨ β?

<p>α entails β. (A)</p> Signup and view all the answers

What is 'model checking' used for in logical reasoning?

<p>To enumerate all possible models to check that α is true in all models in which KB is true. (C)</p> Signup and view all the answers

What does it mean for an inference algorithm to be 'sound'?

<p>It derives only entailed sentences. (D)</p> Signup and view all the answers

What does it mean for an inference algorithm to be 'complete'?

<p>It can derive any sentence that is entailed. (A)</p> Signup and view all the answers

In the context of soundness and completeness, what does 'soundness' ensure about a system's proofs?

<p>If the system proves something is true, then it really is true; the system doesn't derive contradictions (B)</p> Signup and view all the answers

Within the scope of soundness and completeness, what does 'completeness' imply about what a system can prove?

<p>If something is really true, it can be proven using the system. (C)</p> Signup and view all the answers

Which of the following lists the logical connectives?

<p>¬ (NOT), ∧ (AND), ∨ (OR), ⇒ (implication), ⇔ (biconditional). (B)</p> Signup and view all the answers

What are the possible values of 'atomic sentences'?

<p>They can be either True or False. (C)</p> Signup and view all the answers

What is an 'atomic sentence' in propositional logic?

<p>A single proposition symbol. (A)</p> Signup and view all the answers

According to the BNF grammar given, which of the following is a valid 'Sentence'?

<p>AtomicSentence (D)</p> Signup and view all the answers

According to the material, what is the order of precedence of logical operators (from highest to lowest)?

<p>Parenthesis, NOT, AND, OR, Implies, Equivalent (A)</p> Signup and view all the answers

In propositional logic, what does 'Semantic' define?

<p>The rules for determining the truth of a sentence with respect to a particular model. (D)</p> Signup and view all the answers

What is the purpose of using a truth table to derive an argument?

<p>All of the above. (D)</p> Signup and view all the answers

Which of the following describes what is a 'valid' sentence?

<p>A sentence which is true in all models. (D)</p> Signup and view all the answers

Which of the following is an example of a Proof Method?

<p>Model checking (A)</p> Signup and view all the answers

What is the time complexity of 'model checking' for n symbols?

<p>O(2n) (A)</p> Signup and view all the answers

Under the 'Deduction Theorem', KB ⊨ α if and only if:

<p>(KB ∧ α) is valid (B)</p> Signup and view all the answers

What does it mean for a sentence to be 'satisfiable'?

<p>It is true in some model. (D)</p> Signup and view all the answers

How is 'satisfiability' connected to inference?

<p>KB ⊨ α if and only if (KB ∧ ¬α) is unsatisfiable (D)</p> Signup and view all the answers

What is required for an inference rule to be considered 'sound'?

<p>The conclusion is true in all cases where the premises are true. (C)</p> Signup and view all the answers

What does 'Modus Ponens' infer?

<p>From an implication and the premise of the implication, it infers the conclusion. (A)</p> Signup and view all the answers

Which rule includes the statement: “raining implies soggy courts”, “courts not soggy” and concludes “not raining”?

<p>Modus Tollens (A)</p> Signup and view all the answers

What can be inferred from a conjunction using 'AND elimination'?

<p>Any of the conjuncts. (C)</p> Signup and view all the answers

Which of the following is true about the 'resolution rule'?

<p>It is sound and complete. (A)</p> Signup and view all the answers

Why must you convert a knowledge base to CNF to apply resolution?

<p>Resolution can only be applied to disjunctions of literals, and any knowledge base can be expressed as a conjunction of disjunctions. (C)</p> Signup and view all the answers

How are inference procedures based on resolution used?

<p>By using the principle of proof by contradiction. (A)</p> Signup and view all the answers

Which of the following is true about the PL-Resolution Function?

<p>It returns true if an empty clause is derived, indicating KB entails a. (C)</p> Signup and view all the answers

Regarding Horn clauses, what is Modus Ponens used for?

<p>Making inferences (C)</p> Signup and view all the answers

What is the initial step called in Horn clauses?

<p>Forward chaining (A)</p> Signup and view all the answers

Flashcards

Knowledge Base

A set of sentences in a knowledge representation language.

Inference

The process of deriving new sentences from existing ones.

Declarative Approach

Expressing knowledge using sentences in a representation language.

Procedural Approach

Encoding desired behaviors directly as a program code.

Signup and view all the flashcards

Logical Reasoning Property

When given correct input, a correct conclusion is guaranteed.

Signup and view all the flashcards

Logics

Formal languages for representing information and drawing conclusions.

Signup and view all the flashcards

Syntax

Defines the sentences in the language (well-formed expressions).

Signup and view all the flashcards

Semantics

Defines the meaning of sentences (mapping to real world).

Signup and view all the flashcards

Model

Substitute for possible world to keep the context exact.

Signup and view all the flashcards

Model of a Sentence

A sentence is true in model.

Signup and view all the flashcards

Entailment

Logical reasoning needs a relation of logical entailment between sentences.

Signup and view all the flashcards

Model Checking

Enumerating all possible models to check if α is true.

Signup and view all the flashcards

Sound Inference

Derives only entailed sentences.

Signup and view all the flashcards

Complete Inference

Can derive any sentence that is entailed.

Signup and view all the flashcards

Soundness

If something is true, then the system won't derive the opposite.

Signup and view all the flashcards

Completeness

If something is really true, it can be proven.

Signup and view all the flashcards

Propositional Logic

The simplest logic.

Signup and view all the flashcards

Propositional Logic Syntax

Defines the allowable sentences.

Signup and view all the flashcards

Propositional Logic Semantic

Defines truth values, in a model.

Signup and view all the flashcards

Atomic Sentence

Single proposition symbol.

Signup and view all the flashcards

Complex Sentences

Constructed from atomic sentences with connectives.

Signup and view all the flashcards

Negation

¬ (NOT) negation.

Signup and view all the flashcards

Conjunction

^ (AND) conjunction, operands are conjuncts.

Signup and view all the flashcards

Disjunction

✓ (OR), operands are disjuncts.

Signup and view all the flashcards

Implication

⇒ implication (or conditional) A ⇒ B, If A then B.

Signup and view all the flashcards

Biconditional

<=> if and only if (biconditional)., A <-> B.

Signup and view all the flashcards

Truth Table Enumeration

Enumerates all possibilities to determine truth.

Signup and view all the flashcards

Valid Sentence

A sentence that's true in every model.

Signup and view all the flashcards

Satisfiable Sentence

A sentence that is true in some model.

Signup and view all the flashcards

Unsatisfiable Sentence

A sentence that is false in all models.

Signup and view all the flashcards

Modus Ponens

From an implication and its premise, infer the conclusion.

Signup and view all the flashcards

Modus Tollens

From an implication and negation of its consequent, infer the negation of antecedent.

Signup and view all the flashcards

AND Elimination

From a conjunction, infer any of the individual conjuncts.

Signup and view all the flashcards

Logical Equivalence

Sentences are logically equivalent if they are true in same models.

Signup and view all the flashcards

Resolution

A general method of inferring new sentences.

Signup and view all the flashcards

Resolution Inference Procedure

KB is converted to the CNF, rule applied to the sentences.

Signup and view all the flashcards

Horn Clause

CNF (Conjunctive Normal Form) with at most one positive literal.

Signup and view all the flashcards

Forward Chaining

Fire rules until conclusion is inside the KB.

Signup and view all the flashcards

Study Notes

Knowledge Representation and Reasoning - Introduction

  • Knowledge representation and reasoning allows for formalizing knowledge about the world, enabling reasoning, sound inference, proving, planning actions, and understanding/explaining things.
  • The objectives are to form representations of the world, use inference to derive new representations, and use these representations to decide on actions.
  • A knowledge base consists of sentences expressed in a knowledge representation language, where each sentence represents an assertion about the world.
  • Inference involves deriving new sentences from existing ones to draw new conclusions.

Declarative vs Procedural Approach

  • The declarative approach involves expressing knowledge of the environment in the form of sentences using a representation language.
  • The procedural approach encodes desired behaviors directly as program code.

Exploring the Wumpus World

  • The Wumpus world is used as an example of knowledge representation and reasoning

Wumpus World - Environment and Rules

  • Squares adjacent to the wumpus are smelly, and those adjacent to pits are breezy.
  • Glitter indicates gold in the same square, and shooting kills the wumpus if facing it, using up the only arrow.
  • Grabbing picks up gold in the same square, while releasing drops it.
  • The goal is to get the gold back to the start without entering a pit or Wumpus square.
  • The agent perceives breeze, glitter, and smell, and can perform actions like turning left/right, moving forward, grabbing, releasing, and shooting.
  • The Wumpus world is deterministic, but not fully accessible, static, and discrete.

Wumpus World - Exploring and Reasoning

  • Exploration involves moving through the world, perceiving the environment, and making inferences about the location of Wumpuses and pits.
  • If no stench or breeze is perceived, neighboring squares are considered safe.
  • A stench indicates a Wumpus nearby, and a breeze indicates a pit.
  • A strategy of coercion can be used, involving shooting straight ahead. If a Wumpus was there, it becomes safe. If not, the area is then deemed safe

Logical Reasoning

  • If the available information is correct, the conclusion drawn is also guaranteed to be correct.

Fundamental Concepts of Logical Representation

  • Logics are formal languages for representing information to draw conclusions.
  • Each sentence is defined by a syntax and a semantic. Syntax defines the sentences in a language, specifying well-formed sentences.
  • Semantics define the "meaning" of sentences based on a mapping to the real world, defining the truth of a sentence in a possible world.
  • A model is used instead of "possible world" for precision. If the model satisfies alpha then alpha is true in model m .

Sentences and Models

  • x + 2≥y is a sentence, while x + y > is not.
  • x + 2≥y is true if x+2 is no less than y, as in a world where x=7, y=1, but false where x=0, and y=6.
  • Models is a mathematical abstraction that fixes of true / false for every relevant sentence.
  • A model is possible assignments of numbers to the variables x and y. Each assignment fixes the truth of a sentence.
  • KB = wumpus-world rules + observations

Entailment

  • Logical reasoning requires the relation of logical entailment between sentences ("a sentence follows logically from another sentence").
  • Mathematical notation: α╞ β means α entails β.
  • Formal definition: α ╞ β if and only if in every model in which α is true, β is also true. The truth of beta is contained in alpha.
  • Sentences are physical configurations of the agent, and reasoning involves constructing new configurations from old ones.

Model Checking

  • Model checking enumerates all possible models to check if α is true in all models in which the knowledge base is true.
  • Notation indicates a is derived from KB by inference algorithm i.
  • "[1,2] is safe" can be proved from KB using model checking.

Inference Procedures

  • An inference procedure can generate new sentences entailed by KB or report whether a sentence is entailed by KB.
  • A sound or truth-preserving inference algorithm derives only entailed sentences.
  • Completeness defines that an inference algorithm can derive any sentence that is entailed.
  • Soundness confirms if something is true by the system, then it is true.
  • Completeness confirms if something is true, it can be proven true using the system.

Propositional Logic

  • Propositional logic is the simplest logic, involving syntax, semantics, and entailment.
  • Syntax defines allowable sentences. An atomic sentence has:
  • Single proposition symbol (uppercase names with mnemonic value, e.g., W1,3).
  • True and False symbols with fixed meanings.
  • Complex sentences are constructed from simpler sentences using logical connectives.

Logical Connectives

  • ¬ (NOT) negation.
  • ∧ (AND) conjunction, with operands being conjuncts.
  • ∨ (OR), with operands being disjuncts.
  • ⇒ implication (or conditional) A ⇒ B (A is premise/antecedent, B is conclusion/consequent), also an if-then statement.
  • ⇔ if and only if (biconditional).

Sentence Structures

  • Logical constants TRUE and FALSE are sentences.
  • Proposition symbols (P1, P2, etc.) are sentences.
  • Symbols P1 and negated symbols ¬P1 are called literals.
  • Sentence construction includes ¬S (NOT), S1 ∧ S2 (AND), S1 ∨ S2 (OR), S1 ⇒ S2 (Implies), and S1 ⇔ S2 (Equivalent) given S, S1, S2 as sentences.

BNF Grammar

  • Sentence -> AtomicSentence | ComplexSentence
  • AtomicSentence -> True | False | Symbol
  • Symbol -> P | Q | R ...
  • ComplexSentence -> ¬ Sentence | (Sentence ∧ Sentence) | (Sentence ∨ Sentence) | (Sentence → Sentence) | (Sentence ⇔ Sentence)

Order of Precedence (Highest to lowest)

  • Parenthesis (Sentence)
  • NOT
  • AND
  • OR
  • Implies
  • Equivalent
  • Special cases: A ∨ B ∨ C, requires no parenthesis needed

Semantics

  • Semantics defines the rules for determining the truth of a sentence with respect to a particular model
  • Truth tables show the truth values for sentences with different connectives.

Sentences

  • Most sentences are sometimes true, like P ∧ Q.
  • Some sentences are always true, like (valid) ¬P ∨ P.
  • Some sentences are never true (unsatisfiable), like ¬P ∧ P.

Propositional Inference- Model Checking

  • Assume alpha = A v B
  • Assume KB = (A v C) ^ (B v ¬C)
  • Is it the case that KB |= a, check all possible models of alpha
  • Alpha must be true whenever KB is true

Propositional Inference - Proof Methods

  • Model checking involves truth table enumeration, which is sound and complete but has a time complexity of O(2^n) for n symbols. A smarter way to do inference is needed.
  • Application of inference rules enables legitimate/sound generation of new sentences from old ones.
  • Proof is a sequence of inference rule applications, which can be used as operators in a standard search algorithm.

Validity and Satisfiability

  • A valid sentence (tautology) is true in all models and a sentence is satisfiable if it is true in some model such as A v B

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser