Uploaded by Vinod Kumar

AI Unit-1

advertisement
Unit-1
Artificial Intelligence (CSE-701)
th
B.Tech 7 Sem
By : Vinod Kumar
AI-UNIT-1 (SYLLABUS)
Overview of Artificial Intelligence:
•
•
•
•
•
•
•
•
Definition & Importance of AI.
Knowledge: General Concepts: Introduction,
Definition and Importance of Knowledge,
Knowledge-Based Systems,
Representation of Knowledge,
Knowledge Organization,
Knowledge Manipulation,
Acquisition of Knowledge.
Introduction:AI
Definitions:
• According to the father of Artificial Intelligence, John McCarthy, it is “The science and
engineering of making intelligent machines, especially intelligent computer programs”.
• Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a
software think intelligently, in the similar manner the intelligent humans think.
• Artificial Intelligence is a study of complex information processing problems that often
have their roots in some aspect of biological information processing. The goal of the
subject is to identify solvable and interesting information processing problems, and solve
them. -- David Marr.
• Artificial Intelligence is the design, study and construction of computer programs that
behave intelligently. -- Tom Dean.
• Artificial Intelligence is the enterprise of constructing a physical symbol system that can
reliably pass the Turing test.” -- Matt Ginsberg.
Introduction:
Philosophy of AI:
 While exploiting the power of the
computer systems, the curiosity of human,
lead him to wonder, “Can a machine think
and behave like humans do?”
 Thus, the development of AI started with
