Knowledge Representation
Knowledge Representation
References:
1) Introduction to Artificial Intelligence & Expert
Systems, Dan W Patterson, PHI.,2010
2) S Kaushik, Artificial Intelligence, Cengage Learning,
1st ed.2011
Definition
• Knowledge representation (KR) is a fundamental
concept in Artificial Intelligence (AI) concerned
with how to encode information and knowledge
about the world in a way that computers can
understand and reason about.
• It's essentially the bridge between the vast
amount of data available and the ability of AI
systems to use that data for intelligent tasks.
Key aspects of knowledge representation:
• Goals:
– Enable AI systems to solve complex problems.
– Facilitate reasoning and inference based on the knowledge.
– Allow for learning and knowledge acquisition from data or
experience.
• Key Considerations:
– What knowledge needs to be represented?
(facts, objects, events, relationships)
– How to structure the knowledge?
(logic, rules, frames, semantic networks)
– How to reason with the knowledge?
(deduction, induction, analogy)
• Key Components:
– Objects: Represent entities in the world (e.g., cars, houses, people).
– Attributes: Describe properties of objects (e.g., color, size, location).
– Relationships: Specify connections between objects (e.g., ownership,
part-of).
– Rules: Encode logical statements about the world (e.g., "birds can
fly").
• Common KR Techniques:
– Logic: Formal languages like propositional logic and predicate logic for
representing facts and rules.
– Semantic Networks: Nodes represent objects, and links represent
relationships between them.
– Frames: Structured representations of objects with attributes and
values.
– Production Rules: "If-then" rules that capture cause-and-effect
relationships.
Why is KR important?
• KR is crucial for building intelligent systems that can learn, reason,
and solve problems in the real world. By representing knowledge
effectively, AI systems can:
– Understand complex situations.
– Make informed decisions.
– Adapt to new information and environments.
– Explain their reasoning process (important for transparent AI).
-
• The steps are:
– The informal formalism of the problem takes place
first.
– It then represented formally and the computer
produces an output.
– This output can then represented in an informally
described solution that user understands or checks for
consistency.
• The Problem solving requires,
– Formal knowledge representation, and
– Moreover, Conversion of informal knowledge to a
formal knowledge that is the conversion of implicit
knowledge to explicit knowledge
Mapping between Facts and Representation
• The simplest way to represent declarative facts is a set of relations of the same sort
used in the database system.
• Provides a framework to compare two objects based on equivalent attributes. o Any
instance in which two different objects are compared is a relational type of knowledge.
• The table below shows a simple way to store facts.
– Also, The facts about a set of objects are put systematically in columns.
– This representation provides little opportunity for inference
• Given the facts, it is not possible to answer a simple question such as: “Who is the
heaviest player?”
• Also, But if a procedure for finding the heaviest player is provided, then these facts will
enable that procedure to compute an answer.
• Moreover, We can ask things like who “bats – left” and “throws – right”.
• Each fact about a set of objects is set out systematically in columns
• This representation gives little opportunity for inference, but it can
be used as the knowledge basis for inference engines.
• Simple way to store facts.
• Little opportunity for inference.
• Knowledge basis for inference engines.
• cx
Proofs
• A proof of proposition P in natural deduction
starts from axioms and assumptions and
derives P with all assumptions discharged.
• Every step in the proof is an instance of an
inference rule with metavariables substituted
consistently with expressions of the
appropriate syntactic class.
Example
Forward and Backward Reasoning
• in AI planning, forward chaining and backward chaining are strategies used in
rule-based systems.
• Forward Representation
• Definition: Starting from the initial state and progressing toward the goal by
applying actions or rules step-by-step.
• Ex: Autonomous Vehicle Navigation
A self-driving car uses forward representation to plan routes. It begins with real-
time sensor data (current location, obstacles, traffic) and incrementally
simulates possible paths forward to reach the destination.
• Each decision (e.g., turning left, accelerating) is based on the immediate state,
updating dynamically as new data arrives.
• Recommendation Systems: Analyzing user behavior (initial data) to predict and
suggest products (goal).
• Manufacturing Robots: Assembling parts sequentially from raw materials to a
finished product.
• Backward Reasoning
– Starting from the goal state and working backward to determine the necessary
steps or conditions to achieve it.
• Ex: Medical Diagnosis Systems – expetr system
An AI diagnostic tool (e.g., IBM Watson Health) uses backward
representation by hypothesizing a disease (goal) and validating it against
symptoms, lab results, and patient history.
• Ex: if the system considers "pneumonia" as a possible diagnosis, it checks
backward for supporting evidence like fever, cough, or X-ray findings
• Ex: Chess Engines
Advanced chess AIs use retrograde analysis for endgame scenarios. They
precompute optimal moves by starting from checkmate positions (goal)
and working backward to evaluate current move sequences.
• This backward approach ensures efficient calculation of winning strategies.
• Theorem Provers: Breaking down complex theorems into sub-goals and
axioms.
• Customer Support Chatbots: Identifying a user’s intent (goal) and
backtracking to gather required information.
• Eg:
• X,y=1,2
• If x==1 & y==3
– Then z=3
• If z==3
– Class is over
• There are four factors influencing the type of reasoning. They
are:
1. Are there more possible start or goal state? We
move from smaller set of sets to the length.
2. In what direction is the branching factor greater?
We proceed in the direction with the lower
branching factor.
3. Will the program be asked to justify its reasoning
process to a user? If, so then it is selected since it
is very close to the way in which the user thinks.
4. What kind of event is going to trigger a problem-
solving episode? If it is the arrival of a new factor, the
forward reasoning makes sense. If it is a query to which
a response is desired, backward reasoning is more
natural.
Examples for Forward Reasoning:
• Autonomous Navigation:
• Spam Filtering:
• Recommendation Systems:
• Fraud Detection:
• Scientific Discovery:
Examples for Backward Reasoning:
• Medical Diagnosis:
• Game Playing (Chess, Go):
• Theorem Proving:
• Robot Path Planning:
• Natural Language Question Answering:
THANK YOU