CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.

Slides:



Advertisements
Similar presentations
Department of Computer Science Undergraduate Events More
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 11, 2013.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Slide 1 Planning: Representation and Forward Search Jim Little UBC CS 322 October 10, 2014 Textbook §8.1 (Skip )- 8.2)
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
CPSC 322, Lecture 21Slide 1 Bottom Up: Soundness and Completeness Computer Science cpsc322, Lecture 21 (Textbook Chpt 5.2) February, 27, 2009.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Decision Theory: Single Stage Decisions Computer Science cpsc322, Lecture 33 (Textbook Chpt 9.2) March, 30, 2009.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) January, 12, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.6) February, 01, 2010.
CPSC 322, Lecture 30Slide 1 Reasoning Under Uncertainty: Variable elimination Computer Science cpsc322, Lecture 30 (Textbook Chpt 6.4) March, 23, 2009.
CPSC 322, Lecture 11Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Computer Science cpsc322, Lecture 11 (Textbook Chpt 4.0 – 4.2) January,
CPSC 322, Lecture 20Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook.
CPSC 322 Introduction to Artificial Intelligence September 20, 2004.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.8) February, 02, 2009.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 21Slide 1 Bottom Up: Soundness and Completeness Computer Science cpsc322, Lecture 21 (Textbook Chpt 5.2) March, 5, 2010.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 31Slide 1 Probability and Time: Markov Models Computer Science cpsc322, Lecture 31 (Textbook Chpt 6.5) March, 25, 2009.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) March, 8, 2010.
CPSC 322, Lecture 24Slide 1 Reasoning under Uncertainty: Intro to Probability Computer Science cpsc322, Lecture 24 (Textbook Chpt 6.1, 6.1.1) March, 15,
Logic: Datalog wrap-up CPSC 322 – Logic 5 Textbook §12.3 March 14, 2011.
Slide 1 Logic: TD as search, Datalog (variables) Jim Little UBC CS 322 – CSP October 24, 2014 Textbook §5.2 and 12.
CPSC 322, Lecture 24Slide 1 Finish Logics… Reasoning under Uncertainty: Intro to Probability Computer Science cpsc322, Lecture 24 (Textbook Chpt 6.1, 6.1.1)
Planning: Wrap up CSP Planning. Logic: Intro CPSC 322 – Planning 3 Textbook §8.4, §5.1 March 2, 2011.
Computer Science CPSC 322 Lecture 25 Logic Wrap Up Intro to Probability Slide 1.
Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Jim Little UBC CS 322 – CSP October 22, 2014.
Computer Science CPSC 322 Lecture 3 AI Applications 1.
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Computer Science CPSC 502 Lecture 6 Finish Planning Start Logic (Ch 5)
Computer Science CPSC 322 Lecture 4 Search: Intro (textbook Ch: ) 1.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 26, 2010.
Department of Computer Science Undergraduate Events More
Logic: Intro & Propositional Definite Clause Logic CPSC 322 – Logic 1 Textbook §5.1 March 4, 2011.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 19Slide 1 (finish Planning) Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt – 5.2) Oct,
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
Slide 1 Propositional Logic Intro, Syntax Jim Little UBC CS 322 – CSP October 17, 2014 Textbook § – 5.2.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 12, 2012.
Logic: Proof procedures, soundness and correctness CPSC 322 – Logic 2 Textbook §5.2 March 7, 2011.
CPSC 322, Lecture 2Slide 1 Representational Dimensions Computer Science cpsc322, Lecture 2 (Textbook Chpt1) Sept, 7, 2012.
Computer Science CPSC 322 Lecture 16 Logic Wrap Up Intro to Probability 1.
Computer Science CPSC 322 Lecture 14 Intro to Logic (5.1, 5.1.1) 1.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 30, 2013.
Constraint Satisfaction Problems (CSPs) Introduction
Logic: TD as search, Datalog (variables)
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 20
Finish Logics… Reasoning under Uncertainty: Intro to Probability
Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19
Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Propositional Definite Clause Logic: Syntax, Semantics, R&R and Proofs
Planning: Representation and Forward Search
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Planning: Representation and Forward Search
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Logic: Top-down proof procedure and Datalog
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 22
Assignment-2 due now Enterprise Architecture Conference Sat. Oct 27
Logic: Domain Modeling /Proofs + Computer Science cpsc322, Lecture 22
Computer Science cpsc322, Lecture 20
Representations & Reasoning Systems (RRS) (2.2)
Planning: Representation and Forward Search
Presentation transcript:

CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from Chpt 12) March, 6, 2009

CPSC 322, Lecture 23Slide 2 Lecture Overview Recap Top Down TopDown Proofs as search Datalog

CPSC 322, Lecture 22Slide 3 Top-down Ground Proof Procedure Key Idea: search backward from a query G to determine if it can be derived from KB.

