Modular Answer Set Programming. Introduction One common answer set programming (ASP) methodology is to: Encode the problem Enumerate possible solutions.

Slides:



Advertisements
Similar presentations
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Advertisements

Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
 Tournament brackets  Multistage events  Seeding  Schedules  Printing  Reports  Export to Internet
Knowledge Representation and Reasoning (KR): A vibrant subfield of AI Jia You.
Lake Highlands Soccer Association Game Scheduling Sherif Khalifa Senior Design Project May 9, 2008.
An Introduction to Artificial Intelligence. Introduction Getting machines to “think”. Imitation game and the Turing test. Chinese room test. Key processes.
1 Constraint-based Round Robin Tournament Planning Martin Henz National University of Singapore.
Brian Stewart Tech 551 Module 3 Keith Delorme September 7, 2011.
Sports Scheduling An Assessment of Various Approaches to Solving the n-Round Robin Tournament Noren De La Rosa Mallory Ratajewski.
March Madness  It’s tournament time and its going to be awesome baby!! Throughout this webquest you are going to realize how we use graph theory in our.
Programming with Constraints Jia-Huai You. Subject of Study Constraint Programming (CP) studies the computational models, languages, and systems for solving.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
Ontologies and the Semantic Web by Ian Horrocks presented by Thomas Packer 1.
1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation.
Decision Tree Algorithm
Learning Shape in Computer Go David Silver. A brief introduction to Go Black and white take turns to place down stones Once played, a stone cannot move.
Knowledge Acquisitioning. Definition The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Using answer set programming to answer complex queries Chitta Baral (joint work with Michael Gelfond and Richard Scherl) Arizona State University Tempe,
© J. Christopher Beck Lecture 20: Sports Scheduling.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
© J. Christopher Beck Lecture 22: Local Search for Sports Scheduling.
The Design and Analysis of Algorithms
KNOWLEDGE REPRESENTATION, REASONING AND DECLARATIVE PROBLEM SOLVING Chitta Baral Arizona State University Tempe, AZ
Constraint Logic Programming (CLP) Luis Tari March 10, 2005.
Algorithm design techniques
ANSWERING CONTROLLED NATURAL LANGUAGE QUERIES USING ANSWER SET PROGRAMMING Syeed Ibn Faiz.
17.5 Rule Learning Given the importance of rule-based systems and the human effort that is required to elicit good rules from experts, it is natural to.
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
Chapter 19 Linear Programming McGraw-Hill/Irwin
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
I. Pribela, M. Ivanović Neum, Content Automated assessment Testovid system Test generator Module generators Conclusion.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Contact Profile
RMIT University; Taylor's College1 Lecture 6  To apply the Principle of Mathematical Induction  To solve the Towers of Hanoi puzzle  To define a recurrence.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Programming Concepts Chapter 3.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
© J. Christopher Beck Lecture 21: Sports Scheduling 1.
CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 10: Applied Mathematical - Logical Knowledge Riddle/Puzzle.
Sports Scheduling Written by Kelly Easton, George Nemhauser, Michael Trick Presented by Matthew Lai.
Problem Solving Approach & SalesForce. Interacting with your Client Understand the fundamental problem that the client is trying to convey. –Ask questions.
Answering Complex Questions and Performing Deep Reasoning in Advance QA Systems – Reasoning with logic and probability Chitta Baral Arizona State university.
1 CS 385 Fall 2006 Chapter 1 AI: Early History and Applications.
© J. Christopher Beck Lecture 21: IP and CP Models for Sports Scheduling.
HIGH-LEVEL Language Revision Guide By Tom. Declarative programming The computer is given a set of facts......And a Goal This finds all members with 2G.
1 Constraint-based Round Robin Tournament Planning Martin Henz National University of Singapore.
Presented By: Miss N. Nembhard. Relation Algebra Relational Algebra is : the formal description of how a relational database operates the mathematics.
Games Week 4 Lydia Kang. I. Create Polynomial The students will form group of 3-4. Each group will receive one die and the worksheet. The student will.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Problem Set 2 Problem #6 By: Zac Snively. Question Presented  In a league that has 6 teams, every team plays every one of the other teams twice in a.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
1 Authorization Sec PAL: A Decentralized Authorization Language.
 Starts in february – one month to complete it.  Done it for seven years.  The schdule for (the first year) was ”awful”.  In the first year.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Data Structures and Algorithm Analysis Dr. Ken Cosh Linked Lists.
