KRR Lecture 1 Intro

Post on 09-Jul-2016

237 views 0 download

description

Facultate anul I master IA calculatoare

Transcript of KRR Lecture 1 Intro

Knowledge Representation and Reasoning University Politehnica of Bucharest Department of Computer Science

Fall 2015

Adina Magda Florea

Master of Science in Artificial Intelligence, 2015-2017

2

Lecture 1 Lecture outline Course goals Grading Textbooks and readings Syllabus Why KR? KR&R Challenges What is KR&R? Logical knowledge representation formalisms FOPL

3

Course goals Provide an overview of existing representational

frameworks developed within AI, their key concepts and inference methods.

Acquiring skills in representing knowledge

Understanding the principles behind different knowledge representation techniques

Being able to read and understand research literature in the area of KR&R

Being able to complete a project in this research area

4

Grading Course grades

Mid-term exam 20% Final exam 30% Projects 25% Laboratory 25%

Class participation Bonus points

Requirements: min 7 lab attendances, min 50% of term activity (mid-term ex, projects, lab)

Academic Honesty Policy It will be considered an honor code violation to give or use someone else's code or written answers, either for the assignments or exam tests. If such a case occurs, we will take action accordingly.

5

Textbooks and Readings Textbooks

• Artificial Intelligence: A Modern Approach (3rd Edition) by Stuart Russell and Peter Norvig Prentice Hall, 2010 http://aima.cs.berkeley.edu/

• Knowledge Representation and Reasoning by Ronald Brachman and Hector Levesque, Morgan Kaufman, 2004

• Artificial Intelligence: Foundations of Computational Agents by David Poole, Alain Mackworth, Cambridge University Press, 2010

http://artint.info/index.html - available online • Computational Intelligence: a Logical Approach by David Poole,

Alain Mackworth, and Randy Goebel, Oxford University Press, 1998

Readings • Reading materials will be assigned to you. • You are expected to do the readings before the class

6

Syllabus 1. General knowledge representation issues 2. Logical agents – Logical knowledge representation and

reasoning • First order predicate logic revisited • Modal logic, logics of knowledge and beliefs • Semantic networks and description logics, reasoning

services • Knowledge representation for the Semantic Web

7

Syllabus 3. Rule based agents

• Rete: Efficient unification • The Soar model, universal subgoaling and chunking • Modern rule based systems

4. Probabilistic agents • Markov decision processes • Bayesian networks • Hidden Markov models • Dynamic Bayesian networks

8

Syllabus 5. Reasoning with actions

• Automatic planning 6. Knowledge representation in learning

• Inductive logic programming

7. Intelligence without representation and reasoning vs. Strong AI • Class Debate

9

Links for the young researcher AI-MAS Links of interest

http://aimas.cs.pub.ro/links

Asociatia Romana de Inteligenta Artificiala http://www.aria-romania.org/

Academic publishing

http://en.wikipedia.org/wiki/Academic_publishing Writing a Scientific Paper

http://www.oup.com/us/samplechapters/0841234620/?view=usa ISI Web of Knowledge

http://isiwebofknowledge.com/ Master Journal List

http://science.thomsonreuters.com/mjl/ Conference Proceedings Citation Index

http://wokinfo.com/products_tools/multidisciplinary/webofscience/cpci/ TED – Ideas worth spreading

http://www.ted.com/

10

Lecture 1 Readings for Lecture 1 AI Grand challenges – cs.curs.pub.ro

AIMA Chapter 7 http://aima.cs.berkeley.edu/newchap07.pdf

11

1. Why KR?

What is knowledge?

We understand by "knowledge" all kinds of facts about the world.

Knowledge is necessary for intelligent behavior (human beings, robots).

In this course we consider representation of knowledge and how we can use it in making intelligent artifacts (based on software, hardware or both).

12

2. KR&R Challenges Challenges of KR&R:

• representation of commonsense knowledge

• the ability of a knowledge-based system to achieve computational efficiency for different types of inferences

• the ability to represent and manipulate uncertain knowledge and information.

13

3. What is KR? Randall Davis, Howard Shrobe, Peter Szolovits, MIT

A knowledge representation is most fundamentally a surrogate, a substitute for the thing itself, used to enable an entity to determine consequences by reasoning about the world.

It is a set of ontological commitments, i.e., an answer to the question: In what terms should I think about the world?

14

What is KR?

It is a theory of intelligent reasoning comprising: • the representation's fundamental

conception of intelligent reasoning; • the set of inferences the representation

supports It is a medium of human

expression, i.e., a language in which we say things about the world.

15

What is KR?

If A represents B, then A stands for B and is usually more easily accessible than B. Symbolic representations Non-symbolic representations

16

4. What is Reasoning?

Reasoning is the use of symbolic representations of some statements in order to derive new ones. Inference – a form of reasoning Use of inferences (rules of inference)

17

5. Models of KRR

Symbolic logic models Rule based models

• Rule based systems • OPS5, MYCIN • CLIPS • RuleML, SWRL

18

Models of KRR

Object oriented (Structured) models • Semantic networks, Frames • Ontologies

Probabilistic models • Probability theory • Probabilistic graphical models Baysian networks – directed graphs Markov networks – undirected graphs

19

PrL, FOPL

Extend PrL, PL

Modal logic Modal operators

Logics of knowledge and belief Modal operators B and K

