MODULE 1.
2
CS1542 : ARTIFICIAL INTELLIGENCE
DEFINITION OF KNOWLEDGE
Knowledge plays a major role in building intelligent systems.
Knowledge is awareness or familiarity gained by experiences of facts, data, and situations.
Knowledge is the body of facts and principles.
Knowledge can be language, concepts, procedures, rules, ideas, abstractions, places, customs and so on.
A common way to represent knowledge external to a computer or a human is in the form of written language.
Study of knowledge is called Epistemology.
Example:
Ramu is tall – This expresses a simple fact, an attribute possessed by a person
Ramu loves his mother – This expresses a complex binary relation between two persons
IMPORTANCE OF KNOWLEDGE IN AI
Better Decisions: Knowledge helps AI make smarter choices based on data, improving results in areas like healthcare and finance.
Solving Problems: AI uses knowledge to tackle tough problems quickly, finding solutions that might take humans much longer.
Expert Automation: AI can do tasks that usually require expert knowledge, allowing people to focus on more important work
Personalized Experience: AI can use knowledge to give tailored recommendations, making services more relevant to individuals.
Learning and Adapting: Knowledge helps AI learn from new information, getting better at its tasks over time.
Widespread Expertise: Knowledge-based AI can share expertise across a company, ensuring everyone follows best practices.
Cross-Field Innovation: AI can combine knowledge from different areas, leading to new ideas and collaboration.
Managing Risks: AI uses knowledge to identify risks and create plans to reduce them, especially in finance and healthcare.
Keeping Knowledge Alive: AI helps store and share important information, making sure valuable knowledge isn’t lost.
Staying Competitive: Organizations that use AI effectively can gain an edge over their rivals, leading to more success.
TYPES OF KNOWLEDGE
Following are the various types of knowledge:
1. Declarative Knowledge
2. Procedural Knowledge
3. Meta-knowledge:
4. Heuristic knowledge:
5. Structural knowledge:
Fig.1 Types of Knowledge
Declarative Knowledge Procedural Knowledge
TYPES OF KNOWLEDGE
Declarative knowledge is to know about something and It is also known as imperative knowledge.
it is a passive knowledge..
Procedural knowledge is a type of knowledge which
It includes concepts, facts, and objects.
is responsible for knowing how to do something.
It is also called descriptive knowledge and expressed in
It can be directly applied to any task.
declarative sentences.
It is simpler than procedural language. It includes rules, strategies, procedures, agendas, etc.
Example mark statement of a student. Procedural knowledge depends on the task on
which it can be applied.
Meta-knowledge Structural knowledge
TYPES OF KNOWLEDGE Structural knowledge is basic knowledge to problem-
Knowledge about the other types of knowledge is
called Meta-knowledge. solving.
It describes relationships between various concepts such
Heuristic knowledge as kind of, part of, and grouping of something.
Heuristic knowledge is representing knowledge of some experts
It describes the relationship that exists between
in a field or subject.
concepts or objects.
Heuristic knowledge is based on previous experiences,
awareness of approaches, and which are good to work but not
guaranteed.
Heuristic knowledge are rules or tricks used to make judgement
and also to simplify solutions of problems. It is acquired through
experience. An expert uses his knowledge that has gathered due
to his experience and learning.
TURING TEST
One of the great figures in the history of Artificial Intelligence is Alan Turing. He considered as the Father of Artificial
Intelligence. After the Second World War, he began to work on the idea of the possibility of building a computer that
could think (or possess Intelligence). His paper published in 1950, Computing Machinery & Intelligence, was one of the first
papers to be written on this subject.
The Turing test was designed by Turing as a way to judge the success or otherwise of an attempt to produce a thinking machine
or a computer.
It was based on the idea that if a person who interrogated the computer & a human without being aware of their identity in
separate rooms could not distinguish between which one was the answers given by a human or which one was by a computer
after a series of questioning process, then to all intents and purposes, Turing said, the machine /computer is intelligent.
The test is designed as follows:
TURING TEST
During the Turing test, a machine/computer that claims
to have intelligence is kept in Room A, a human in kept in
Room B, a human interrogator in Room C . The human
interrogator in Room C have no idea about who the
occupants in Room A or B (either it is computer or
human). He can communicate by asking questions by tele
typing and cannot directly interact with them. After a
period of time, after the interrogation process, if the
interrogator cannot identify who is in Room A or in B
(i.e. machine from the human) then machine is said to
possess intelligence.
KNOWLEDGE-BASED SYSTEM (KBS)
A knowledge-based system (KBS) is a form of artificial intelligence (AI) that aims to capture the knowledge
of human experts to support decision-making. Examples of knowledge-based systems include expert systems,
which are so called because of their reliance on human expertise.
A KBS assists with solving problems, particularly complex issues, by artificial intelligence.
These systems are primarily used to support human decision making, learning, and other activities.
A knowledge-based system is a major area of artificial intelligence.
These systems can make decisions based on the data and information that resides in their database.
A knowledge-based system is comprised of a knowledge base and an interface engine. The knowledge base
functions as the knowledge repository, while the interface engine functions as the search engine
AI Agents
▪ The agents sense the environment through sensors and act on their environment through actuators.
▪ An AI agent can have mental properties such as knowledge, belief, intention, etc.
▪ An agent can be anything that perceive its environment through sensors and act upon that environment
through actuators.
▪ An Agent runs in the cycle of perceiving, thinking, and acting
▪ An agent can be:
• Human-Agent: A human agent has eyes, ears, and other organs which work for sensors and hand, legs,
vocal tract work for actuators.
• Robotic Agent: A robotic agent can have cameras, infrared range finder, NLP for sensors and various
motors for actuators.
• Software Agent: Software agent can have keystrokes, file contents as sensory input and act on those
inputs and display output on the screen.
Sensor: Sensor is a device which detects the change in the environment and sends the information to other
electronic devices. An agent observes its environment through sensors.
Actuators: Actuators are the component of machines that converts energy into motion. The actuators are only
responsible for moving and controlling a system. An actuator can be an electric motor, gears, rails, etc.
Effectors: Effectors are the devices which affect the environment. Effectors can be legs, wheels, arms, fingers, wings,
fins, and display screen.
A rational agent is an agent which has clear preference, models uncertainty, and acts in a way to maximize its
performance measure with all possible actions. AI is about creating rational agents to use for game theory and
decision theory for various real-world scenarios.
KNOWLEDGE REPRESENTATION AND REASONING (KR)/(KRR)
Humans are best at understanding, reasoning, and interpreting knowledge. Human knows things, which is knowledge and as per their
knowledge they perform various actions in the real world. But how machines do all these things comes under knowledge representation
and reasoning.
Hence we can describe Knowledge representation as following:
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.
KNOWLEDGE REPRESENTATION
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 Knowledge base is a group of the Sentences (Here, sentences are used as a technical term and not identical with the
English language).
TECHNIQUES OF KNOWLEDGE REPRESENTATION
There are mainly four ways of knowledge representation
which are given as follows:
1. Logical Representation
2. Semantic Network Representation
3. Frame Representation
4. Production Rules / Scripts
LOGICAL REPRESENTATION
Logical representation is a language with some concrete rules which deals with propositions and has no ambiguity in
representation. 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.
Syntax:
o Syntaxes are the rules which decide how we can construct legal sentences in the logic.
o It determines which symbol we can use in knowledge representation.
o How to write those symbols.
Semantics:
o Semantics are the rules by which we can interpret the sentence in the logic.
o Semantic also involves assigning a meaning to each sentence.
▪ Logical representation can be categorized into mainly two logics:
a. Propositional Logics
b. Predicate logics
Advantages of logical representation:
1. Logical representation enables us to do logical reasoning.
2. Logical representation is the basis for the programming languages.
Disadvantages of logical Representation:
1. Logical representations have some restrictions and are challenging to work with.
2. Logical representation technique may not be very natural, and inference may not be so efficient.
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.
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. This network consists of nodes representing objects and arcs which describe the relationship between those objects. Semantic networks can categorize
the object in different forms and can also link those objects. 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
Example: Following are some statements which we need to represent in the form of nodes and arcs.
Statements:
a. Jerry is a cat.
b. Jerry is a mammal In the diagram, we have represented the
c. Jerry is owned by Priya. different type of knowledge in the form
d. Jerry is white colored. of nodes and arcs. Each object is
e. All Mammals are animal. connected with another object by some
relation.
Drawbacks in Semantic representation:
1. 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.
2. 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.
3. These types of representations are inadequate as they do not have any equivalent quantifier, e.g., for all, for some, none, etc.
4. Semantic networks do not have any standard definition for the link names.
5. These networks are not intelligent and depend on the creator of the system.
Advantages of Semantic network:
1. Semantic networks are a natural representation of knowledge.
2. Semantic networks convey meaning in a transparent manner.
3. These networks are simple and easily understandable.
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.
Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152
• 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.
• Example
Let's suppose we are taking an entity, Peter. Peter is an engineer 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: Slots Filter
Name Peter
Profession Doctor
Age 25
Marital status Single
Weight 78
Advantages of frame representation:
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.
Disadvantages of frame representation:
1. In frame system inference mechanism is not be easily processed.
2. Inference mechanism cannot be smoothly proceeded by frame representation.
3. Frame representation has a much generalized approach.
PRODUCTION RULES (OR) SCRIPTS
Production rules system consist of (condition, action) pairs which mean, "If condition then action". It has mainly three parts:
o The set of production rules
o Working Memory
o 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 [Link] 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:
o IF (at bus stop AND bus arrives) THEN action (get into the bus)
o IF (on the bus AND paid AND empty seat) THEN action (sit down).
o IF (on bus AND unpaid) THEN action (pay charges).
o IF (bus arrives at destination) THEN action (get down from the bus).
Advantages of Production rule:
1. The production rules are expressed in natural language.
2. The production rules are highly modular, so we can easily remove, add or modify an individual rule.
Disadvantages of Production rule:
1. Production rule system does not exhibit any learning capabilities, as it does not store the result of the problem for
the future uses.
2. During the execution of the program, many rules may be active hence rule-based production systems are inefficient.
KNOWLEDGE ORANGIZATION
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 subgoals 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
Knowledge acquisition is the process of extracting, structuring and organizing knowledge from one source, usually
human experts, so it can be used in software such as an Expert System.
Knowledge Acquisition is the transformation of knowledge from the forms in which it exists into forms that can
be used in a knowledge based system
The primary goal discover, develop and implement efficient, effective method of knowledge acquisition
It is a process of adding new knowledge to a knowledge base refining, improving previously acquire knowledge
Acquisition is usually associated with some definite purpose such as expanding the capabilities of system,
improving or enhancing the performance of some specific tasks
▪ Acquired knowledge consist of facts, rules, concept, procedure, formulas, relationship, stats, plans, heuristic
or any relevant information.
▪ The sources can be anyone of the following like-that , report, electronic document, database, newspaper,
news channel, soft copy of document etc.
Three model of knowledge acquisition –
1. Handcrafting - means code knowledge is converted into program directly
2. Knowledge Engineering - means working with expert system to organize knowledge in a suitable form
for an expert system to use.
3. Machine Learning - means to extract the knowledge from training examples