0% found this document useful (0 votes)
30 views40 pages

AI Unit IV

The document discusses knowledge representation in artificial intelligence including categories, objects, declarative and procedural knowledge, meta-knowledge, ontological engineering, and relationships between categories and objects.

Uploaded by

SELVAGANESH N IT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views40 pages

AI Unit IV

The document discusses knowledge representation in artificial intelligence including categories, objects, declarative and procedural knowledge, meta-knowledge, ontological engineering, and relationships between categories and objects.

Uploaded by

SELVAGANESH N IT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

UNIT III

SOFTWARE AGENTS

Architecture for Intelligent Agents – Agent communication – Negotiation and Bargaining–


Argumentation among Agents – Trust and Reputation in Multi-agent systems.
Refer written Notes for the following topics
• First Order Predicate Logic
• Unification
• Forward Chaining
• Backward Chaining
• Resolution
Prolog Programming
• Short form of LOGical PROgramming.
• Logical and declarative programming language.
• The program statements express the facts and rules about different problems within a system of
formal logic.
• Here, the rules are written in the form of logical clauses, where head and body are present. For
example, H is head and B1, B2, B3 are the elements of the body. Now if we state that “H is true,
when B1, B2, B3 all are true”, this is a rule.
• On the other hand, facts are like the rules, but without any body. So, an example of fact is “H is
true”.
• Some logic programming languages like Datalog or ASP (Answer Set Programming) are known as
purely declarative languages.
• These languages allow statements about what the program should accomplish.
Prolog Programming
Some logic programming languages are given below:
• ALF (Algebraic Logic Functional programming language).
• ASP (Answer Set Programming)
• CycL
• Datalog
• FuzzyCLIPS
• Janus
• Parlog
• Prolog
• Prolog++
• ROOP
Prolog Programming
Prolog Programming
Prolog Programming
• Major example of the fourth generation language that supports the declarative programming
paradigm.
• This is particularly suitable for programs that involve symbolic or non-numeric computation.
• This is the main reason to use Prolog as the programming language in Artificial Intelligence,
where symbol manipulation and inference manipulation are the fundamental tasks.
• We need not mention the way how one problem can be solved, we just need to mention what the
problem is, so that Prolog automatically solves it
Prolog Programming
Prolog language basically has three different elements :
i. Facts - The fact is predicate that is true, for example, if we say, “Tom is the son of Jack”, then this
is a fact.
ii. Rules - Rules are extinctions of facts that contain conditional clauses. To satisfy a rule these
conditions should be met.
Manager(x,y) : - TL (y,z), senior programmer (z,a)
iii. Questions - And to run a prolog program, we need some questions, and those questions can be
answered by the given facts and rules.
Prolog Programming
Prolog is used in various domains. It plays a vital role in automation system. Following are some
other important fields where Prolog is used
• Intelligent Database Retrieval
• Natural Language Understanding
• Specification Language
• Machine Learning
• Robot Planning
• Automation System
• Problem Solving
Knowledge Representation
• Knowledge representation and reasoning (KR, KRR) is the part of Artificial intelligence which
concerned with AI agent’s thinking and how thinking contributes to intelligent behavior of agents.
• Representing information about the real world so that a computer can understand and can utilize
this knowledge to solve the complex real world problems (ex: diagnosis a medical condition)
• Describes how we can represent knowledge in artificial intelligence.
• Knowledge representation is not just storing data into some database, but it also enables an
intelligent machine to learn from that knowledge and experiences so that it can behave
intelligently like a human.
Knowledge Representation
Kinds of knowledge represented in AI systems:
1. Object: All the facts about objects in our world domain. E.g., Guitars contains strings, trumpets
are brass instruments.
2. Events: Events are the actions which occur in our world.
3. Performance: It describe behavior which involves knowledge about how to do things.
4. Meta-knowledge: It is knowledge about what we know.
5. Facts: Facts are the truths about the real world and what we represent.
6. Knowledge-Base: The central component of the knowledge-based agents is the knowledge base.
It is represented as KB. The Knowledgebase is a group of the sentences.
Knowledge Representation
Knowledge Representation
Declarative Knowledge:
• Declarative knowledge is to know about something.
• It includes concepts, facts, and objects.
• It is also called descriptive knowledge and expressed in declarative sentences.
• It is simpler than procedural language.
Procedural Knowledge:
• It is also known as imperative knowledge.
• Procedural knowledge is a type of knowledge which is responsible for knowing how to do
something.
• It can be directly applied to any task.
• It includes rules, strategies, procedures, agendas, etc.
• Procedural knowledge depends on the task on which it can be applied.
Knowledge Representation
Meta-knowledge:
• Knowledge about the other types of knowledge is called Meta-knowledge.
Heuristic knowledge:
• Heuristic knowledge is representing knowledge of some experts in a filed or subject.
• Heuristic knowledge is rules of thumb based on previous experiences, awareness of approaches,
and which are good to work but not guaranteed.
Structural knowledge:
• Structural knowledge is basic knowledge to problem-solving.
• It describes relationships between various concepts such as kind of, part of, and grouping of
something.
• It describes the relationship that exists between concepts or objects.
Knowledge Representation - Relation between knowledge and intelligence
Knowledge Representation - AI Knowledge Cycle
Knowledge Representation - Approaches
1. Simple relational knowledge
2. Inheritable knowledge
3. Inferential knowledge
4. Procedural knowledge
Knowledge Representation
Ontological Engineering
• Representing abstract concepts.
• The general framework of concepts is called an upper ontology because of the convention of
drawing graphs with the general concepts at the top and the more specific concepts below them.
• The General Ontology is for conceptual modeling, which is being constantly further developed by
Onto-Med.
• It includes elaborations of categories like objects, processes, time and space, properties, relations,
roles, functions, facts, and situations.
• Two major characteristics of general-purpose ontologies distinguish them from collections of
special-purpose ontologies:
1. A general-purpose ontology should be applicable in more or less any special-purpose domain
(with the addition of domain-specific axioms)
2. The sentences describing time must be capable of being combined with those describing spatial
layout and must work equally well for nanoseconds and minutes and for angstroms and meters.
Categories and Objects
• The organization of objects into categories is a vital part of knowledge representation.
• Although interaction with the world takes place at the level of individual objects, much reasoning
takes place at the level of categories.
• For example, a shopper would normally have the goal of buying a basketball, rather than a
particular basketball such as BB9.
• Categories also serve to make predictions about objects once they are classified.
• One infers the presence of certain objects from perceptual input, infers category membership from
the perceived properties of the objects, and then uses category information to make predictions
about the objects.
• For example, from its green and yellow mottled skin, one-foot diameter, ovoid shape, red flesh,
black seeds, and presence in the fruit aisle, one can infer that an object is a watermelon, one infers
that it would be useful for fruit salad.
Categories and Objects
• Categories are represented using the FOL or predicates of an object.
• Categories serve to organize and simplify the knowledge base through inheritance.
• If all instances of the category Food are edible, and if we assert that Fruit is a subclass of Food and
Apples is a subclass of Fruit, then we can infer that every apple is edible.
• We say that the individual apples inherit the property of edibility, in this case from their
membership in the Food category.
• Subclass relations organize categories into a taxonomy or taxonomic hierarchy.
• Ex: Tax authorities and other government departments have developed extensive taxonomies of
occupations and commercial products.
Categories and Objects
• FOL makes it easy to state facts about categories, either by relating objects to categories or by
quantifying over their members
• An object is a member of a category : BB9 ∈ Basketballs
• A category is a subclass of another category : Basketballs ⊂ Balls
• All members of a category have some properties: (x∈ Basketballs) ⇒ Spherical(x)
• Members of a category can be recognized by some properties: Orange(x) ∧ Round(x) ∧
Diameter(x)=9.5 ∧ x∈ Balls ⇒ x∈ Basketballs
• A category as a whole has some properties: Dogs ∈ DomesticatedSpecies
Categories and Objects
• We say that two or more categories are disjoint if they have no members in common.
• Even if we know that males and females are disjoint, we will not know that an animal that is not a
male must be a female, unless we say that males and females constitute an exhaustive
decomposition of the animals.
• A disjoint exhaustive decomposition is known as a partition.