the intention of creating similar intelligence
in machines that we find and regard high in
humans.
Introduction:
Goals of AI:
• To Create Expert Systems − The systems which exhibit intelligent
behavior, learn, demonstrate, explain, and advice its users.
• To Implement Human Intelligence in Machines − Creating systems
that understand, think, learn, and behave like humans.
Introduction:
What Contributes to AI?
• Artificial intelligence is a science and
technology based on disciplines such as
Computer Science, Biology, Psychology,
Linguistics, Mathematics, & Engineering.
• A major thrust of AI is in the development
of computer functions associated with
human intelligence, such as reasoning,
learning, and problem solving.
• Out of the following areas, one or multiple
areas can contribute to build an intelligent
system.
History of AI:
• History of AI during 20th century
History of AI:
History of AI:
History of AI:
The emergence of intelligent agents
(1993-2011)
Deep learning, big data and artificial
general intelligence (2011-present)
• Year 1997: In the year 1997, IBM Deep
Blue beats world chess champion, Gary
Kasparov, and became the first computer
to beat a world chess champion.
• Year 2011: In the year 2011, IBM's Watson won jeopardy, a
quiz show, where it had to solve the complex questions as
well as riddles. Watson had proved that it could understand
natural language and can solve tricky questions quickly.
• Year 2002: for the first time, AI entered
the home in the form of Roomba, a
vacuum cleaner.
• Year 2006: AI came in the Business world
till the year 2006. Companies like
Facebook, Twitter, and Netflix also
started using AI.
• Year 2012: Google has launched an Android app feature
"Google now", which was able to provide information to the
user as a prediction.
• Year 2014: In the year 2014, Chatbot "Eugene Goostman"
won a competition in the infamous "Turing test."
• Year 2018: The "Project Debater" from IBM debated on
complex topics with two master debaters and also performed
extremely well.
History of AI:
• Google has demonstrated an AI program "Duplex" which was a virtual
assistant and which had taken hairdresser appointment on call, and
lady on other side didn't notice that she was talking with the
machine.
• Now AI has developed to a remarkable level. The concept of Deep
learning, big data, and data science are now trending like a boom.
• Nowadays companies like Google, Facebook, IBM, and Amazon are
working with AI and creating amazing devices. The future of Artificial
Intelligence is inspiring and will come with high intelligence.
What is AI Technique?
• In the real world, the knowledge has some unwelcomed properties −
Its volume is huge, next to unimaginable.
It is not well-organized or well-formatted.
It keeps changing constantly.
• AI Technique is a manner to organize and use the knowledge
efficiently in such a way that −
It should be perceivable by the people who provide it.
It should be easily modifiable to correct errors.
It should be useful in many situations though it is incomplete or inaccurate.
AI techniques elevate the speed of execution of the complex program it is
equipped with.
Introduction: (Applications of AI)
AI has been dominant in various fields such as –
• Gaming − AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where
machine can think of large number of possible positions based on heuristic knowledge.
• Natural Language Processing − It is possible to interact with the computer that understands
natural language spoken by humans.
• Expert Systems − There are some applications which integrate machine, software, and special
information to impart reasoning and advising. They provide explanation and advice to the users.
• Vision Systems − These systems understand, interpret, and comprehend visual input on the
computer. For example,
• A spying airplane takes photographs, which are used to figure out spatial information or map of the
areas.
• Doctors use clinical expert system to diagnose the patient.
• Police use computer software that can recognize the face of criminal with the stored portrait made by
forensic artist.
Introduction: (Applications of AI)
• Speech Recognition − Some intelligent systems are capable of hearing and
comprehending the language in terms of sentences and their meanings while a
human talks to it. It can handle different accents, slang words, noise in the
background, change in human’s noise due to cold, etc.
• Handwriting Recognition − The handwriting recognition software reads the text
written on paper by a pen or on screen by a stylus. It can recognize the shapes of
the letters and convert it into editable text.
• Intelligent Robots − Robots are able to perform the tasks given by a human. They
have sensors to detect physical data from the real world such as light, heat,
temperature, movement, sound, bump, and pressure. They have efficient
processors, multiple sensors and huge memory, to exhibit intelligence. In
addition, they are capable of learning from their mistakes and they can adapt to
the new environment.
Advantages of Artificial Intelligence:
Following are some main advantages of Artificial Intelligence:
• High Accuracy with less errors: AI machines or systems are prone to less errors and high accuracy as it takes
decisions as per pre-experience or information.
• High-Speed: AI systems can be of very high-speed and fast-decision making, because of that AI systems can
beat a chess champion in the Chess game.
• High reliability: AI machines are highly reliable and can perform the same action multiple times with high
accuracy.
• Useful for risky areas: AI machines can be helpful in situations such as defusing a bomb, exploring the ocean
floor, where to employ a human can be risky.
• Digital Assistant: AI can be very useful to provide digital assistant to the users such as AI technology is
currently used by various E-commerce websites to show the products as per customer requirement.
• Useful as a public utility: AI can be very useful for public utilities such as a self-driving car which can make
our journey safer and hassle-free, facial recognition for security purpose, Natural language processing to
communicate with the human in human-language, etc.
Disadvantages of Artificial Intelligence:
Every technology has some disadvantages, and the same goes for Artificial intelligence. Being so advantageous
technology still, it has some disadvantages which we need to keep in our mind while creating an AI system.
Following are the disadvantages of AI:
• High Cost: The hardware and software requirement of AI is very costly as it requires lots of maintenance to
meet current world requirements.
• Can't think out of the box: Even we are making smarter machines with AI, but still they cannot work out of
the box, as the robot will only do that work for which they are trained, or programmed.
• No feelings and emotions: AI machines can be an outstanding performer, but still it does not have the
feeling so it cannot make any kind of emotional attachment with human, and may sometime be harmful for
users if the proper care is not taken.
• Increase dependency on machines: With the increment of technology, people are getting more dependent
on devices and hence they are losing their mental capabilities.
• No Original Creativity: As humans are so creative and can imagine some new ideas but still AI machines
cannot beat this power of human intelligence and cannot be creative and imaginative.
Types of Artificial Intelligence:
• Artificial Intelligence can be divided in various types, there are mainly two types
of main categorization which are based on capabilities and based on functionally
of AI. Following is flow diagram which explain the types of AI.
Types of Artificial Intelligence:
AI type-1: Based on Capabilities
1. Weak AI or Narrow AI:
• Narrow AI is a type of AI which is able to perform a dedicated task with intelligence. The most common and
currently available AI is Narrow AI in the world of Artificial Intelligence.
• Narrow AI cannot perform beyond its field or limitations, as it is only trained for one specific task. Hence it is
also termed as weak AI. Narrow AI can fail in unpredictable ways if it goes beyond its limits.
• Some Examples of Narrow AI are playing chess, purchasing suggestions on e-commerce site, self-driving cars,
speech recognition, and image recognition.
Types of Artificial Intelligence:
2. General AI:
• General AI is a type of intelligence which could perform any intellectual task with efficiency like a human.
• The idea behind the general AI to make such a system which could be smarter and think like a human by its own.
• Currently, there is no such system exist which could come under general AI and can perform any task as perfect
as a human.
• The worldwide researchers are now focused on developing machines with General AI.
• As systems with general AI are still under research, and it will take lots of efforts and time to develop such
systems.
3. Super AI:
• Super AI is a level of Intelligence of Systems at which machines could surpass human intelligence, and can
perform any task better than human with cognitive properties. It is an outcome of general AI.
• Some key characteristics of strong AI include capability include the ability to think, to reason, solve the puzzle,
make judgments, plan, learn, and communicate by its own.
• Super AI is still a hypothetical concept of Artificial Intelligence. Development of such systems in real is still world
changing task.
Types of Artificial Intelligence:
Artificial Intelligence type-2: Based on functionality
1. Reactive Machines
•
•
•
•
•
Purely reactive machines are the most basic types of Artificial Intelligence.
Such AI systems do not store memories or past experiences for future actions.
These machines only focus on current scenarios and react on it as per possible best action.
IBM's Deep Blue system is an example of reactive machines.
Google's AlphaGo is also an example of reactive machines.
2. Limited Memory
• Limited memory machines can store past experiences or some data for a short period of
time.
• These machines can use stored data for a limited time period only.
• Self-driving cars are one of the best examples of Limited Memory systems. These cars can
store recent speed of nearby cars, the distance of other cars, speed limit, and other
information to navigate the road.
Types of Artificial Intelligence:
3. Theory of Mind
• Theory of Mind AI should understand the human emotions, people, beliefs,
and be able to interact socially like humans.
• This type of AI machines are still not developed, but researchers are making
lots of efforts and improvement for developing such AI machines.
4. Self-Awareness
• Self-awareness AI is the future of Artificial Intelligence. These machines will
be super intelligent, and will have their own consciousness, sentiments, and
self-awareness.
• These machines will be smarter than human mind.
• Self-Awareness AI does not exist in reality still and it is a hypothetical concept.
Knowledge:
• Knowledge is awareness or familiarity gained by experiences of facts, data, and
situations.
• Knowledge can be defined as the body of facts and principles accumulated by humankind or the act, fact, or state of knowing.
• Knowledge is a familiarity, awareness, or understanding of someone or something, such
as facts, information, descriptions, or skills, which is acquired through experience or
education by perceiving, discovering, or learning.
• Knowledge can refer to a theoretical or practical understanding of a subject. It can be
implicit (as with practical skill or expertise) or explicit (as with the theoretical
understanding of a subject); it can be more or less formal or systematic.
• In philosophy, the study of knowledge is called ‘epistemology’ (a specialist in philosophy);
the philosopher Plato famously defined knowledge as "justified true belief“.
Importance of Knowledge:
• Knowledge is power. It is a popular proverb. It means that knowledge
is more powerful than any other physical strength. It empowers
people to achieve great results and leads to success.
• Knowledge helps to succeed in any field. The proverb means that true
power comes from knowledge. There is no end to knowledge and
there is no limit to what a person can learn. Even the complicated
problems can be solved if you have the knowledge of solving it.
• It is considered as the superior strength in gaining success. Therefore
knowledge plays a vital role in everywhere. The reason is that it helps
us to think for ourselves.
UNIT -1 (AI)
KNOWLEDGE BASED SYSTEMS
Overview
 What is an Knowledge Based System?
 History
 Components of a KBS
 Who is involved?