What is ASP? CSCE 330 Programming Language Presentation JANICE NEIGHBOR, MICHAEL RICKABAUGH, DAVID THOMAS
Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.
The material in this lecture should be review. If you have not seen it before, you should be able to learn it quickly – and on your own. So we are going.
Algorithms and Problem Solving
Hybrid BDD and All-SAT Method for Model Checking
CSC Modeling with FD Constraints
Objectives In this chapter, you will:
Recursively Defined Functions
An Introduction to Support Vector Machines
The Alpha-Beta Procedure
IPC144 Introduction to Programming Using C Week 4 – Lesson 2
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Presentation transcript:

Modular Answer Set Programming

Introduction One common answer set programming (ASP) methodology is to: Encode the problem Enumerate possible solutions Test and eliminate non-solutions Size of state space of the problem can limit ASP solvers to find solutions in a reasonable amount of time. Can we somehow split the representation and solve in parts?

Illustration of Splitting Consider an AnsProlog program  =E 1  E 2  T 1  T 2, where E 1, E 2 are enumeration parts and T 1, T 2 are test parts. 1. Split  into  1 = T 1  E 1 and  2 = T 2  E Compute answer sets of  For each answer set A i of  1, compute the answer sets of  2  A i.

Illustration of Splitting Assume that T 1 enumerates n binary atoms and T 2 enumerates m binary atoms, and T 1  E 1 has only a small number k of solutions A i. Finding answer sets of  could involve a search space of 2 m+n. As for splitting,  1 can involve search space of 2 n and k search spaces of 2 m for  2  A i.

Idea – modular ASP A declarative language that builds on top of AnsProlog. Large programs can be broken into modules. Enhance readability and project management. Communication between modules are done by “import rules”.

ASP modules An ASP rule is of the form: An ASP module consists of: a name, a set of parameters, a collection of ASP rules, and a collection of ASP import rules.

Instantiation of Modules Suppose P is the name of an ASP module and P has the following rule: date(1..N). P(N=9) is an instantiation of P which indicates that the value of N becomes 9 in module P.

Modular ASP by examples Suppose P 1 is the following ASP module that contains the predicate p(X,Y,Z), which is declared as for export. % module P1 p(c,d,a). p(e,f,a) :- not p(g,h,a). p(g,h,a) :- not p(e,f,a). Module P 1 has two answer sets: { p(c,d,a), p(e,f,a)} and { p(c,d,a), p(g,h,a)}

Import rule (a) Import predicates that exist in all answer sets of module P to module P’, based on some criteria. Example: Suppose P 2 is an ASP module that contains an import rule r of the form (a) that refers to P 1. % import rule r q(X,Y) :- P1.p(X,Y,a). % answer sets of P1 are { p(c,d,a), p(e,f,a)} and { p(c,d,a), p(g,h,a)} The predicate p(c,d,a) exists in all answer sets of P 1. Therefore, the extracted set of r is {q(c,d)}.

Import rule (b) Import predicates that exist in any answer sets of module P to module P’, based on some criteria. Suppose P 3 is an ASP module that contains an import rule r of the form (b) that refers to P 1. % import rule r *q(X,Y) :- P1.p(X,Y,a). % answer sets of P1 are {p(c,d,a), p(e,f,a)} and { p(c,d,a), p(g,h,a)} By filtering the answer sets of P 1 using r, the extracted set of r is { { q(c,d), q(e,f) }, { q(c,d), q(g,h) } }.

Import rule (c) Import predicates that exist in any answer sets of module P to module P’ based on some criteria, and numerate the predicates to form a singleton set of predicates. Suppose P 4 is an ASP module that contains an import rule r of the form (c) that refers to P 1. % import rule r q(#,X,Y) :- P1.p(X,Y,a). % answer sets of P1 are {p(c,d,a), p(e,f,a)} and { p(c,d,a), p(g,h,a)} The extracted set of r is { q(1,c,d), q(1,e,f), q(2,c,d), q(2,g,h) }.

ACC example Description of ACC college basketball tournament problem Nine college teams play over a period of nine weeks in the Two games per week: one on a weekday and one on a weekend On each game day: 8 teams play either at home or away Double round-robin: every team plays against every other team twice, once at home and once away. Mirroring dates: teams who play on day d will play again on day d *8*9 atoms of order of schedules!

ACC example Attempted to encode the problem using a direct encoding approach No returned solutions by the currently most efficient AnsProlog solvers - Smodels and DLV Encode the problem using ASP modules Solutions are returned in a reasonable amount of time

Conclusion Modular ASP is a simple extension to AnsProlog. Can write AnsProlog modules and import from one module to another. Difficult problems can be solved with certain modularization. Future Work: incorporate different ASP solvers and other declarative languages such as Prolog to modular ASP.