csce 781 ailog for ch.5

14
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 781 AILog for Ch.5 Spring 2011 Marco Valtorta [email protected]

Upload: lazaro

Post on 09-Jan-2016

30 views

Category:

Documents


3 download

DESCRIPTION

CSCE 781 AILog for Ch.5. Spring 2011 Marco Valtorta [email protected]. AILog Examples for Ch.5 [P]. elect_prop.ail electrical wiring example; Example 5.5 from Section 5.2 elect_ask.ail electrical wiring example with askables; Example 5.10 from Section 5.3.2 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

CSCE 781AILog for Ch.5

Spring 2011Marco Valtorta

[email protected]

Page 2: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_prop.ail electrical wiring example; Example 5.5 from Section 5.2elect_ask.ail electrical wiring example with askables; Example 5.10 from Section 5.3.2elect_bug.ail the buggy electrical wiring knowledge base from Example 5.14 in Section 5.3.4elect_bug2.ail the buggy electrical wiring example from Exercise 5.6elect_bug3.ail a buggy electrical wiring example, which fails to prove lit_l2, but should succeedelect_cbd.ail electrical wiring example for consistency-based diagnosis; Example 5.20 in Section 5.4.3elect_naf.ail electrical wiring example with negation as failure; Example 5.26 in Section 5.5beach.ail default reasoning about swimming at beaches; Example 5.27 in Section 5.5.1 bronchitis.ail diagnosis Example 5.30 in Section 5.6 elect_abd.ail electrical wiring example with abduction; Example 5.31 in Section 5.6plumbing.ail plumbing domain from Exercise 5.2

Page 3: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_prop.ail electrical wiring example; Example 5.5 from Section 5.2•This is exactly the KB of Ex.5.5.•The questions of Example 5.6 are answered as in the book (except that longer answers are given in place of yes and no).•This KB is different from the KB in slide 12 for Lecture 5.1 provided by Poole.

Page 4: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_ask.ail electrical wiring example with askables; Example 5.10 from Section 5.3.2•This is the same as the KB of example 5.5 without assertions (facts) for the switch positions, which are now made askable. Note that there is no constraint stating that up and down switch positions are mutually exclusive.

Page 5: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_bug.ail the buggy electrical wiring knowledge base from Example 5.14 in Section 5.3.4•The incorrect rule is:live_w1 <- live_w3 & up_s3.(instead of up_s1)•Example 5.15 uses the same KB as example 5.5 (i.e., elec_prop.ail.). However, now we assume that the world has s2 down, and that the KB designer made a mistake in the axiomatization, by forgetting to include the fact down_s2

Page 6: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_bug2.ail the buggy electrical wiring example from Exercise 5.6•Ask lit_l1. It should be false (i.e. it is false in the intended interpretation), but AILog states it can be proved.•The error can be found by using how. (It is “up_s1.”)

Page 7: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_bug3.ail a buggy electrical wiring example, which fails to prove lit_l2, but should succeed.•Use whynot lit_l2.•ok_cb1. is missing.

Page 8: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_cbd.ail electrical wiring example for consistency-based diagnosis; Example 5.20 in Section 5.4.3•Add assumables: circuit breakers, switches, and lights are OK.•Add integrity constraints (impossibility axioms) for dark and lit•Tell AILog that the switches are all up and that both lights are dark, by answering questions about the corresponding askable atoms.•create_nogoods creates the conflicts•nogoods displays the conflicts

Page 9: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_naf.ail electrical wiring example with negation as failure; Example 5.26 in Section 5.5•Negation as failure is used in the following rules:

– ok_l1 <- ~broken_l1.– ok_l2 <- ~broken_l2.– ok_cb1 <- ~broken_cb1.– ok_cb2 <- ~broken_cb2.– down_s1 <- ~up_s1.– down_s2 <- ~up_s2.– down_s3 <- ~up_s3.

•Defaults: switches up, circuit breakers ok, lights ok.•To describe the situation in the figure, the user only needs to specify up_s2 and up_s3.

Page 10: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

beach.ail default reasoning about swimming at beaches; Example 5.27 in Section 5.5.1•Non-monotonic reasoning

Page 11: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]bronchitis.ail abductive (explanation-based) diagnosis Example 5.30 in Section 5.6

•The KB in the file has two extra assumables: influenzaCausesBronchitis andsmokingCausessBronchitis. This leads to two diagnoses for wheezing & fever: [influenza, influenzaCausessBronchitis] and [influenza, smokes, smokingCausesBronchitis], rather than just [influenza] as in example 5.30

.

bronchitis <- influenza & influenzaCausesBronchitis.bronchitis <- smokes & smokingCausesBronchitis.coughing <- bronchitis.wheezing <- bronchitis.fever <- influenza.soreThroat <- influenza.false <- smokes & nonsmoker.assumable smokes.assumable nonsmoker.assumable influenza.assumable influenzaCausesBronchitis.assumable smokingCausesBronchitis.

bronchitis <- influenza.bronchitis <- smokes.coughing <- bronchitis.wheezing <- bronchitis.fever <- influenza.soreThroat <- influenza.false <- smokes & nonsmoker.assumable smokes.assumable nonsmoker.assumable influenza.

Page 12: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

Abduction with Horn Clauses and Assumables

Page 13: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

elect_abd.ail electrical wiring example with abduction; Example 5.31 in Section 5.6•Many more axioms, because in addition to normal behavior, fault models must be provided.•E.g., for l1:

lit_l1 <- live_w0 & ok_l1.dark_l1 <- broken_l1.dark_l1 <- dead_w0.

•Instead of just:lit_l1 <- light_l1 & live_l1 & ok_l1.

Page 14: CSCE 781 AILog for Ch.5

UNIVERSITY OF SOUTH CAROLINAUNIVERSITY OF SOUTH CAROLINADepartment of Computer Science and

Engineering

Department of Computer Science and Engineering

AILog Examples for Ch.5 [P]

plumbing.ail plumbing domain from Exercise 5.2.

pressurised_p1.pressurised_p2 <- on_t1 & pressurised_p1.flow_shower <- on_t2 & pressurised_p2.wet_bath <- flow_shower.flow_d2 <- wet_bath & unplugged_bath.flow_d1 <- flow_d2.on_t1.on_t2.unplugged_bath.

These are the axioms for the bath only. You need to add axioms for the sink. You also need to add askables.