Knowledge base
Expert System
» A KBS is a computer program that uses artificial
intelligence to solve problems within a specialized
domain that ordinarily requires human expertise.
» Typical tasks for expert systems involve
classification, diagnosis, monitoring, design,
scheduling, and planning for specialized tasks.
» Knowledge-based system is a more general than
the expert system.
KBS as real-world problem solvers
 Problem-solving power does not lie with smart reasoning
techniques nor clever search algorithms but domain dependent
real-world knowledge.
 Real-world problems do not have well-defined solutions.
 KBS allow this knowledge to be represented and creates an
explained solution.
 A KBS draws upon the knowledge of human experts captured in
a knowledge-base to solve problems that normally require
human expertise.
 Uses Heuristic (cause-and-effect) rather than algorithms.
Heuristics
Rules
Facts
Objects
Attributes
Knowledge Base
Processes
Events
Hypothesis
Definitions
Relationships
KBS as diagnostic tool
• Diagnosis - Provides identification about a problem given a set of
symptoms or malfunctions.
• Interpretation – Provides an understanding of a situation from
available information.
• Design – Develops configurations that satisfy constraints of the
problem.
• Monitoring – Checks performance & flags inconsistencies
• Control – Collects & evaluate evidence and from opinions on that
evidence.
• Debugging – Identifies and prescribes remedies for malfunctions.
In the 1960s general purpose programs were developed
for solving the classes of problems but this strategy
produced no breakthroughs. In the next decade AI
scientists developed computer programs that could in
some sense think.
It was realized that the problem-solving power of
program comes from the knowledge it possesses.
i.e. To make a program intelligent, provide it with lots of highquality, specific knowledge about some problem area.
Knowledge base (facts)
Inference Engine
User Interface
Knowledge Base
The component of an expert system that contains the
system’s knowledge organized in collection of facts
about the system’s domain
K NOWLEDGE R EPRESENTATION

