Docsity

Artifical intelligence notes part 2, Study notes of Artificial Intelligence

Toggle sidebar
bg1
Knowledge Representation (KR): Approaches and Issues
1. Introduction (Definition)
Knowledge Representation (KR) is a way of storing knowledge in a computer system so that an AI
program can understand, reason, and make decisions.
It is a bridge between human knowledge and machine reasoning.
2. Approaches to Knowledge Representation
1. Logical Representation
•
Knowledge is represented using formal logic
•
Uses propositional logic and predicate logic
•
Example:
All humans are mortal
Human(Socrates) → Mortal(Socrates)
Advantages
•
Precise and unambiguous
•
Supports reasoning
Limitations
•
Difficult to represent uncertain knowledge
2. Semantic Network
•
Knowledge is represented as a graph
•
Nodes represent objects/concepts
•
Links represent relationships
Example:
“Dog” → is-a → “Animal”
Advantages
•
Easy to understand
•
Shows relationships clearly
Limitations
•
Weak inference mechanism
3. Frame-Based Representation
•
Knowledge is stored in frames (data structures)
•
Each frame has slots and values
•
Supports inheritance
UNIT 2
18 January 2026
14:55
New Section 3 Page 1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Artifical intelligence notes part 2 and more Study notes Artificial Intelligence in PDF only on Docsity!

Knowledge Representation (KR): Approaches and Issues

1. Introduction (Definition)

Knowledge Representation (KR) is a way of storing knowledge in a computer system so that an AI program can understand, reason, and make decisions. It is a bridge between human knowledge and machine reasoning.

2. Approaches to Knowledge Representation

1. Logical Representation

  • Knowledge is represented using formal logic
  • Uses propositional logic and predicate logic
  • Facts and rules are written as logical expressions Example: All humans are mortal Human(Socrates) → Mortal(Socrates) Advantages
  • Precise and unambiguous
  • Supports reasoning Limitations
  • Difficult to represent uncertain knowledge

2. Semantic Network

  • Knowledge is represented as a graph
  • Nodes represent objects/concepts
  • Links represent relationships Example: “Dog” → is-a → “Animal” Advantages
  • Easy to understand
  • Shows relationships clearly Limitations
  • Weak inference mechanism

3. Frame-Based Representation

  • Knowledge is stored in frames (data structures)
  • Each frame has slots and values
  • Supports inheritance

UNIT 2

18 January 2026 14:

  • Supports inheritance Example: Frame: Bird Slot: can-fly → yes Advantages
  • Structured and organized
  • Good for real-world objects Limitations
  • Not suitable for complex reasoning

4. Rule-Based Representation (Production Rules)

  • Knowledge represented as IF–THEN rules Example: IF fever AND cough THEN disease = flu Advantages
  • Easy to understand
  • Widely used in expert systems Limitations
  • Large rule sets are hard to manage

5. Ontology-Based Representation

  • Uses a formal vocabulary to describe concepts
  • Defines relationships clearly Advantages
  • Shared and reusable knowledge
  • Supports interoperability Limitations
  • Time-consuming to build 3. Issues in Knowledge Representation

1. Representational Adequacy

  • Ability to represent all required knowledge

2. Inferential Adequacy

  • Ability to derive new knowledge from existing knowledge

3. Inferential Efficiency

  • Reasoning should be fast and efficient

4. Acquisitional Efficiency

  • Knowledge should be easy to add, update, and modify

5. Handling Uncertainty

  • Difficulty in representing incomplete or uncertain knowledge

6. Knowledge Consistency

  • Avoiding **contradictory facts
  1. Comparison Table (Very Scoring) Approach Representation Advantage Limitation** Logic Facts & rules Precise Hard with uncertainty
  • Collects information from the environment
  • Converts percepts into facts

4. Action Module

  • Executes actions based on reasoning results

5. Knowledge Acquisition Module

  • Adds new knowledge to the knowledge base
  • Helps the agent learn and update facts 3. Working of a Knowledge-Based Agent The working follows a sense–think–act cycle : 1. Perceive the environment 2. Update the knowledge base 3. Reason using inference **4. Select an action
  1. Perform the action** This cycle continues until the goal is achieved. 4. Architecture of Knowledge-Based Agent (Explanation) Environment → Sensors → Knowledge Base ↓ Inference Engine ↓ Action Selection ↓ Actuators → Environment 5. Example of Knowledge-Based Agent

Medical Diagnosis System

  • Knowledge Base: Diseases and symptoms
  • Inference Engine: Diagnoses disease
  • Action: Suggests treatment

Other Examples

  • Expert systems
  • Intelligent tutors
  • Game-playing agents
  • Chatbots (rule-based) 6. Advantages of Knowledge-Based Agents
  • Can reason logically
  • Knowledge is explicit and explainable
  • Easy to update and modify
  • Suitable for complex decision-making 7. Limitations of Knowledge-Based Agents
  • Knowledge acquisition is difficult
  • Reasoning can be slow
  • Hard to handle uncertainty
  • Requires accurate knowledge 8. Difference: Simple Agent vs Knowledge-Based Agent

8. Difference: Simple Agent vs Knowledge-Based Agent Feature Simple Agent Knowledge-Based Agent Knowledge storage No Yes Reasoning No Yes Flexibility Low High Intelligence Limited Advanced 9. Conclusion Knowledge-Based Agents are powerful AI agents that store knowledge explicitly and reason intelligently before acting. They form the foundation of expert systems and intelligent decision- making systems in AI. **Propositional Logic in Artificial Intelligence

  1. Introduction (Definition) Propositional Logic** is a formal system of logic used in AI to represent knowledge using propositions that can be either true or false , but not both. It is the simplest form of logic used in knowledge representation and reasoning. 2. Basic Elements of Propositional Logic