CPSC 322, Lecture 22Slide 4 Top-down Proof Procedure: Basic elements Notation : An answer clause is of the form: yes ← a 1 ∧ a 2 ∧ … ∧ a m Rule of inference (called SLD Resolution) Given an answer clause of the form: yes ← a 1 ∧ a 2 ∧ … ∧ a m and the clause: a i ← b 1 ∧ b 2 ∧ … ∧ b p You can generate the answer clause yes ← a 1 ∧ … ∧ a i-1 ∧ b 1 ∧ b 2 ∧ … ∧ b p ∧ a i+1 ∧ … ∧ a m Express query as an answer clause (e.g., query a 1 ∧ a 2 ∧ … ∧ a m ) yes ←

CPSC 322, Lecture 22Slide 5 Successful Derivation : When by applying the inference rule you obtain the answer clause yes ←. Query: a (two ways) yes ← a. yes ← a. a ← e ∧ f. a ← b ∧ c.b ← k ∧ f. c ← e.d ← k. e. f ← j ∧ e. f ← c. j ← c.

CPSC 322, Lecture 23Slide 6 Lecture Overview Recap Top Down TopDown Proofs as search Datalog

CPSC 322, Lecture 11Slide 7 Systematic Search in different R&R systems Constraint Satisfaction (Problems): State: assignments of values to a subset of the variables Successor function: assign values to a “free” variable Goal test: set of constraints Solution: possible world that satisfies the constraints Heuristic function: none (all solutions at the same distance from start) Planning (forward) : State possible world Successor function states resulting from valid actions Goal test assignment to subset of vars Solution sequence of actions Heuristic function empty-delete-list (solve simplified problem) Logical Inference (top Down) State answer clause Successor function states resulting from substituting one atom with all the clauses of which it is the head Goal test empty answer clause Solution start state Heuristic function ………………..

CPSC 322, Lecture 23Slide 8 Search Graph a ← b ∧ c. a ← g. a ← h.b ← j. b ← k. d ← m. d ← p. f ← m. f ← p. g ← m. g ← f. k ← m. h ← m. p. Prove: ?← a ∧ d. Heuristics?

CPSC 322, Lecture 23Slide 9 Lecture Overview Recap Top Down TopDown Proofs as search Datalog

CPSC 322, Lecture 23Slide 10 Representation and Reasoning in Complex domains In complex domains expressing knowledge with propositions can be quite limiting up_s 2 up_s 3 ok_cb 1 ok_cb 2 live_w 1 connected_w 1 _w 2 up( s 2 ) up( s 3 ) ok( cb 1 ) ok( cb 2 ) live( w 1 ) connected( w 1, w 2 ) It is often natural to consider individuals and their properties There is no notion that up_s 2 up_s 3 live_w 1 connected_w 1 _w 2

CPSC 322, Lecture 23Slide 11 What do we gain…. By breaking propositions into relations applied to individuals? Express knowledge that holds for set of individuals (by introducing ) live(W) <- connected_to(W,W1) ∧ live(W1) ∧ wire(W) ∧ wire(W1). We can ask generic queries (i.e., containing ) ? connected_to(W, w 1 )

CPSC 322, Lecture 23Slide 12 Datalog vs PDCL (better with colors)

CPSC 322, Lecture 23Slide 13 Datalog: a relational rule language A variable is a symbol starting with an upper case letter A constant is a symbol starting with lower-case letter or a sequence of digits. A predicate symbol is a symbol starting with lower-case letter. A term is either a variable or a constant. It expands the syntax of PDCL….

CPSC 322, Lecture 23Slide 14 Datalog Syntax (cont’) An atom is a symbol of the form p or p(t 1 …. t n ) where p is a predicate symbol and t i are terms A definite clause is either an atom (a fact) or of the form: h ← b 1 ∧… ∧ b m where h and the b i are atomic symbol (Read this as ``h if b.'') A knowledge base is a set of definite clauses

CPSC 322, Lecture 23Slide 15 Datalog: Top Down Proof Extension of TD for PDCL. How do you deal with variables? Example: in(alan, r123). part_of(r123,cs_building). in(X,Y) <- part_of(Z,Y) & in(X,Z). yes <- in(alan, cs_building). Query: in(alan, cs_building).

CPSC 322, Lecture 23Slide 16 Datalog: queries with variables in(alan, r123). part_of(r123,cs_building). in(X,Y) <- in(X,Z). & part_of(Z,Y) Yes(X1) <- in(alan, X1). Query: in(alan, X1).

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

CPSC 322, Lecture 2Slide 18 Big Picture: R&R systems Environment Problem Query Planning Deterministic Stochastic Search Arc Consistency Search Value Iteration Var. Elimination Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes Var. Elimination Static Sequential Representation Reasoning Technique SLS

CPSC 322, Lecture 4Slide 19 Learning Goals for today’s class You can: Define/read/write/trace/debug the TopDown proof procedure (as a search problem) Represent simple domains in Datalog Apply TopDown proof procedure in Datalog

CPSC 322, Lecture 23Slide 20 Midterm review (without outlier who did 0%) Average 72% Best 93%, Worst 23% Only three <50% How to learn more from midterm Carefully examine your mistakes (and our feedback) If you still do not see the correct answer/solution go back to your notes, the slides and the textbook If you are still confused come to office hours with specific questions