Knowledge is represented in a computer in the form of
rules. Consists of an IF part and THEN part.

IF part lists a set of conditions in some logical
combination.

If the IF part of the rule is satisfied; consequently, the
THEN part can be concluded.

Chaining of IF-THEN rules to form a line of reasoning.

Forward chaining (facts driven)

Backward chaining (goal driven)
Inference Engine
 An inference engine tries to derive answers from a knowledge
base.
 It
is the brain of the expert systems that provides a
methodology for reasoning about the information in the
knowledge base,and for formulating conclusions.
 It
enables the user to communicate with
the KBS.
Facts
Results
How/Why
User
Interface
Queries
Rules
Facts
Inference
Engine
Who is involved?
• Knowledge Engineer
A knowledge engineer is a computer scientist who knows how to
design and implement programs that incorporate artificial
intelligence techniques.
• Domain Expert
A domain expert is an individual who has significant expertise in
the domain of the expert system being developed.




Determining the characteristics of the problem.
Knowledge engineer and domain expert work together closely
to describe the problem.
The engineer then translates the knowledge into a computerusable language, and designs an inference engine, a
reasoning structure, that uses the knowledge appropriately.
He also determines how to integrate the use of uncertain
knowledge in the reasoning process, and what kinds of
explanation would be useful to the end user.
HUMAN EXPERTISE VS ARTIFICIAL EXPERTISE
1. Perishable
1. Permanent
2. Difficult to transfer
2. Easy to transfer
3. Difficult to document
3. Easy to document
4. Unpredictable
4. Consistent
5. Expensive
5. Affordable
 An expert system is judged to be successful when it
operates on the level of a human expert.
Advantages & Limitations
 Advantages:
- Increase available of expert knowledge
- Efficient and cost effective
- Consistency of answers
- Explanation of solution
- Deals with uncertainty
 Limitations:
- Lack of common sense
- Inflexible, difficult to modify
- Restricted domain of expertise limited to KB
- Not always reliable
Some influential pioneer Expert System projects
• Dendral
Pioneering work developed in 1965 for NASA at Standford University by Buchanan & Feigenbaum.
• Drilling Advisor
Developed in 1983 by Teknowledge for oil companies to replace human drilling advisor.
• Mycin
Developed in 1970 at Standford by Shortcliffe to assist internists in diagnosis and treatment of
infectious diseases.
• Xcon/RI
Developed in 1978 to assist the ordering of computer systems by automatically selecting the
system components based on customer’s requirements.
The End

