BTCE | 5th Sem
AiML SubjectUnit 2

(5th sem) AIML Chapter 2: Complete Concepts Guide

Chapter 2: Knowledge Representation and Concept Learning -> Generated and Prepared By Thiruselvan (ThiruXD)

Part A: Introduction to Knowledge Representation (Unit 6)

1. What is Knowledge Representation?

Knowledge Representation (KR) is the method of storing information, facts, rules and relationships in a form that a computer can understand, process and use for reasoning.

Simple meaning:

It is the way we give knowledge to an AI system so that it can think and make decisions.

Why is it important?

Without proper knowledge representation, an AI system cannot reason, answer questions or solve problems.

2. Goals of Knowledge Representation

  • Represent knowledge accurately
  • Allow easy inference (drawing conclusions)
  • Support efficient reasoning
  • Make knowledge easy to acquire and update

3. Knowledge Representation Issues

  • What to represent? (Which facts are important?)
  • How to represent? (Which format to use?)
  • Knowledge Acquisition (How to get knowledge into the system?)
  • Updating and Maintenance (How to change knowledge when new information comes?)

4. Requirements of a Good Knowledge Representation

RequirementMeaning
Representational AdequacyCan represent all kinds of required knowledge
Inferential AdequacyCan draw new conclusions from existing knowledge
Inferential EfficiencyCan draw conclusions quickly
Acquisitional EfficiencyEasy to add new knowledge

5. Types of Knowledge

TypeMeaningExample
Declarative KnowledgeFacts and information“Earth is round”
Procedural KnowledgeHow to do somethingSteps to diagnose a disease
Heuristic KnowledgeRules of thumb / expert experience“If fever + cough → high chance of flu”
Meta KnowledgeKnowledge about knowledge“This rule is more reliable than that rule”

Part B: Predicate Logic (Unit 7)

1. Why Predicate Logic?

Propositional logic is too limited (it can only say True/False for whole sentences).

Predicate Logic (also called First-Order Logic) is more powerful because it can talk about objects, properties and relationships.

2. Components of Predicate Logic

ComponentMeaningExample
ConstantsSpecific objectsRam, 5, Delhi
VariablesPlaceholders for objectsx, y, z
PredicatesProperties or relationsStudent(x), Loves(x,y)
FunctionsMapping from objects to objectsFatherOf(x), Age(x)

3. Quantifiers

  • Universal Quantifier (∀) → “For all”

    Example: ∀x Student(x) → Intelligent(x)

    (All students are intelligent)

  • Existential Quantifier (∃) → “There exists”

    Example: ∃x Student(x) ∧ Intelligent(x)

    (There exists at least one intelligent student)

4. Representing Knowledge using Predicate Logic

Facts:

  • Ram is a student → Student(Ram)
  • Ram loves Sita → Loves(Ram, Sita)

Rules:

  • All humans are mortal → ∀x Human(x) → Mortal(x)

5. Inference in Predicate Logic

Important techniques:

  • Unification – Making two expressions look the same by substituting values
  • Resolution – A powerful method to prove theorems
  • Logical reasoning using quantifiers and predicates

Part C: Rule-Based Knowledge Representation (Unit 8)

1. What are Rule-Based Systems?

A rule-based system stores knowledge in the form of IF–THEN rules.

Structure of a Rule:

IF condition THEN action/conclusion

Example:

IF fever AND cough THEN diagnosis = flu

2. Components of a Rule-Based System

ComponentRole
Knowledge BaseStores all the IF–THEN rules
Inference EngineApplies the rules to draw conclusions
Working MemoryStores current facts and temporary data

3. Inference Mechanisms

A. Forward Chaining (Data-driven)

  • Starts from known facts
  • Applies rules
  • Reaches conclusion
  • Example: Given symptoms → find disease

B. Backward Chaining (Goal-driven)

  • Starts from a goal
  • Works backwards to find supporting facts
  • Example: Suspect flu → check if symptoms match

4. Applications

  • Expert Systems
  • Medical Diagnosis
  • Decision Support Systems