1. Propositions

  • A proposition is a declarative statement
  • Has a truth value: True (T) or False (F) Example:
  • “It is raining” → True / False
  • “x + 2 = 5” → Not a proposition (depends on x)

2. Logical Connectives

Used to combine propositions: Symbol Name Meaning ¬ NOT Negation ∧ AND Conjunction ∨ OR Disjunction → IMPLIES Implication ↔ IFF Bi-conditional Example: If it rains, then the road is wet R → W

3. Syntax of Propositional Logic Syntax defines how propositions are written. Rules: - Propositional symbols: P, Q, R - If P and Q are propositions, then: ○ ¬P ○ P ∧ Q ○ P ∨ Q P → Q

10. Conclusion Propositional Logic is the foundation of logical reasoning in AI. Although limited in expressiveness, it is widely used for simple reasoning and decision-making tasks. **Predicate Logic: Unification and Resolution (PYQs- Oriented Answer)

  1. Predicate Logic (Brief Introduction) Predicate Logic** (First Order Logic – FOL) is an extension of propositional logic that can represent:
    • Objects
    • Properties
    • Relations
    • Quantifiers It is more powerful and expressive than propositional logic. 2. Unification

Definition

Unification is the process of making two logical expressions identical by finding suitable substitutions for variables. It is mainly used in automated reasoning and resolution.

Need for Unification

  • To match predicates with variables
  • To apply inference rules
  • To enable resolution in predicate logic

Example of Unification

Consider:

  • P(x, a)
  • P(b, y) To make them identical:
  • x → b
  • y → a Substitution set (θ): {x/b, y/a}

Another Example

Predicate 1: Knows(John, x) Predicate 2: Knows(John, Mary) Unification result:

  • x → Mary

Unification Algorithm (Steps)

  1. Compare predicate names
  2. Match constants with constants
  3. Replace variables with constants/variables
  4. If conflict occurs → unification fails

Advantages of Unification

Advantages of Unification

  • Makes reasoning flexible
  • Enables general rules
  • Essential for resolution 3. Resolution

Definition

Resolution is a rule of inference used to derive new knowledge by eliminating complementary literals. It is a proof by contradiction technique.

Steps in Resolution (Predicate Logic)

  1. Convert knowledge into First Order Logic
  2. Convert FOL into Clause Form (CNF)
  3. Apply Skolemization
  4. Remove quantifiers
  5. Use unification
  6. Apply resolution rule

Resolution Rule

From:

  • (A ∨ B)
  • (¬A ∨ C) We can infer:
  • (B ∨ C)

Example of Resolution

Given:

  1. ∀x (Human(x) → Mortal(x))
  2. Human(Socrates) Convert to clauses:
  • ¬Human(x) ∨ Mortal(x)
  • Human(Socrates) Unify:
  • x → Socrates Resolve:
  • Mortal(Socrates) Hence proved. 4. Importance of Unification in Resolution
  • Resolution cannot work without unification
  • Unification allows variable matching
  • Makes resolution applicable to predicate logic 5. Advantages and Limitations

Advantages

  • Sound and complete inference method
  • Used in theorem proving
  • Supports automated reasoning

Limitations

  • Computationally expensive
  • Complex for large knowledge bases

The system cannot infer anything beyond what is directly stored.

6. Advantages - Easy to design and implement - Clear and structured representation - Suitable for simple applications 7. Limitations - Cannot represent complex relationships - No support for logical reasoning - Cannot derive new knowledge - Less flexible 8. Weak vs Strong Slot–Filler Structure (Very Important) Feature Weak Slot–Filler Strong Slot–Filler Reasoning Not supported Supported Inference Very limited Strong Rules No Yes Intelligence Low High 9. Applications - Simple databases - Static information systems - Basic knowledge storage 10. Conclusion Weak Slot–Filler Structure is a basic knowledge representation method that stores information in a simple attribute–value format. Although easy to use, it lacks reasoning power and is therefore limited in intelligent applications. **Strong Slot–Filler Structure (Knowledge Representation)

  1. Introduction (Definition)** A Strong Slot–Filler Structure is an advanced knowledge representation method in AI where knowledge is stored in frames with slots and fillers , along with rules, constraints, and inference

knowledge is stored in frames with slots and fillers , along with rules, constraints, and inference mechanisms. It is called strong because it supports reasoning and knowledge inference.

2. Basic Concept - Frame → Represents an object or concept - Slots → Attributes of the object - Fillers → Values, procedures, or rules - Inheritance → Child frames inherit properties from parent frames Unlike weak structures, strong slot–filler structures can derive new knowledge. 3. Structure of Strong Slot–Filler Representation

Example: Bird Frame

Frame: Animal

  • has-life → yes Frame: Bird (inherits from Animal)
  • has-wings → yes
  • can-fly → usually yes Frame: Penguin (inherits from Bird)
  • can-fly → no This shows inheritance with exception handling. 4. Key Features
  • Supports inheritance
  • Contains procedural attachments (IF-needed, IF-added)
  • Allows default values
  • Supports reasoning and inference 5. Inference in Strong Slot–Filler Structure
  • If a value is not present, it is inherited from parent frame
  • Rules can trigger actions
  • Default values can be overridden 6. Advantages
  • Powerful and flexible
  • Supports reasoning and inference
  • Efficient for complex knowledge
  • Easy to model real-world objects 7. Limitations
  • Complex to design
  • Higher memory usage
  • Reasoning may be slow
  • Not suitable for simple problems 8. Comparison: Weak vs Strong Slot–Filler Structure Feature Weak Slot–Filler Strong Slot–Filler Inference No Yes Rules No Yes Inheritance No Yes Intelligence Low High