Docsity

Semantic net using prolog, Exercises of Artificial Intelligence

Partial preview of the text

Download Semantic net using prolog and more Exercises Artificial Intelligence in PDF only on Docsity!

Knowledge

representation

The importance of

knowledge representation

 Contrary to the beliefs of early workers in AI, experience has shown that Intelligent Systems cannot achieve anything useful unless they contain a large amount of real-world - probably domain-specific - knowledge.  Humans almost always tackle difficult real-world problems by using their resources of knowledge - "experience", "training" etc.

Knowledge rep. formalisms

 Production rules  Formal logic, and languages based on it (e.g. PROLOG)  Structured objects:  Semantic nets (or networks)Frames , and object-orientated programming, which was derived from frames  Other similar objects, such as Scripts

Knowledge rep. formalisms

 We have already examined Production rules (or "Rule-based reasoning") in some detail. We will now look at some other formalisms.

languages based on formal

logic

 Logic, which was originally just the study of what distinguishes sound argument from unsound argument, has developed (over many centuries) into a powerful and rigorous system whereby true statements can be discovered, given other statements that are already known to be true.

languages based on formal

logic

 From the point of view of AI, and other branches of computer science, logic is valuable because it provides  a language, for knowledge representation, with a well-defined, non-ambiguous, semantics (i.e. system of meanings).  a well-defined proof theory; there are reliable techniques in formal logic for establishing that an argument (i.e. a set of deductions from statements known to be true) is sound.

languages based on formal

logic

 There are various forms of logic, of which the simplest is probably propositional calculus (also known as sentence logic), and the most commonly used in AI is first order predicate calculus (also known as first order predicate logic).

Propositional calculus

 Propositional calculus is built out of simple statements called propositions which are either true or false.  Example: “London is a city” is a proposition. So is “Ice is hot”.

Propositional calculus

 There are standard symbols for these:

stands for “and”,

 stands for “or”,

 stands for “not”,

 stands for “if … then …”,

 stands for “if and only if”.

Logic: propositional

calculus

 example of a statement written in propositional calculus: Suppose that R stands for “It is raining”, G stands for “I have got a coat”, W stands for “I will get wet”. The statement

R  G  W

is a way of writing "If it is raining and I have not got a coat, then I will get wet."

Logic: predicate calculus

 Example of a statement written in predicate calculus: Suppose that c stands for "the cat", m stands for "the mat", s stands for "sits on", b stands for "black", f stands for "fat", h stands for "happy". The statement

(f(c) b(c) s(c,m))  h(c)

is a way of writing "If the fat black cat sits on the mat then it is happy".

Logic: predicate calculus

 As well as having the same logical connectives as propositional calculus, predicate calculus has two quantifiers,

 meaning “for all”,

and

 meaning “there exists”.

Logic: predicate calculus

 Notice that while the statement in English - "Someone is mugged in Soho every day” - is ambiguous, the statement written in predicate calculus - x( d(x)  y( p(y)  mo(y, x)  mi(y, S))) isn’t.  In general, translating statements from a natural language (e.g. English) into some form of logic forces you to sort out any ambiguity.

Formal logic

 The tools available to logicians include:  A set of symbols indicating propositions, predicates, variables, constants, etc  A set of logical connectives which can be used to combine simple terms into compound terms, with precisely-defined effects on the truth values involved.