Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
First-Order Logic • Introduction • Syntax and Semantics • Using First-Order Logic • Summary Introduction Propositional logic: o Less expressive than predicate logic. o Is declarative (as opposed to procedural) o It lacks power to describe things concisely. o Assumes facts are true or false Compared to First-Order Logic… Builds around objects and relations. Relations may hold or not. Even more complex languages: Temporal logic. Facts hold at particular times High-order logic. Relations and functions are objects themselves. Languages Language Elements Belief Propositions Facts True/false/unknown First-order logic Facts,objects, True/false/unknown relations Temporal logic Facts,objects, True/false/unknown relations, time Probability Facts Degree of belief [0,1] Fuzzy logic Facts with Interval value degree of truth First-Order Logic • Introduction • Syntax and Semantics • Using First-Order Logic • Summary Syntax and Semantics What is a model? Propositional logic: sets of truth values for symbols First-order logic: a. Domain of the model (objects it contains) b. Relations (tuples of objects related) Example Stars, Galaxies, Quasars Made of stars Surrounded by planets A kind of AGN in galaxies Symbols and Interpretations Symbols: 1. Constants: earth, moon, sun, milky-way 2. Predicate Symbols: Neighbor-planets(x,y) 3. Function Symbols: 3rdPlanet(sun) Syntax Sentence AtomicSentence | ( Sentence Connective Sentence ) | ( Quantifier Variable,… Sentence ) | ~Sentence AtomicSentence Predicate(Term) | Term = Term Term Function(Term) | Constant | Variable Syntax Connective | ^ | V | Quantifier V | Constant A | X1 | Sun Variable a | x | s | … Predicate NeighborPlanets | TypeGalaxy | ColorStar Function 1stPlanet, 2ndPlanet Semantics Interpretation: Symbol “sun” refers to star sun Symbol “earth” refers to planet earth Star 3x45f refers to “specific star” Terms Logical expression that refers to an object. Examples: Constant symbols: sun, earth, mars, venus. Function symbols: 3rdplanet(sun) Sentences Statements or facts. Examples: Neighbor-Planets(earth,mars) ^ Neighbor-Galaxies(milky-way,andromeda) Universal Quantifiers How do we express properties of entire collections of objects? Universal quantification V All stars are burning hydrogen: V x Star(x) burning-hydrogen(x) True in all extended interpretations. Existential Quantifiers x Star(x) ^ burning-hydrogen(x) Normally: Universal quantifier connects with Existential quantifiers connect to ^ More on Quantifiers We can use multiple quantifiers: Vx Vy Star(x) ^ Galaxy(y) ^ InGalaxy(x,y) Contains(y,x) Vx y Star(x) ^ Star(y) ^ Neighbor(x,y) All stars have a neighbor star More on Quantifiers De Morgan’s rules apply: Vx ~P = ~ x P ~Vx P = x ~P Vx P = ~ x ~P x P = ~Vx ~P Equality x,y NeighborStars(x,y) ^ NeighborStars(y,x) ^ ~(x = y) First-Order Logic • Introduction • Syntax and Semantics • Using First-Order Logic • Summary Using First-Order Logic Rational Agent: TELL(KB,Star(sun)) ASK(KB,Star(sun)) ASK(KB, x Star(x)) First-Order Logic • Introduction • Syntax and Semantics • Using First-Order Logic • Summary Summary Propositional logic talks about facts; predicate logic talks about relations (more expressive) A model is made of objects,relations, and functions. An interpretation maps symbols to the model Complex sentences use connectives and quantifiers Steps to develop a knowledge base. Robert Kowalski Born 1941 in Connecticut. Professor at Imperial College London since 1975. He is well known for his many achievements in logic programming. Co-developed “event calculus’ and “legal reasoning” Exercises Under propositional logic, assume you have 4 propositions named A, B, C, and D (all Boolean). Observe that V is disjunction or OR, & is conjunction or AND, and ~ is negation or NOT. Answer the following: What is the total number of models defined in this language? Is the statement A V B valid? why? Is the statement A V ~A valid? why? How many models are true under the statement B & D ?