Knowledge Representation:
• Knowledge representation and reasoning (KR, KRR) is the part of Artificial
intelligence which concerned with AI agents thinking and how thinking
contributes to intelligent behavior of agents.
• It is responsible for representing information about the real world so that a
computer can understand and can utilize this knowledge to solve the complex
real world problems such as diagnosis a medical condition or communicating with
humans in natural language.
• It is also a way which 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.
What to Represent:
Following are the kind of knowledge which needs to be represented in AI systems:
• Object: All the facts about objects in our world domain. E.g., Guitars contains strings, trumpets
are brass instruments.
• Events: Events are the actions which occur in our world.
• Performance: It describe behavior which involves knowledge about how to do things.
• Meta-knowledge: It is knowledge about what we know.
• Facts: Facts are the truths about the real world and what we represent.
• 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 (Here, sentences are used
as a technical term and not identical with the English language).
Types of knowledge:
1. 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.
Types of knowledge:
2. Procedural Knowledge
4. Heuristic knowledge:
• It is also known as imperative knowledge.
• Heuristic knowledge is representing knowledge
of some experts in a field or subject.
• 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.
3. Meta-knowledge:
• Knowledge about the other types of
knowledge is called Meta-knowledge.
• Heuristic knowledge is rules of thumb based on
previous
experiences,
awareness
of
approaches, and which are good to work but
not guaranteed.
5. 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.
The relation between knowledge and intelligence:
• Knowledge of real-worlds plays a vital role in
intelligence and same for creating artificial
intelligence. Knowledge plays an important role in
demonstrating intelligent behavior in AI agents. An
agent is only able to accurately act on some input
when he has some knowledge or experience about
that input.
• Let's suppose if you met some person who is speaking
in a language which you don't know, then how you will
able to act on that. The same thing applies to the
intelligent behavior of the agents.
• As we can see in the diagram, there is one decision
maker which act by sensing the environment and using
knowledge. But if the knowledge part will not present
then, it cannot display intelligent behavior.
AI knowledge cycle:
An Artificial intelligence system has the following
components for displaying intelligent behavior:
• Perception
• Learning
• Knowledge Representation and Reasoning
• Planning
• Execution
• The diagram is showing how an AI system can
interact with the real world and what components
help it to show intelligence.
• AI system has Perception component by which it
retrieves information from its environment. It can
be visual, audio or another form of sensory input.
• The learning component is responsible for
learning from data captured by Perception
comportment.
• In the complete cycle, the main components are
knowledge representation and Reasoning. These
two components are involved in showing the
intelligence in machine-like humans. These two
components are independent with each other but
also coupled together.
• The planning and execution depend on analysis of
Knowledge representation and reasoning.
Approaches to knowledge representation:
There are mainly four approaches to knowledge
representation, which are given below:
1. Simple relational knowledge:
• It is the simplest way of storing facts which
uses the relational method, and each fact
about a set of the object is set out
systematically in columns.
• This approach of knowledge representation is
famous in database systems where the
relationship between different entities is
represented.
• This approach has little opportunity for
inference.
Example: The following is the simple relational
knowledge representation.
Player
Weight
Age
Player1
65
23
Player2
58
18
Player3
75
24
Approaches to knowledge representation:
2. Inheritable knowledge:
• In the inheritable knowledge approach, all data must be stored into
a hierarchy of classes.
• All classes should be arranged in a generalized form or a hierarchal
manner.
• In this approach, we apply inheritance property.
• Elements inherit values from other members of a class.
• This approach contains inheritable knowledge which shows a
relation between instance and class, and it is called instance
relation.
• Every individual frame can represent the collection of attributes
and its value.
• In this approach, objects and values are represented in Boxed
nodes.
• We use Arrows which point from objects to their values.
Example: The following
knowledge representation.
is
the
Inheritable
Approaches to knowledge representation:
3. Inferential knowledge:
4. Procedural knowledge:
• Inferential knowledge approach represents
knowledge in the form of formal logics.
• Procedural knowledge approach uses small
programs and codes which describes how to
do specific things, and how to proceed.
• This approach can be used to derive more
facts.
• It guaranteed correctness.
Example: Let's suppose there are two
statements:
a. Marcus is a man
b. All men are mortal
Then it can represent as;
man(Marcus)
∀x = man (x) ----------> mortal (x)s
• In this approach, one important rule is used
which is If-Then rule.
• In this knowledge, we can use various coding
languages such as LISP language and Prolog
language.
• We can easily represent heuristic or domainspecific knowledge using this approach.
• But it is not necessary that we can represent
all cases in this approach.
Requirements for knowledge Representation system:
A good knowledge representation system must possess the following properties.
1. Representational Accuracy:
KR system should have the ability to represent all kind of required knowledge.
2. Inferential Adequacy:
KR system should have ability to manipulate the representational structures to produce new
knowledge corresponding to existing structure.
3. Inferential Efficiency :
The ability to direct the inferential knowledge mechanism into the most productive directions
by storing appropriate guides.
4. Acquisitional efficiency:
The ability to acquire the new knowledge easily using automatic methods.
Techniques of knowledge representation
There are mainly four ways of
knowledge representation which are
given as follows:
• Logical Representation
• Semantic Network Representation
• Frame Representation
• Production Rules
Techniques of knowledge representation
1. Logical Representation
Syntax:
• Logical representation is a language with
some concrete rules which deals with
propositions and has no ambiguity in
representation.
• Syntaxes are the rules which decide how we
can construct legal sentences in the logic.
• Logical representation means drawing a
conclusion based on various conditions. This
representation lays down some important
communication rules.
• It consists of precisely defined syntax and
semantics which supports the sound
inference. Each sentence can be translated
into logics using syntax and semantics.
• It determines which symbol we can use in
knowledge representation and how to write
those symbols.
Semantics:
• Semantics are the rules by which we can
interpret the sentence in the logic.
• Semantic also involves assigning a meaning to
each sentence.
Techniques of knowledge representation
1. Logical Representation ……continue
Disadvantages of logical Representation:
Logical representation can be categorized into
mainly two logics:
• Logical
representations
have
some
restrictions and are challenging to work with.
• Propositional Logics
• Logical representation technique may not be
very natural, and inference may not be so
efficient.
• Predicate logics
Note: We will discuss Prepositional Logics and
Predicate logics in later chapters.
Advantages of logical representation:
• Logical representation enables us to do logical
reasoning.
• Logical representation is the basis for the
programming languages.
Note: Do not be confused with logical
representation and logical reasoning as logical
representation is a representation language and
reasoning is a process of thinking logically.
Techniques of knowledge representation
2. Semantic Network Representation
• Semantic networks are alternative of predicate logic
for knowledge representation.
• In Semantic networks, we can represent our
knowledge in the form of graphical networks.
Example: Following are some statements
which we need to represent in the form of
nodes and arcs.
Statements:
a.
Jerry is a cat.
• This network consists of nodes representing objects
and arcs which describe the relationship between
those objects.
b.
Jerry is a mammal
c.
Jerry is owned by Priya.
d.
Jerry is White colored.
• Semantic networks can categorize the object in
different forms and can also link those objects.
e.
All Mammals are animal.
• Semantic networks are easy to understand and can
be easily extended.
This representation consist of mainly two types of
relations:
a. IS-A relation (Inheritance)
b. Kind-of-relation
Techniques of knowledge representation
Techniques of knowledge representation
Drawbacks in Semantic representation:
• Semantic networks take more computational time at runtime
as we need to traverse the complete network tree to answer
some questions. It might be possible in the worst case scenario
that after traversing the entire tree, we find that the solution
does not exist in this network.
• Semantic networks try to model human-like memory (Which
has 1015 neurons and links) to store the information, but in
practice, it is not possible to build such a vast semantic
network.
• These types of representations are inadequate as they do not
have any equivalent quantifier, e.g., for all, for some, none, etc.
• Semantic networks do not have any standard
definition for the link names.
• These networks are not intelligent and depend on
the creator of the system.
Advantages of Semantic network:
• Semantic networks are a natural representation of
knowledge.
• Semantic networks
transparent manner.
• These networks
understandable.
convey
are
meaning
simple
and
in
a
easily
Techniques of knowledge representation
3. Frame Representation
• A frame is a record like structure which consists of a
collection of attributes and its values to describe an
entity in the world.
• Frames are the AI data structure which divides
knowledge into substructures by representing
stereotypes situations.
• It consists of a collection of slots and slot values.
These slots may be of any type and sizes. Slots have
names and values which are called facets.
• Facets: The various aspects of a slot is known
as Facets. Facets are features of frames which enable
us to put constraints on the frames.
• Example: IF-NEEDED facts are called when data of
any particular slot is needed.
• A frame may consist of any number of slots, and a
slot may include any number of facets and facets
may have any number of values. A frame is also
known as slot-filter knowledge representation in
artificial intelligence.
• Frames are derived from semantic networks and
later evolved into our modern-day classes and
objects. A single frame is not much useful. Frames
system consist of a collection of frames which are
connected.
• In the frame, knowledge about an object or event
can be stored together in the knowledge base. The
frame is a type of technology which is widely used in
various applications including Natural language
processing and machine visions.
• Frame- slots-facets - Values
Techniques of knowledge representation
3. Frame Representation ………..cont…
Example 2:
Example: 1
Let's suppose we are taking an entity, Peter. Peter
is an Doctor as a profession, and his age is 25, he
lives in city London, and the country is England.
So following is the frame representation for this:
Let's take an example of a frame for a book
Slots
Filters
Title
Artificial Intelligence
Slots
Filter
Genre
Computer Science
Name
Peter
Author
Peter Norvig
Profession
Doctor
Edition
Third Edition
Age
25
Year
1996
Marital status
Single
Page
1152
Weight
78
Techniques of knowledge representation
3. Frame Representation ….. Cont….
Disadvantages of frame representation:
Advantages of frame representation:
1. In frame system inference mechanism is not be
easily processed.
1.
The frame knowledge representation makes
the programming easier by grouping the
related data.
2.
The frame representation is comparably
flexible and used by many applications in AI.
3.
It is very easy to add slots for new attribute
and relations.
4.
It is easy to include default data and to search
for missing values.
5.
Frame representation is easy to understand
and visualize.
2. Inference mechanism cannot be
proceeded by frame representation.
smoothly
3. Frame representation has a much generalized
approach.
Techniques of knowledge representation
4. Production Rules:
Production rules system consist of (condition,
action) pairs which mean, "If condition then
action". It has mainly three parts:
1.
The set of production rules
2.
Working Memory
3.
The recognize-act-cycle
In production rules agent checks for the condition
and if the condition exists then production rule
fires and corresponding action is carried out. The
condition part of the rule determines which rule
may be applied to a problem. And the action part
carries out the associated problem-solving steps.
This complete process is called a recognize-act
cycle.
The working memory contains the description of the
current state of problems-solving and rule can write
knowledge to the working memory. This knowledge
match and may fire other rules.
If there is a new situation (state) generates, then
multiple production rules will be fired together, this is
called conflict set. In this situation, the agent needs to
select a rule from these sets, and it is called a conflict
resolution.
Example:
IF (at bus stop AND bus arrives) THEN action (get into
the bus)
IF (on the bus AND paid AND empty seat) THEN action
(sit down).
IF (on bus AND unpaid) THEN action (pay charges).
IF (bus arrives at destination) THEN action (get down
from the bus).
Techniques of knowledge representation
4. Production Rules: ….cont….
Disadvantages of Production rule:
Advantages of Production rule:
• Production rule system does not exhibit any
learning capabilities, as it does not store the
result of the problem for the future uses.
• The production rules are expressed in natural
language.
• The production rules are highly modular, so
we can easily remove, add or modify an
individual rule.
• During the execution of the program, many
rules may be active hence rule-based
production systems are inefficient.
Knowledge Organization
• The organization of knowledge in memory is key to efficient
processing Knowledge based systems performs their intended tasks.
• The facts and rules are easy to locate and retrieve. Otherwise much
time is wasted in searching and testing large numbers of items in
memory.
• Knowledge can be organized in memory for easy access by a method
known as indexing.
• As a result, the search for some specific chunk of knowledge is limited
to the group only.
Knowledge Manipulation
• Decisions and actions in knowledge based systems come from manipulation of the
knowledge.
• The known facts in the knowledge base be located, compared, and altered in some way.
This process may set up other sub goals and require further inputs, and so on until a final
solution is found
• The manipulations are the computational equivalent of reasoning. This requires a form of
inference or deduction, using the knowledge and inferring rules.
• All forms of reasoning requires a certain amount of searching and matching.
• The searching and matching operations consume greatest amount of computation time
in AI systems
• It is important to have techniques that limit the amount of search and matching required
to complete any given task
Knowledge Acquisition Paradox
• The more competent a Domain Expert (DE) becomes, the less able
they are to describe the knowledge they use to solve problems
• Don’t be your own expert
• Don’t believe everything experts say
Difficulties of Knowledge Acquisition
• Difficulty in verbalizing
• Reasoning process too broad
• Use of combined and compiled knowledge
• Unaware of the individual steps taken to reach a solution
• Difficulties in transferring to a machine
• Machine works at a more basic level, but the expert seldom operates at a basic level
• Difficulties in structuring knowledge
• Losing a significant amount of knowledge when structuring implicit knowledge
• Domain Expert’s unwillingness
• Unavailable
• Uncooperative
• No knowledge of computers and Expert Systems
Knowledge Acquisition Methods 1
1. On-site observation
 Watch the expert solving real problems on the job
