300 likes | 460 Views
KNOWLEDGE REPRESENTATION, REASONING AND DECLARATIVE PROBLEM SOLVING. Chitta Baral Arizona State University Tempe, AZ 85287. Introduction. Long term goal of this line of research: Make programs, systems, interfaces and agents behave intelligently. What is intelligence?.
E N D
KNOWLEDGE REPRESENTATION, REASONING AND DECLARATIVE PROBLEM SOLVING Chitta Baral Arizona State University Tempe, AZ 85287.
Introduction • Long term goal of this line of research: Make programs, systems, interfaces and agents behave intelligently.
What is intelligence? • Some characteristics of intelligent entities: - They can reason. - They can make decisions, and plans. - They can learn. - They can communicate: * take commands, queries, requests, preferences; * act, return answers, plans, decisions, control commands.
Reasoning • Reasoning can not be done in vacuum. • We need knowledge to reason with. • Mathematically, a reasoning task can be expressed as: KB |= Conclusion. • Questions: *In what language(s) KB and Conclusion are expressed? *How is |= defined?
Decision making and planning • Need data and knowledge to make decisions and plans. • Need to be able to express what a valid plan is, and when a decision is optimal or preferred. • Thus, need to be able to express preferences and optimality criteria.
Decision making … cont. • Questions: * How is knowledge expressed? * How is the goal of a plan expressed? * How are optimality criteria and preferences expressed? * Given data and knowledge what are the options that are enumerated? (How are `models’ defined?)
Learning • In what language do we express what is learned? • Learning also can not be done (efficiently) in vacuum. Background knowledge and focus are important.
Communication: What vs How? • Request for Coffee: the two secretaries. • Secretary1: Sir, there is no water in the coffee pot; what should I do? • Secretary2: Coffee on desk every morning the boss is in; except in summer, when there is a glass of cold water, …
What vs How? • How: Exact step by step instructions. • What: A high level directive or request whose detailed implementation is left up to the intelligent entity. • The more high level the directives and requests an entity can handle … • How are the high level directives expressed? • Knowledge, and reasoning are also needed to handle them.
The fundamental issue • Need appropriate languages to be able to express knowledge, queries, preferences, high-level directives, etc. • Recall, KB |= Conclusion. • Syntax for KB and Conclusion. • Semantics that defines ‘|=’. • Semantics: Enumerating the ‘models’ of KB.
Some expected properties of Knowledge Calculus! • Must make it easier to add and revise knowledge. • Ordering should not matter that much. • It should be possible that KB |= Concl and KB + New Knowledge |=\= Concl. (This rules out any monotonic logic, such as first-order predicate calculus, to be the language for knowledge representation.)
Some expected properties ..cont. • Must allow default reasoning. • The Tweety flies example. • Birds normally fly. Tweety is a bird. Penguins are birds that do not fly. |= Tweety flies. • KB + Tweety is a penguin |= Tweety does not fly. • The airline databases. (Closed world assumption)
Expected properties … cont. • Intuitive syntax (for the knowledge writer) • Bird(X) => Flies(X) is often more intuitive than ~Bird(X) V Flies(X). • If-then form seems to be quite intuitive. • Nesting is hard. ( ( ) ( ( ) ) )
Expected properties … cont. • Semantics. • Easily definable. • If high complexity, then sound (and useful) approximations. • Some structure • Subclasses with different degrees of complexity and expressiveness.
AnsProlog : a possible candidate • Syntax: A collection of statements of the form A0 or … or Ak B1, …, Bm, not C1, … not Cn.
The Tweety example in AnsProlog Fly(X) Bird(X), not Ab(X). Bird(X) Penguin(X). Ab(X) Penguin(X). Bird(tweety). T |= Fly(tweety). T + Penguin(tweety) |= ~ Fly(tweety).
Transitive Closure in AnsProlog ancestor(X,Y) ancestor(X,Z), parent(Z,Y). ancestor(X,Y) parent(X,Y). parent(a,b). parent(b,c). parent(c,d). parent(e,f).
Differences with … • Prolog: Ordering matters in Prolog; can not handle cycles with not. • Logic Programming: It is a class of languages and many different semantics are proposed for not. • Classical Logic: • is not reverse implication. • Disjunction symbol or is non-classical. • The negation as failure symbol not is non-classical. • The classical negation symbol ~ is also used.
Planning: a DPS example. • The planning problem. • Actions: puton(X,Y), lift, open, a. • Fluents: on(X,Y), lifted, opened, closed, f. • States: state of the world. • Often represented by a set of fluents true in that state. • A simple goal: collection of fluents that need to be true in a state that we want the world to be in.
A simple planning domain initially ~f. initially ~g. b causes f if g. a causes g. finally f. a;b is a plan that achieves the goal.
Planning in AnsProlog. • Describing the initial state. ~ holds(f, 1). ~holds(g, 1). • Describing effect of actions. holds(f,T+1) occurs(b,T), holds(g,T). holds(g,T+1) occurs(a,T). • Describing what does not change. holds(f,T+1) holds(f,T), not ~holds(f,T+1). ~holds(f,T+1) ~holds(f,T), not holds(f,T+1).
Planning in AnsProlog … cont • Enumerating possible plans. other-occurs(A,T) occurs(B,T), A =\= B. occurs(A,T) not other-occurs(A,T). • Eliminating ‘models’ which do not encode a plan. not holds(f, plan-length+1). • All ‘models’ (answer sets) encode a plan.
Building blocks towards a knowledge calculus. • Subclasses and their properties. • Definite, normal, extended, disjunctive. • Acyclic, signed, stratified, call-consistent, order-consistent. • Properties • Existence of consistent answer sets. • Existence of unique answer sets. • Complexity of entailment. • Expressibility of the entailment relation. • Relation between the literals in an answer set and the program.
Properties … cont. • Transforming programs. • Equivalence of programs. • Formal relation with other languages. (classical logic, default logic, etc.) • Splitting programs – modular analysis, and computation of answer sets. • Systematic building of programs from components: program composition.
Example Prop. -- Expressibility • Normal function-free AnsProlog: Pi1P (Co-NP) • Function-free AnsProlog: Pi2 P. • AnsProlog: Pi11
Relation between literals in an answer set and the program. • If ‘f’ is in an answer set ‘A’ of a program P, then there must be a rule in P such that … • If an answer set ‘A’ of a program P satisfies the body of a rule ‘r’ of P then, the head of that rule …
Applications • Reasoning • Reasoning with incomplete information, default reasonong. • Reasoning with preferences and priorities, inheritance hierarchies. • Declarative problem solving • Planning, job-shop scheduling, tournament scheduling. • Abductive reasoning, explanation generations, diagnosis. • Combinatorial graph problems. • Combinatorial optimizations, combinatorial auctions. • Product configuration.
Applications. (Cont.) • Software Engineering: Specification is the program. (rapid prototyping)
Conclusion • Representing knowledge and reasoning with it is of fundamental importance in building intelligent entities. • AnsProlog is a good candidate for this task. • There is now a sizable body of theoretical results, several interpreters, and it has been now used in several applications. • This is not my individual work, but has been done by several researchers over the years, most of it in the last ten years.