note

01 Fundamentals Kbai

Fundamentals of Knowledge-Based AI

Prerequisites

Learning Goals

After completing this module, you will be able to:

  1. Define knowledge-based AI and distinguish it from other AI approaches
  2. Understand the fundamental conundrums and characteristics of AI
  3. Describe cognitive system architecture with its three layers
  4. Create and use semantic networks as knowledge representations
  5. Apply the “represent and reason” paradigm to solve problems
  6. Evaluate knowledge representations based on key criteria

1. Introduction to Knowledge-Based AI

The Five Fundamental Conundrums of AI

Knowledge-Based AI must address five core challenges that define the field:

Conundrum 1: Computational Resources vs. Complexity

Conundrum 2: Local Computation vs. Global Constraints

Conundrum 3: Deductive Logic vs. Abductive/Inductive Problems

Conundrum 4: Limited Knowledge vs. Novel Problems

Conundrum 5: Complexity of Explanation

Characteristics of AI Agents

AI agents operate under bounded rationality with these inherent limitations:

  1. Limited Computing Power: Constrained processing speed and memory
  2. Limited Sensors: Cannot perceive everything in the world
  3. Limited Attention: Cannot focus on everything simultaneously
  4. Deductive Logic: Fundamentally deductive computational systems
  5. Incomplete Knowledge: World knowledge is partial relative to the full world

Central Question: How can AI agents with bounded rationality address open-ended problems in complex, dynamic environments?


2. The Four Schools of AI

AI approaches can be categorized along two dimensions, creating four distinct schools:

The Two Dimensions

Dimension 1: Thinking vs. Acting

Dimension 2: Optimally vs. Human-like

The Four Quadrants

                    Optimally                Human-like
               ┌─────────────────┬──────────────────────┐
   Thinking    │  Optimal        │  Human-like          │
               │  Reasoning      │  Thinking            │
               │                 │  (Cognitive          │
               │                 │   Modeling)          │
               ├─────────────────┼──────────────────────┤
   Acting      │  Optimal        │  Human-like          │
               │  Behavior       │  Acting              │
               │  (Rational      │                      │
               │   Agents)       │                      │
               └─────────────────┴──────────────────────┘

Examples:

KBAI Position: Knowledge-Based AI primarily occupies the right side of the spectrum (human-like), focusing on human-level, human-like intelligence. KBAI is concerned with both thinking and acting, but always from a cognitive perspective.


3. Cognitive Systems

Definition

Cognitive Systems are systems that exhibit human-level, human-like intelligence through interaction among components like learning, reasoning, and memory.

Three-Layer Cognitive Architecture

Cognitive systems map percepts (inputs from the world) to actions (outputs to the world) through three distinct layers:

        Percepts from World

    ┌──────────────────────────┐
    │    METACOGNITION         │  ← Reasoning about reasoning
    │  (Thinking about         │    Self-reflection and
    │   thinking)              │    strategy adjustment
    ├──────────────────────────┤
    │    DELIBERATION          │  ← Goal-driven reasoning
    │  ┌──────────────────┐   │    Planning and problem-solving
    │  │    Learning      │←──┼──┐
    │  │       ↕          │   │  │
    │  │    Reasoning ←───┼───┼──┤ Tightly coupled
    │  │       ↕          │   │  │ processes
    │  │     Memory       │←──┼──┘
    │  └──────────────────┘   │
    ├──────────────────────────┤
    │    REACTION              │  ← Direct percept-action mapping
    │  (Reflexive response)    │    Fast, automatic responses
    └──────────────────────────┘

        Actions on World

Layer 1: Reaction

Layer 2: Deliberation

Layer 3: Metacognition

The Deliberation Trinity

The three processes of deliberation form a unified, interdependent system:

         Learning ←→ Reasoning
             ↕           ↕
           Memory ←──────┘

Interconnections:

Key Principle: KBAI develops unified theories that integrate reasoning, learning, and memory rather than treating them separately.


4. Semantic Networks

What Are Semantic Networks?

Semantic networks are structured knowledge representations that explicitly capture objects, relationships, and transformations using nodes and labeled links.

Structure of Semantic Networks

Lexicon (Vocabulary):

Structure (Composition):

Semantics (Inference):

Example: Ravens Progressive Matrices (2×1)

Consider a simple visual analogy problem: A is to B as C is to D

Image A:

Diamond  ──inside──▶  Circle

Diamond  ──size=small

Semantic Network for A:

        inside

Diamond ───────▶ Circle

   │

 size=small

Image B:

Diamond  ──outside──▶  Circle

Diamond  ──size=large

Semantic Network for B:

        outside

Diamond ───────▶ Circle

   │

 size=large

Transformation A → B:

inside  →  outside

small   →  large

Characteristics of Good Representations

A good knowledge representation exhibits these properties:

1. Makes Relationships Explicit

2. Exposes Natural Constraints

3. Right Level of Abstraction

4. Transparent and Concise

5. Computationally Efficient

6. Computable

Key Insight: “If you have the right knowledge representation, problem solving becomes very easy.”


5. Guards and Prisoners Problem