Part D: Concept Learning Fundamentals (Unit 9)

1. What is Concept Learning?

Concept Learning is the process of learning a general concept (category) from a set of positive and negative training examples.

Simple meaning:

The system learns “what makes something belong to a category”.

Example: Learning the concept of “bird” from examples of sparrows, eagles (positive) and bats, airplanes (negative).

2. Concept Learning Task

  • Training Examples – Positive and negative instances
  • Target Concept – The true concept we want to learn
  • Hypothesis Space – All possible concepts the system can consider

The system searches through the hypothesis space to find the correct concept.

Two common strategies:

  • General-to-Specific Search
  • Specific-to-General Search

Version Space = Set of all hypotheses that are consistent with the training examples seen so far.


Part E: Find-S Algorithm (Unit 10)

1. Purpose of Find-S

Find-S finds the most specific hypothesis that fits all positive training examples.

2. How Find-S Works

  1. Start with the most specific hypothesis (everything is null)
  2. For each positive example:
    • Generalize the hypothesis just enough to cover the example
  3. Ignore negative examples
  4. Final hypothesis is the most specific one that covers all positive examples

3. Characteristics

  • Very simple
  • Finds the most specific hypothesis
  • Does not consider negative examples
  • Can miss better hypotheses

4. Advantages & Limitations

Advantages: Simple, fast, easy to understand

Limitations: Ignores negative examples, finds only one hypothesis, sensitive to noise


Part F: Candidate Elimination Algorithm (Unit 11)

1. Why Candidate Elimination?

Find-S gives only one hypothesis.

Candidate Elimination maintains the entire Version Space (all possible consistent hypotheses).

2. Version Space Representation

Version Space is represented by two boundaries:

  • S-boundary (Specific Boundary) → Most specific hypotheses
  • G-boundary (General Boundary) → Most general hypotheses

All hypotheses between S and G are possible.

3. How the Algorithm Works

  • Positive example → Generalize S-boundary
  • Negative example → Specialize G-boundary
  • Remove any hypothesis that becomes inconsistent

4. Advantages & Limitations

Advantages:

  • Finds all possible consistent hypotheses
  • Handles both positive and negative examples
  • More complete than Find-S

Limitations:

  • Computationally expensive for large hypothesis spaces
  • Sensitive to noisy data

Part G: Inductive Bias (Unit 12)

1. What is Inductive Bias?

Inductive Bias is the set of extra assumptions a learning algorithm makes to generalize beyond the training examples.

Simple meaning:

Without bias, a system cannot learn anything useful from limited examples. Bias helps it make smart guesses.

2. Types of Inductive Bias

TypeMeaning
Restriction BiasLimits the hypothesis space (considers only some types of hypotheses)
Preference BiasPrefers some hypotheses over others (e.g., simpler ones)

3. Inductive Bias in Algorithms

  • Find-S → Prefers the most specific hypothesis (Preference Bias)
  • Candidate Elimination → Considers only hypotheses in the version space (Restriction Bias)

4. Importance of Inductive Bias

  • Enables generalization
  • Improves learning efficiency
  • Helps in selecting better models
  • Essential for real-world learning

5. Applications

  • Machine Learning systems
  • Pattern Recognition
  • Intelligent decision-making systems

Complete Chapter 2 Summary (Must Remember)

  1. Knowledge Representation = Storing knowledge so AI can reason.
  2. Good KR needs: Representational Adequacy, Inferential Adequacy, Efficiency, Acquisitional Efficiency.
  3. Predicate Logic is more powerful than Propositional Logic (uses predicates, quantifiers, variables).
  4. Rule-Based Systems use IF–THEN rules + Inference Engine (Forward & Backward Chaining).
  5. Concept Learning = Learning a general concept from examples.
  6. Find-S → Finds most specific hypothesis (ignores negatives).
  7. Candidate Elimination → Maintains Version Space (S and G boundaries).
  8. Inductive Bias is necessary for generalization.

On this page