Download presentation
Presentation is loading. Please wait.
Published byMyrtle Pitts Modified over 8 years ago
1
Knowledge Representation Lecture 2 out of 5
2
Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process to do useful tasks We can do this in various ways Here we are looking at LOGIC based approaches … founded on mathematics and philosophy
3
Syntax and Semantics Syntax – what it looks like Semantics – what it means
4
Syntax eg rules of grammar for natural language – more formal (and restricted) for most logical notations eg the operator ^ takes 2 operands like so: – Valid: P ^ Q – Invalid: ^P Syntax specifies the allowed symbols and arrangements of those symbols
5
Semantics What does P^Q mean? – It means that P is true and Q is true. The same division between syntax and semantics can be seen in natural language – ‘They can fish’ has 2 meanings yet is syntactically identical.
6
Interpretation P ^ Q means that P is true AND Q is true But what do P and Q represent? This is interpretation – The symbol => (implies) takes 2 arguments (syntax) – A=>B means that either A is false, or B is true (semantics) – Let A represent ‘a score less than 40%’ and B be ‘fail’ (interpretation)
7
World Models “all models are wrong, but some are useful.” Box, George E. P.; Norman R. Draper (1987). Empirical Model-Building and Response Surfaces, p. 424, Wiley. ISBN 0471810339. A ‘world model’ is just that – usually a simplification of the real world Is the UK a country? Are cats carnivores? Is the world a sphere? we need the computer to 'know' just enough to do useful work. The model will never be accurate in every detail, nor do we need it to be.
8
What do we want a KRL to be? KRL = Knowledge Representation Language Expressive – can say what we want to say Effective – Can infer (see last week) new knowledge Efficient – doesn’t take too much processing power Explicit - Understandable These are criteria for a KR language – a way of writing down a model of the world.
9
Expressive In increasing level of complexity: – Bob is a student – students are types of people – all students have student IDs – by default birds can fly, – a child has exactly 2 parents, – Nothing is both animal AND plant – A bottle of wine has only one vintage year – Your national insurance number uniquely identifies you
10
Effective ‘new from old’: can infer things from what you have written down. Eg – Students are types of people, – SO if bob is a student – THEN bob is a person A more complex example – if ‘person A’ has the same National Insurance number as ‘person B’ then ‘A’ and ‘B’ identify the same person.
11
Efficient Efficient reasoning (inference) should be possible in reasonable time and computational power. There is a trade off between expressiveness and efficiency Some parts of logic are theoretically sound but in practice not even computable in infinite time!
12
Explicit An explicit KRL is one that explains its reasoning, and justifies its answer. The KRL should be natural and easy to understand. If you have just inferred something, you should be able to answer the question ‘why’
13
LOGIC Here we shift gear and start talking about the ‘nuts and bolts’ af KRLs: Objects – a symbol representing something in the real world – ‘alice’, ‘bob’ … Variables – represent object eg A, B etc where A could ‘stand for’ any object ‘alice’, ‘bob’ etc until it is BOUND. Terms – variables and objects
14
LOGIC (ctd) Predicates – properties. – Singled valued: is_student(bob) – Multiple valued: taller_than(bob, alice) atomic formula – terms and predicates negation NOT (¬) Literal – atomic formula and (optional) negation
15
LOGIC (ctd) Connectives – AND, OR, NOT, IMPLIES – (^ V ¬ => respectively) Quantifiers – Universal (for all) ‘all carnivores eat meat’ (but could eat other things) – Existential (there exists) ‘somebody knows the answer’. (but could be others too) Well formed formula (wff) – or expression. – A 'sentence' comprised of literals with (optional) connectives and (optional) quantifiers.
16
LOGIC (ctd) First order logic (FOL) contains all of this. – FOL and first order predicate logic (FOPL) are used more or less interchangeably Propositional logic contains all of this except quantifiers and (crucially) variables.
17
Reasoning (or Inference) Reminder: Inference is manipulation of symbols, using rules of language, to prove other sentences. – If A is true and A=>B then B is true – If B is false and A=>B then A cannot be true – If A is true and A=>B and B=> C then C is true
18
Sound reasoning SOUND – “If we infer it, is it true?” – given true premises, everything we infer is true – FOL and propositional logic are both sound.
19
Complete reasoning COMPLETE – “If it's true, can we infer it?” – a=>b necessarily means !a OR b – Can we formally prove this? – FOL and propositional logic are both complete.
20
The Godel Sentence “This sentence cannot be proved” If it is true, then the language is INCOMPLETE If it is false, then the language is UNSOUND So, sufficiently expressive languages cannot be both sound and complete First order logic is not that expressive, so it can be both sound and complete
21
Decidable reasoning DECIDEABLE – ”Is it true?” – Propositional logic is decideable. – FOL is actually semidecideable if it's necessarily true (or false), we will be able to tell, but it may take an awfully long time. If on the other hand we don't have enough evidence, it may take (literally) forever. The trouble is how to tell one from the other?
22
Coming up next week Real KR techniques – Semantic Nets – Frames
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.