Dynamic logic Modal operators for actions

Temporal logic Modal operators for time Linear time Branching time

CTL logic Branching time and action BDI logic

Adds agents, B, D, I

Linear model

Structured models

Situation calculus Adds states, actions

Symbol level

Knowledge level Description Logics Subsumption relationships Not directly based on PL

Symbolic logic models

20

Examples

Situation calculus - describes change in FOPL Function Result(Action,State) = NewState At((0,0), S0) ∧ Free(0,1) ∧ Exit(east) → At((0,1),

Result(move_east,S0)) Try to prove the goal At((0,3), _) and determines actions

that lead to it

PL, FOPL

P(a)( x)(P(x) Q(x))

Q(a)∀ →

21

Examples Description logics Woman ≡ Person Female

Mother ≡ Woman ∃hasChild.Person

MotherWithManyChildren ≡ Mother ≥ 3 hasChild

22

Examples

Temporal logic Xp - p is true in the next moment – next p U q - p is true until q becomes true – until

Modal logic ◊ - “possibly true”; � - “necessarily true” ◊ a a = “robots will be able to cry” � b b = “sun will rise tomorrow” ◊ P ≡~�~P

It is possible that it will rain today if and only if it is not necessary that it will not rain today

23

Examples Logics of knowledge and belief FOPL augmented with two modal operators K

and B K(a,T) - a knows T B(a,T) - a believes T Distribution axiom: K(a, T) ∧ K(a, T → V) → K(a, V) "The agent ought to be able to reason with its

knowledge"

24

6. Formal logic

Formal logic is the field of study of entailment relations, formal languages, truth conditions, semantics, and inference.

All propositions/statements are represented as formulae which have a semantics according to the logic in question.

Logical system = Formal language + semantics

Formal logics gives us a framework to discuss different kinds of reasoning.

25

6.1 Logical consequence (entailment)

How can we? Proof centered approach to logical

consequence: the validity of a reasoning process (argument) amounts to there being a proof of the conclusions from the premises. KB |-i ϕ

26

Logical consequence (entailment)

Model centered approach to logical consequence

Models are abstract mathematical structures that provide possible interpretations for each of the objects in a formal language.

Given a model for a language - define what it is for a sentence in that language to be true (according to that model) or not.

Generate new wffs that are necessarily true, given that the old wffs are true

KB |=L ϕ

27

6.2 Model centered approach

Interpretation of a formula

Model of a formula

Entailment or logical consequence

A formula F is a logical consequence of a set of formulas P1,…Pn iff F is true in all interpretations in which P1,…Pn are true.

P1,… Pn |= L F T Formula F is a logical consequence of a set of

formulas P1,…Pn iff P1,…Pn →F is valid. T Formula F is a logical consequence of a set of

formulas P1,…Pn iff P1∧… ∧ Pn ∧ ~F is inconsistent.

28

6.3 Proof centered approach

Theorem, deduction

Formal system Inference rule

Premise set

R ∈ℜ

R , y = y ,...,y x, x,y i = 1,nn1 n

Ri⊆ × ⟨ ⟩ → ∈ ∀F F F ,

S =< A, , , >F A ℜ

Γ = {y , ... , y1 n } E =0 Γ∪ A

E = E x| y E , y x}1 0 0n

n 1{ ∃ ∈ ℜ

≥U E = E x| y E , y x}2 1 1

n

n 1{ ∃ ∈ ℜ

≥U

E ( i 0)i ≥

29

Proof centered approach

Consequence of Γ If then is deductible from Γ

Γ |S x

Theorems - the elements of Ei Demonstration | R x, x is provable

E = ( = )0 A Γ φ

E =0 Γ∪ A x Ei∈

30

6.4 Properties of logical systems

Important properties of logical systems:

Consistency - no theorem of the system contradicts another.

Soundness - the system's rules of proof will never allow a false inference from a true premise. If a system is sound and its axioms are true then its theorems are also guaranteed to be true.

Completeness - there are no true sentences in the system that cannot, at least in principle, be proved in the system.

Some logical systems do not have all three properties. Kurt Godel's incompleteness theorems show that no standard formal system of arithmetic can be consistent and complete.

31

Properties of logical systems A logical system L is complete iff

Γ |= L φ implies Γ | φ

(i.e., all valid formulas are provable)

A logical system L is sound iff

Γ | φ implies Γ |= L φ

(i.e., no invalid formula is provable)

FOPL

Second order logics

32

knowledge propositional first-order

Paul is a man a man(Paul)

Bill is a man b man(Bill)

men are mortal c (∀x) (man(x) ⊃mortal(x))

knowledge first-order second-order

smaller istransitive

(∀ x) ((∀ y) ((∀ z)((<(x,y) ∧ <(y,z) ⊃

<(x,z)))))

transitive(<)

part-of istransitive

(∀ x) ((∀ y) ((∀ z)((part-of(x,y) ∧part-of(y,z) ⊃part-of(x,z)))))

transitive(part-of)

R is transitive iffwhenever R(x,y) andR(y,z) hold, R(x,z)

holds too

not expressible(see however pseudo-

second order)

(∀ R) ((transitive(R) ≡(∀ x) ((∀ y) ((∀ z)((R(x,y) ∧ R(y,z) ⊃

R(x,z)))))))

Higher order logic

First order logic