Physical composition:
• The idea that one object can be part of another familiar one.
• One’s nose is part of one’s head, Romania is part of Europe, and this chapter is part of this book.
• Objects can be grouped into part of hierarchies.
• PartOf (Bucharest, Romania)
• PartOf (Romania,EasternEurope)
Categories and Objects
• A PartPartition relation analogous to the Partition relation for categories.
• An object is composed of the parts in its PartPartition and can be viewed as deriving some
properties from those parts.
• For example, the mass of a composite object is the sum of the masses of the parts.
• It is also useful to define composite objects with definite parts but no particular structure. For
example, we might want to say “The apples in this bag weigh two pounds.”
• The temptation would be to ascribe this weight to the set of apples in the bag, but this would be a
mistake because the set is an abstract mathematical concept that has elements but does not have
weight. Instead, we need a new concept, which we will call a bunch.
Categories and Objects
Measurements:
• The values that we assign for properties are called measures.
• Ordinary quantitative measures are quite easy to represent. We imagine that the universe includes
abstract “measure objects,” such as the length that is the length of this line segment.
• We can call this length 1.5 inches or 3.81 centimeters.
• Thus, the same length has different names in our language. We represent the length with a units
function that takes a number as argument.
Categories and Objects
Objects: Things and stuff:
• The real world can be seen as consisting of primitive objects (e.g., atomic particles) and composite
objects built from them.
• At the level of large objects such as apples and cars, we can overcome the complexity involved in
dealing with vast numbers of primitive objects individually.
• There is, however, a significant portion of reality that seems to defy any obvious individuation -
division into distinct objects. We give this portion the generic name stuff.
• For example, suppose I have some butter and a bread packet in front of me. I can say there is one
bread, but there is no obvious number of “butter-objects,” because any part of a butter-object is
also a butter-object, at least until we get to very small parts indeed.
• This is the major distinction between stuff and things.
• Count noun and mass noun.
• Intrinsic and extrinsic properties.
Events
• Situation calculus - based on situation
• Event calculus – based on time
• The fluent At(Shankar , Berkeley) is an object that refers to the fact of Shankar being in Berkeley,
but does not by itself say anything about whether it is true.
• To assert that a fluent is actually true at some point in time we use the predicate T, as in
T(At(Shankar , Berkeley), t).
• Events are described as instances of event categories.
• The event E1 of Shankar flying from San Francisco to Washington, D.C. is described as :
E1 ∈ Flyings ∧ Flyer (E1, Shankar ) ∧ Origin(E1, SF) ∧ Destination(E1, DC )
E1 ∈ Flyings (Shankar , SF, DC)
Events
• We then use Happens(E1, i) to say that the event E1 took place over the time interval i, and we say
the same thing in functional form with Extent(E1) = i.
• We represent time intervals by a (start, end) pair of times; that is, i = (t1, t2) is the time interval
that starts at t1 and ends at t2.
• The complete set of predicates for one version of the event calculus is T(f, t) Fluent f is true at
time t.

 Happens(e, i) Event e happens over the time interval I


 Initiates(e, f, t) Event e causes fluent f to start to hold at time t
 Terminates(e, f, t) Event e causes fluent f to cease to hold at time t
 Clipped(f, i) Fluent f ceases to be true at some point during time interval I
 Restored(f, i) Fluent f becomes true sometime during time interval i