Problem Statement

A classic AI problem that illustrates semantic networks in action:

Setup:

Constraint:

Goal: Find a sequence of boat trips that safely transports everyone to the right bank.

Semantic Network Representation

Node Structure: Each node represents a complete state of the problem:

State Node:
┌─────────────────────────────┐
│  Left Bank: G G P P         │
│  Boat Position: Right       │
│  Right Bank: G P            │
└─────────────────────────────┘

Link Labels: Links between nodes show transitions (boat trips):

Example Transition:

Initial State              After First Move
┌─────────────┐           ┌─────────────┐
│ L: GGG PPP  │ ──────→   │ L: GG PP    │
│ Boat: Left  │   Move     │ Boat: Right │
│ R: (empty)  │   G + P    │ R: G P      │
└─────────────┘           └─────────────┘

Problem-Solving with Semantic Networks

The semantic network representation enables:

  1. Systematic State Generation

    • From any state, generate all possible next states
    • Each boat trip creates a new state node
  2. Constraint Checking

    • Immediately identify illegal states (prisoners > guards)
    • Remove illegal states from consideration
  3. Path Finding

    • Search for path from initial state to goal state
    • Avoid cycles (returning to previously visited states)
    • Track productive vs. unproductive moves
  4. Solution Visualization

    • The complete solution is a path through the network
    • Each node on the path represents a safe state
    • Each link represents a legal boat trip

Sample Solution Sequence:

(3G,3P,L) → (2G,2P,L)+(G,P,R) → (3G,2P,L)+(P,R) →
(3G,L)+(2P,R) → (3G,1P,L)+(P,R) → (1G,1P,L)+(2G,2P,R) →
(2G,2P,L)+(G,P,R) → (2G,1P,L)+(G,P,R) → (2G,L)+(G,3P,R) →
(3G,L)+(3P,R) → (1G,L)+(2G,3P,R) → (1G,1P,L)+(2G,2P,R) →
(R)+(3G,3P,R) ✓

6. Represent and Reason Paradigm

Core Concept

The represent and reason paradigm is fundamental to all knowledge-based AI:

  1. Represent: Create an explicit knowledge representation of the problem
  2. Reason: Use that representation to solve the problem

This two-step approach underlies virtually all KBAI methods.

Application to Ravens Problems

Problem: A is to B as C is to ? (Choose from options 1-6)

Step 1: Represent

Step 2: Reason

Example Reasoning:

Transformation A → B:
  - Object moved: inside → above
  - Object expanded: small → large

Test C → Option 5:
  - Object moved: inside → above  ✓ Match
  - Object expanded: small → large ✓ Match

Option 5 is likely correct!

Weighted Matching

Sometimes multiple answers partially match. Use weighted comparison:

Criteria for Matching:

  1. Exact matches: Transformation is identical (highest weight)
  2. Partial matches: Some aspects match, others differ (medium weight)
  3. Unchanged matches: Property stays same in both (low weight)
  4. Mismatches: Transformations are different (negative weight)

Example:

Option 2: 2 matching properties (weight +2)
Option 4: 1 matching property (weight +1)
Option 5: 3 matching properties (weight +3) ← Best choice

The option with the highest total weight is selected as the answer.


7. Cognitive Connections

Semantic Networks and Human Cognition

Connection 1: Knowledge Representation in Mind

Connection 2: Spreading Activation Networks Semantic networks relate to spreading activation theory of human memory:

Example: Story Understanding

Story: "John wanted to become rich. He got a gun."

Your inference: John will rob a bank

How?
1. "Rich" node activates in memory
2. "Gun" node activates in memory
3. Activation spreads through connected concepts
4. Paths merge at "rob bank" concept
5. Nodes along the merged path become active
6. These activated concepts form your understanding

This explains how humans draw inferences from incomplete information - concepts activate related concepts through spreading activation.

Connection 3: Structured Representations


Summary

Key Takeaways

  1. Knowledge-Based AI focuses on human-like intelligence through structured knowledge representations, distinguished from other AI approaches by its cognitive orientation.

  2. Five AI Conundrums define the fundamental challenges: limited resources vs. intractable problems, local computation vs. global constraints, deductive logic vs. abductive/inductive reasoning, limited knowledge vs. novel problems, and complexity of explanation.

  3. Cognitive Systems Architecture has three layers:

    • Reaction (direct percept-action mapping)
    • Deliberation (reasoning + learning + memory, tightly integrated)
    • Metacognition (reasoning about reasoning)
  4. Semantic Networks are structured knowledge representations using nodes (objects), links (relationships), and labels (semantics) that make knowledge explicit and support reasoning.

  5. Good Representations are explicit, expose constraints, work at the right abstraction level, are transparent and concise, enable fast computation, and support necessary inferences.

  6. Represent and Reason is the fundamental paradigm: create explicit representations, then reason over them to solve problems.

  7. Cognitive Connection: KBAI methods mirror human cognition, particularly in knowledge representation and spreading activation in memory.

Essential Principles


See Also


Knowledge representations are at the heart of KBAI. The representation you choose determines how easy or hard problem-solving becomes.