1 / 18

CS182 Intelligent Machines: Reasoning, Actions and Plans

CS182 Intelligent Machines: Reasoning, Actions and Plans. Section 4. Reminder -- CSP for course requirements (1). Alby -Bach University (ABU) wants to start a new degree program: B.S in Judgment Day Prevention (JDP). Suppose the degree program is associated with the following courses:

gabi
Download Presentation

CS182 Intelligent Machines: Reasoning, Actions and Plans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS182 Intelligent Machines: Reasoning, Actions and Plans Section 4

  2. Reminder -- CSP for course requirements (1) Alby-Bach University (ABU) wants to start a new degree program: B.S in Judgment Day Prevention (JDP). Suppose the degree program is associated with the following courses: • 15-211 Fundamental Data Structures and Algorithms • 15-212 Principles of Programming • 15-381 Artificial Intelligence: Representation and Problem-Solving • 15-681 Machine Learning • 80-310 Logic and Computation • 21-484 Graph Theory • 70-122 Accounting • 70-311 Organizational Behavior • 19-601 Information Warfare

  3. CSP for course requirements (2) In order to graduate from the degree program, one must complete the following four requirements: • Algorithms Requirement: (15-211 AND 15-212) OR (15-211 AND 15-381) OR (15-681 AND 21-484) • Machine Learning Requirement: 15-381 OR 15-681 OR 80-310 • Communications Requirement: 21-484 OR 70-311 OR 70-122 • Information Warfare Requirement: 15-381 OR 19-601

  4. CSP for course requirements (3) In addition, the department imposes the following restrictions: • Information Aggressiveness Restriction: So that they can’t make their programs TOO smart, students can take only one class from the set 15-381, 15-681, and 19-601. • Basic Arithmetic Restriction: Students can’t take both 15-211 and 70-122. • Organization Restriction: Students can’t take both 21-484 and 70-311. • Finally, courses cannot be used to count towards multiple graduation requirements - so if you use 15-381 to fulfill part of the Algorithms requirement it can’t count towards either the Machine Learning Requirement or the Information Warfare Requirement.

  5. Model the problem as CSP (1) • What are the variables? • AR_1 • AR_2 • MLR • CR • IWR

  6. Model the problem as CSP (2) • What are the domains? • AR_1: 15-211, 15-212, 15-381, 15-681, 21-484 • AR_2: 15-211, 15-212, 15-381, 15-681, 21-484 • MLR: 15-381, 15-681, 80-310 • CR: 21-484, 70-122, 70-311 • IWR: 15-381, 19-601

  7. Model the problem as CSP (3) • What are the constraints? • IAR: 1 of 15-381, 15-681, and 19-601 can be assigned to the 5 variables. • BAR: 1 of 15-211 and 70-122 can be assigned to the 5 variables • OR: 1 of 21-484 and 70-311 can be assigned to the 5 variables • No double counting: if a variable is assigned to one variable it can’t be assigned to another variable • Hidden constraint between AR_1 and AR_2

  8. Depth-First Search for CSP • AR_1: 15-211, 15-212, 15-381, 15-681, 21-484 • AR_2: 15-211, 15-212, 15-381, 15-681, 21-484 • MLR: 15-381, 15-681, 80-310 • CR: 21-484, 70-122, 70-311 • IWR: 15-381, 19-601 AR: (15-211 & 15-212) |(15-211 & 15-381) |(15-681 &21-484) MLR: : 15-381 OR 15-681 OR 80-310 CR: 21-484 OR 70-311 OR 70-122 IWR: 15-381 OR 19-601 Only one of 15-381, 15-681, and 19-601; Only one of 15-211 and 70-122; Only one of 21-484 and 70-311 No double credit AR_1 = 15-211 AR_2 = 15-212 MLR = 15-381 MLR = 15-681 MLR = 80-310 CR = 21-484 CR = 70-122 CR = 70-311 CR = 21-484 CR = 70-122 CR = 70-311 CR = 21-484 IWR= 15-381 IWR= 19-601 IWR= 15-381 IWR= 19-601 IWR= 15-381 IWR= 19-601 IWR= 15-381 IWR= 19-601 IWR= 15-381

  9. Depth-First Search + Forward Checking AR: (15-211 & 15-212) |(15-211 & 15-381) |(15-681 &21-484) MLR: : 15-381 OR 15-681 OR 80-310 CR: 21-484 OR 70-311 OR 70-122 IWR: 15-381 OR 19-601 Only one of 15-381, 15-681, and 19-601; Only one of 15-211 and 70-122; Only one of 21-484 and 70-311 No double credit • AR_1: 15-211, 15-212, 15-381, 15-681, 21-484 • AR_2: 15-211, 15-212, 15-381, 15-681, 21-484 • MLR: 15-381, 15-681, 80-310 • CR: 21-484, 70-122, 70-311 • IWR: 15-381, 19-601 AR_1 = 15-211 Backtrack here! AR_2 = 15-212 MLR = 15-381 MLR = 15-681 …

  10. Course Scheduling with Propositional Logic • A simplified version of course scheduling (in natural language): • Communications Requirement: 21-484 OR 70-311 OR 70-122 • Information Warfare Requirement: 15-381 OR 19-601 • Students can graduate as long as both requirements are satisfied

  11. Representation in Propositional Logic • 21-484 70-31170-122 CR • 15-38119-601 IWR • CR IWRGraduate!

  12. Theorem Proving • A student took 70-311 and 15-381 but not 19-601, prove that this student can graduate

  13. A Resolution Algorithm • Prove KBis equivalent to prove KBis true, and thus equivalent to prove KBis unsatisfiable! • Resolution Algorithm: Prove by Contradiction - Get the set of clauses in the CNF representation of KB - Whenever possible, apply the resolution rule to pairs of clauses - If an empty clause is produced, KBis false and KB

  14. Theorem Proving with Resolution • Knowledge Base: • 21-484 70-31170-122 CR • 15-38119-601 IWR • CR IWR Graduate! • 15-381 • 19-601

  15. Step 1: Convert into CNF • 21-484 70-31170-122 CR ( 21-484CR) ( 70-311CR) ( 70-122 CR) • 15-38119-601IWR (15-381 IWR) (19-601IWR) • CR IWRGraduate CRIWR Graduate • , 15-381, 19-601 • Graduate

  16. Step 2: Apply Resolution Rules • Clauses: • 21-484 CR • 70-311CR • 70-122CR • 15-381 IWR • 19-601IWR • CR IWR Graduate • 70-311 • 15-381 • 19-601 • Graduate CR Graduate IWR {}

  17. WalkSAT(Clauses, max_flips, p) • Choose a random model m (randomassignment to each variable) • If m satisfies constraints • Return m • Else, while num_flips < max_flips • With probability p choose a variable to “flip” randomly • With probability 1-p choose flip the variable that minimizes number of unsatisfied constraints • Return null

  18. “WalkSAT” for course scheduling • What does it mean to “flip”? • What are the input clauses? • Example: • Assume our random assignment is just the first value from the domain for each: AR_1: 15-211,AR_2: 15-211 , MLR: 15-381, CR: 21-484, IWR: 15-381 • If we draw random<p, we choose randomly on of these to flip (for example, flip 15-211 to 15-212 • If we draw random>p we need to find the change that will minimize the number of unsatisfied constraints (try at home)

More Related