lectur ture e 15 logic i intro a and nd pdcl
play

Lectur ture e 15 Logic I Intro a and nd PDCL 1 Announ - PowerPoint PPT Presentation

Computer Science CPSC 322 Lectur ture e 15 Logic I Intro a and nd PDCL 1 Announ nouncem emen ents Marked midterms will be available on Thursday (with solutions) Assignment 3 will be posted on Th. Due Wed. Nov 15 2 late


  1. Computer Science CPSC 322 Lectur ture e 15 Logic I Intro a and nd PDCL 1

  2. Announ nouncem emen ents • Marked midterms will be available on Thursday (with solutions) • Assignment 3 will be posted on Th. • Due Wed. Nov 15 • 2 late days allowed Marks for assignment 3 will lik likely be available • on Th

  3. Lect cture re O Overvi rview • Intro to Logic • Propositional Definite Clauses: • Syntax • Semantics • Proof procedures (time permitting)

  4. Where Are We? Representation Environment Reasoning Stochastic Deterministic Technique Problem Type Arc Consistency Constraint Vars + Search Satisfaction Constraints Static Belief Nets Logics Query Variable Search Elimination Decision Nets Sequential STRIPS Variable Planning Elimination Search Markov Processes First Part of Value the Course 4 Iteration

  5. Where Are We? Representation Environment Reasoning Stochastic Deterministic Technique Problem Type Arc Consistency Constraint Vars + Search Satisfaction Constraints Static Belief Nets Logics Query Variable Search Elimination Decision Nets Sequential STRIPS Variable Planning Elimination Search Back to static Markov Processes problems, but with Value richer 5 Iteration representation

  6. Logics in AI: Similar slide to the one for planning Propositional Definite Semantics and Proof Clause Logics Theory Satisfiability Testing Propositional First-Order (SAT) Logics Logics Hardware Verification Description Production Systems Logics Software Verification Product Configuration Ontologies Cognitive Architectures Semantic Web Video Games Applications Summarization Tutoring Systems Information Extraction 6

  7. Logics in AI: Similar slide to the one for planning Propositional Definite Semantics and Proof Clause Logics Theory Satisfiability Testing Propositional First-Order (SAT) Logics Logics Hardware Verification Description Production Systems Logics Software Verification Product Configuration Ontologies Cognitive Architectures You will know You will know a little Semantic Web Video Games Applications Summarization Tutoring Systems Information Extraction 7

  8. What hat y you al ou alre ready k kno now abo about l logi ogic... • From rom progr programming: Som ome e logi ogical opera operator ors • If ((amount > 0) && (amount < 1000)) || !(age < 30) • ... You know what they mean in a “procedural” way Logi Logic i is the l he language anguage of of M Mat athematics. To define formal structures (e.g., sets, graphs) and to prove statements about those We use logic as a Representation and Reasoning System that can be used to formalize a domain and to reason about it 8

  9. Logi Logic: a a fram ramework for or repr represen entation n & reas reasoni ning • When we represent a domain about which we have only partial (but certain) information, we need to represent…. 9

  10. Logi Logic: a a fram ramework for or repr represen entation n & reas reasoni ning • When we represent a domain about which we have only partial (but certain) information, we need to represent…. • Objects, properties, sets, groups, actions, events, time, space, … • All these can be represented as • Objects • Relationships between objects • Logic is the language to express knowledge about the world this way • http://en.wikipedia.org/wiki/John_McCarthy (1927 - 2011) Logic and AI “The Advice Taker” Coined “Artificial Intelligence”. Dartmouth W’shop (1956) 10

  11. Why hy Logi Logics? • “Natu tura ral” wa way to express know nowledge edge about the world e.g. “Every 101 student will pass the course” Course (c1) Name-of (c1, 101) ∀  → ( z ) student ( z ) & registered ( z , c 1 ) will _ pass ( z , c 1 ) • It is easy to incrementally add knowledge • It is easy to check and debug knowledge • Provides language for asking complex queries • Well understood formal properties 11

  12. Log Logic: A A gene neral al fram ramework f for reas or reasoning General problem: Query answering • tell the computer how the world works • tell the computer some facts about the world • ask a yes/no question about whether other facts must be true Solving it with Logic 1. Begin with a task domain. 2. Distinguish those things you want to talk about (the ontology) 3. Choose symbols in the computer to denote elements of your ontology 4. Tell the system knowledge about the domain 12

  13. Example: Electrical Circuit /down / up 13

  14. /down / up 14

  15. Log Logic: A A gene neral al fram ramework f for reas or reasoning General problem: Query answering • tell the computer how the world works • tell the computer some facts about the world • ask a yes/no question about whether other facts must be true Solving it with Logic 1. Begin with a task domain. 2. Distinguish those things you want to talk about (the ontology) 3. Choose symbols in the computer to denote elements of your ontology 4. Tell the system knowledge about the domain 5. Ask the system whether new statements about the domain are true or false 15

  16. /down / up live_w e_w 4 ? ? lit lit_l 2 ? 16

  17. To D o Def efine a Log a Logic We N e Nee eed • Syntax: specifies the symbols used, and how they can be combined to form legal sentences Know nowledge bas edge base e is a set of sentences in the • language • Semantics: specifies the meaning of symbols and sentences • Reasoning theory or proof procedure: a specification of how an answer can be produced. Sound ound: only generates correct answers with • respect to the semantics Com ompl plet ete: Guaranteed to find an answer if it exists • 17

  18. Propos oposition onal al D Defini nite C e Claus uses We will start with a simple logic • Primitive elements are propositions: Boolean variables that can be { true, false } Two kinds of statements: • that a proposition is true • that a proposition is true if one or more other propositions are true Why only propositions? • We can exploit the Boolean nature for efficient reasoning • Starting point for more complex logics We need to specify: syntax, semantics, proof procedure 18

  19. Lect cture re O Overvi rview • Intro to Logic • Propositional Definite Clauses: • Syntax • Semantics • Proof Procedures

  20. To D o Def efine a Log a Logic We N e Nee eed • Syntax: specifies the symbols used, and how they can be combined to form legal sentences Know nowledge bas edge base e is a set of sentences in the • language • Semantics: specifies the meaning of symbols and sentences • Reasoning theory or proof procedure: a specification of how an answer can be produced. Sound ound: only generates correct answers with • respect to the semantics Com ompl plet ete: Guaranteed to find an answer if it exists • 20

  21. Propositional Definite Clauses: Syntax Definition (atom) Examples: p 1 ; live_l 1 An atom is a symbol starting with a lower case letter Definition (body) A body is an atom or is of the form b 1 ∧ b 2 where b 1 and b 2 are bodies. Examples: p 1 ∧ p 2 ; ok_w 1 ∧ live_w 0 Definition (definite clause) Examples: p 1 ← p 2 ; A definite clause is live_w 0 ← live_w 1 ∧ up_s 2 - an atom or - a rule of the form h ← b where h is an atom (“head”) and b is a body. (Read this as “ h if b ”.) Definition (KB) A knowledge base (KB) is a set of definite clauses 21

  22. atoms definite clauses, KB rules 22

  23. PDCL CL Syntax: more examples Definition (definite clause) A definite clause is - an atom or a rule of the form h ← b where h is an atom (‘head’) and b is a body. - (Read this as ‘ h if b .’) How many of the clauses below are legal PDCL clauses? a) Sunny_today sunny_today ∨ cloudy_today b) c) vdjhsaekwrq high_pressure_system ← sunny-today d) sunny_today ← high_pressure_system ∧ summer e) sunny_today ← high_pressure-system ∧ ¬ winter f) ai_is_fun ← f( time_spent, material_learned) g) 23 summer ← sunny_today ∧ high_pressure_system h)

  24. PDCL CL Syntax: more examples Definition (definite clause) A definite clause is - an atom or a rule of the form h ← b where h is an atom (‘head’) and b is a body. - (Read this as ‘ h if b .’) How many of the clauses below are legal PDCL clauses? a) Sunny_today sunny_today ∨ cloudy_today b) A. 3 c) vdjhsaekwrq high_pressure_system ← sunny-today B. 4 d) sunny_today ← high_pressure_system ∧ summer e) C. 5 sunny_today ← high_pressure-system ∧ ¬ winter f) D. 6 ai_is_fun ← f( time_spent, material_learned) g) 24 summer ← sunny_today ∧ high_pressure_system h)

  25. PDC C Synt ntax ax: m more e e examples es Legal PDC clause Not a legal PDC clause a) Sunny_today sunny_today ∨ cloudy_today b) c) vdjhsaekwrq B. 4 high_pressure_system ← sunny-today d) sunny_today ← high_pressure_system ∧ summer e) sunny_today ← high_pressure-system ∧ ¬ winter f) ai_is_fun ← f( time_spent, material_learned) g) summer ← sunny_today ∧ high_pressure_system h) Do any of these statements mean anything? Syntax doesn't answer this question! 25

Recommend


More recommend