• We are not the experts, so we research the particular area BEFORE sitting down with the
Domain Expert(s)
• Ex: Sometimes a Doctor brings a Student with them/Student learns from the Expert
Knowledge Acquisition Methods 2
2. Problem discussion - observe at first
 Explore the kinds of data, knowledge, and procedures needed to solve specific
problems
 How does the problem differ from prototypical problems in the domain?
 How is this problem different from others?
 What different approach do you use?
 Types of data required and kinds of solutions adequate for the problem?
 What kinds of knowledge are needed to solve the problem?
 What constitutes an adequate explanation or justification of a problem solution?
Knowledge Acquisition Methods 3
3. Problem Description
 Have the expert describe a prototypical problem for each category of answer in the domain
 Protocol Analysis (Problem Analysis)
 Present the expert with a series of realistic problems to solve aloud, probing for the rationale
behind the reasoning steps (solve the problem verbally)
 Widely used in psychology
 Ex: Dermatology-Psoriasis
 Expert Syst. to diagnose Psoriasis
 Color?
 How long rash lasts?
 Where is the rash?
Knowledge Acquisition Methods 4
4. Repertory Grid Analysis
• Identify important objects
• Identify important attributes
• Specific objects
• Example: Rash/Color/Duration/Level of itching/Local or whole body?
• For each attributes, establish a bipolar scale with differentiable characteristics and
their opposites
• Ex: Computer Language
• Assisting in selecting a computer language
• Identify objectives
• LISP, C (Procedural Lang), C++(OOP Lang)
• Attributes
• Availability, Ease of Programming, Training Time
• Orientation
• Traits
• high, low, symbolic, numeric
Reasoning Methods
• Deductive Reasoning
• Inductive Reasoning
• Forward Reasoning (Chaining)
• Reasoning starts with raw facts
• Backward Reasoning (Chaining)
• Reasoning starts with hypothesis as in statistics, them moves to prove or
disprove hypothesis
RGA Input for Selecting a Computer Language
Attributes:
Trait
or
Opposite
Availability:
Widely Available
or
Not Available
Ease of Programming:
High
or
Low
(C++)
(C)
Training Time:
Low
or
High
Orientation:
Symbolic
or
Numeric
Example:
The Animal Problem – Done in LISP – “Symbol Oriented
Can store colors – Red/Blue/Orange/Green
1 variable can be 26 Char long/1 char long
Automatic Knowledge Acquisition Techniques
• Methods
• Rule Induction –
• DE provides some examples similar to Data Mining, then apply Statistical/ Mathematical Techniques
such as Multivariate Regression
• Artificial Neural Net (ANN) –
• Qualitative Approach-Statistical & Mathematical Methods/Dev. Intelligent Machine/Data Mining
• Case-based Reasoning - asking DE to provide case/Law - Attorney
• Work by previous cases/Dev. argument from previous cases
• Use previous as base argument
• Example: Help Desk
• Printer not functioning
• Refer to previous case from “n” weeks ago
Automatic Knowledge Acquisition Techniques
• Methods
• Model-based Reasoning
•
•
•
•
Applicable to design of an engineering application
Give me specifications of some hardware
Used often in NASA
Build a model using DE knowledge
Download