Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence Logical Agents Chapter 7.

Similar presentations


Presentation on theme: "Artificial Intelligence Logical Agents Chapter 7."— Presentation transcript:

1 Artificial Intelligence Logical Agents Chapter 7

2 Outline of this Chapter Knowledge-Based Agents Logic in general Inference Type of logic Propositional (Boolean) logic Validity & satisfiability Inference rules for Propositional logic An Agent for the Wumpus World

3 Knowledge-Based Agents The central component of Intelligent agents is knowledge about the world to reach good decisions. A Knowledge-Based Agent is composed of: –Inference mechanism. –Knowledge Base (KB) Knowledge Base (KB) is a set of representations of facts about the world known as Sentences.( here sentence is used as a technical term, it is related but is not identical to the sentence of English or other language ) The sentences are expressed in a language called knowledge Representation Language (KRL). KB agent can operate by storing sentences about the world in its KB, using the inference mechanism to infer new sentences & using them to decide what action to take.

4 A simple knowledge-based agent Agent gains additional knowledge about the world while interacting with its environment. The agent operates as follow:operates 1.It TELLs the KB what it perceives. 2.It ASKs the KB what action it should perform. 3.It performs the chosen action.

5 Architecture of a KB Agent Agents can be viewed at 3 levels: At the Knowledge level: the most abstract-- describes agent by saying what it knows. At the Logical level: It describes how the agent knows. At the Implementation level: it describes how knowledge is implemented. i.e., data structures in KB and algorithms that manipulate them Knowledge level Logical level Implementation level What it knows How it knows How K is implemented

6 Logic in general Logic is a formal language for representing information such that conclusions can be drawn It consists of two parts, a language and a method of reasoning. The objective of KRL(knowledge Representation Language) is to express knowledge in a computer adaptable manner, so that agents can perform well. A knowledge representation language is defined by two aspects: Syntax: Specifies the symbols in the language and how they can be combined to form sentences. Semantic: defines the meaning of sentences; Example: –x ≥ y is a sentence The semantic of the language says: –x ≥ y is false if y is a bigger number than x, and true otherwise If a language has well defined syntax and semantics, then it is called a logic

7 The Connection between Sentences & Facts Facts are part of the world– their representation must be encoded to physically store within an agent. Cannot put the world inside a computer -  all reasoning must operate on representation of facts, rather than on facts themselves. Semantics maps sentences in logic into facts in the world. The property of one fact following from some other facts is mirrored by the property of one sentence being entailed by another.

8 Entailment Entailment means that one thing follows from another: E.g., x+y = 4 entails 4 = x+y In mathematical notation: KB ╞ α Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true In other words, every world where KB is true is also a world where α is true. E.g., the KB containing “A won” and “B won” entails“Either A won or B won”. Entailment is a relationship between sentences (i.e., syntax) that is based on semantics.

9 Inference Inference- A process by which conclusions are reached KB ├ i α = sentence α can be derived from KB by procedure I Logical inference (inferencing or deduction) is the process of generating new sentences based on existing sentences.Logical inference An inference algorithm or process that drives only entailed sentences is called Sound/ truth-preserving. An inferencing process is complete if it can derive all sentences that are entailed (Have as a logical consequence). Notice that if we make wrong statements about our 'world' the inference is likely to be wrong.

10 Type of Logic Table bellow shows several logics as classified by their Ontological and Epistemological commitments. Ontological commitments defines the entities that a language uses to describe the world Epistemological commitments are the values that a sentence can have according to the experiences of an agent. LanguageOntological commitment (what exists in the world) Epistemological commitment (what an agent believes) Propositional logicFactsTrue/false/unknown First-Order LogicFacts,object,relationsTrue/false/unknown Temporal logicFacts,object,relations, times True/false/unknown ProbabilityFactsDegree of belief 0..1 Fuzzy logicDegree of truthDegree of belief 0..1

11 Propositional logic(PL): Syntax Propositional/Boolean logic is the simplest logic – illustrates many of the concepts of logic. Sentences in Propositional logic are made of the following symbols: –Constants: TRUE, FALSE –Proposition Symbols: P 1, P 2 etc are sentences –Round brackets: () to wrap sentences, which yields a single sentence, e.g (P 1 Ú P 2 ) –Logical Connectives:  (and),  (or),  (implication),  (equivalence),  (negation). –A sentence can be formed by combining simpler sentences with one of the 5 logical connectives: If S is a sentence,  S is a sentence (negation) If S 1 and S 2 are sentences, S 1  S 2 is a sentence (conjunction: The state of being joined together) If S 1 and S 2 are sentences, S 1  S 2 is a sentence (disjunction: State of being disconnected) If S 1 and S 2 are sentences, S 1  S 2 is a sentence (implication:- Something that is conditional (entailed or implied) "his resignation had political implications") If S 1 and S 2 are sentences, S 1  S 2 is a sentence (biconditional – iff means if and only if )

12 PL Syntax example

13 Propositional logic: Semantics The semantic of sentences in Propositional Logic is defined by: Interpreting the proposition symbols - they are considered satisfiable ( true in some model ) but not valid sentences (can mean whatever you want), Interpreting the constants- their meaning is fixed: FALSE equals FALSE, and TRUE equals TRUE, and specifying the meanings of the 5 logical connectives (their behaviour is shown in the truth tables ).

14 Examples of PL sentences A simple language useful for showing key ideas and definitions User defines a set of propositional symbols, like P and Q. User defines the semantics of each of these symbols, e.g.: –P means "It is hot" –Q means "It is humid" –R means "It is raining" (P ^ Q)  R "If it is hot and humid, then it is raining“ Q  P "If it is humid, then it is hot“ Q "It is humid."

15 Validity & Satisfiability There are three types of sentences: Valid: Characteristic of sentences that are true under all possible interpretations of the world (in all models), also called tautologies.Valid: e.g. A  A, A  A, (A  (A  B))  B Satisfiable: Characteristic of sentences that are true under some interpretations of the worldSatisfiable: e.g., A  B, C Un-satisfiable: Characteristic of sentences that are false under all interpretation of the world e.g., A  AUn-satisfiable:

16 Semantic example

17

18

19 Logical equivalence Two sentences are logically equivalent, iff true in same models: α ≡ ß iff α╞ β and β╞ α You can use these equivalences to modify sentences.

20 Inference Rules for Propositional Logic Modus-Ponens or Implication elimination (From an implication and the premise of the implication, you can infer the conclusion) And-Elimination (From a conjunction, you can infer any of the conjuncts ) Or-Introduction (From a sentence, you can infer its disjunction) And-Introduction (From a list of sentences, you can infer their conjunction)             n       n  i       n Whenever any sentences of the form  &  are given   can be inferred The inferencing rules that can be used to derive new sentences in propositional logic are described below:

21 Inference Rules for Propositional Logic Double-Negation Elimination (from doubly - sentence, you can infer + sentence) Unit Resolution (From disjunction, if one is false, then you can infer the other one is true ) Resolution (most difficult Because  cannot be both true and false)           


Download ppt "Artificial Intelligence Logical Agents Chapter 7."

Similar presentations


Ads by Google