Events
Process:
• Discrete events - Have a definite structure.
• Shankar’s trip has a beginning, middle, and end. If interrupted halfway, the event would be
something different.
• It would not be a trip from San Francisco to Washington, but instead a trip from San Francisco to
somewhere over Kansas.
• If we take a small interval of Shankar’s flight, say he waits anxiously for a bag of peanuts, that
event is still a member of Flyings.
• Categories of events with this property are called process categories or liquid event categories.
Events
Time intervals
• Event calculus opens us up to the possibility of talking about time, and time intervals.
• We will consider two kinds of time intervals: moments and extended intervals.
• The distinction is that only moments have zero duration.
• The function Duration gives the difference between the end time and the start time.
• Two intervals Meet if the end time of the first equals the start time of the second
Events
Mental Events and Objects
• The agents we have constructed so far have beliefs and can deduce new beliefs.
• Yet none of them has any knowledge about beliefs or about deduction.
• Knowledge about one’s own knowledge and reasoning processes is useful for controlling
inference. Knowledge about the knowledge of other agents is also important;
• What we need is a model of the mental objects that are in someone’s head and of the mental
processes that manipulate those mental objects.
• Propositional attitudes - An agent can have toward mental objects, attitudes such as Believes,
Knows, Wants, Intends, and Informs.
• The difficulty is that these attitudes do not behave like “normal” predicates.
Mental Events and Objects
• Referential transparency—it doesn’t matter what term a logic uses to refer to an object, what
matters is the object that the term names.
• But for propositional attitudes like believes and knows, we would like to have referential opacity-
the terms used do matter, because not all agents know which terms are co-referential.
• Modal logic is designed to address this problem.
• Regular logic is concerned with a single modality, the modality of truth, allowing us to express “P
is true.” Modal logic includes special modal operators that take sentences (rather than terms) as
arguments.
• For example, “A knows P” is represented with the notation KAP, where K is the modal operator
for knowledge. It takes two arguments, an agent and a sentence.
• The syntax of modal logic is the same as first-order logic, except that sentences can also be formed
with modal operators.
Mental Events and Objects
• The semantics of modal logic is more complicated.
• In first-order logic a model contains a set of objects and an interpretation that maps each name to
the appropriate object, relation, or function.
• In modal logic we want to be able to consider both the possibility that Superman’s secret identity
is Clark and that it isn’t.
• We will need a more complicated model, one that consists of a collection of possible worlds rather
than just one true world.
• The worlds are connected in a graph by accessibility relations, one relation for each modal
operator.
• We say that world w1 is accessible from world w0 with respect to the modal operator KA if
everything in w1 is consistent with what A knows in w0, and we write this as Acc(KA, w0, w1).
Reasoning Systems for Categories
• Categories are the primary building blocks of large-scale knowledge representation schemes.
• Here we describe the systems specially designed for organizing and reasoning with categories.
• Semantic networks provide graphical aids for visualizing a knowledge base and efficient
algorithms for inferring projects of an object on the basis of its category membership;
• Description logics provide a formal language for constructing and combining category definitions
and efficient algorithms for deciding subset and superset relationships between categories.
Semantic networks:
• In 1909, Charles S. Peirce proposed a graphical notation of nodes and edges called existential
graphs that he called “the logic of the future.”
• semantics networks - at least those with well-defined semantics-are a form of logic.
• The notation that semantic networks provide for certain kinds of sentences is often more
convenient.
Reasoning Systems for Categories
• There are many variants of semantic networks, but all are capable of representing individual
objects, categories of objects, and relations among objects.
• A typical graphical notation displays object or category names in ovals or boxes, and connects
them with labeled links.
• Example: MemberOf link between Mary and FemalePersons, corresponding to the logical
assertion Mary ∈FemalePersons ; similarly, the SisterOf link between Mary and John corresponds
to the assertion SisterOf (Mary, John).
Reasoning Systems for Categories
Reasoning Systems for Categories
Reasoning Systems for Categories

You might also like