Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2 — Approaches to Knowledge Representation

Lesson 16 of 34 in the free Artificial Intelligence notes on Siksha Sarovar, written by Rohit Jangra.

Approaches Used in Knowledge Representation

There is no single "correct" way to represent knowledge inside a machine — different approaches trade off expressiveness, ease of reasoning, and ease of construction differently.

1. Logical (Formal) Representation

Uses propositional or predicate logic to state facts as formulas that can be manipulated with formal inference rules (e.g., modus ponens). Precise and mathematically sound; covered in depth in the next lesson.

2. Semantic Networks

A graph of nodes (objects/concepts) connected by labelled edges (relationships) such as IS-A and HAS-A.

Inheritance lets "Canary" automatically acquire properties of "Bird" and "Animal" (e.g., can fly, needs food) without stating them explicitly.

3. Frames

A frame is a data structure bundling a concept together with its attributes ("slots") and their values, similar to an object in OOP.

Frame: Car
  slot: has-wheels     value: 4
  slot: powered-by      value: engine
  slot: is-a            value: vehicle
  slot: max-speed        default: 180 km/h

Frames support default values (assumed true unless overridden) and inheritance through IS-A slots, and can attach small procedures ("procedural attachments") that run when a slot is read or written.

4. Scripts

A script represents a stereotyped sequence of events for a common situation — useful for understanding narrative/text.

Example — "Restaurant script": enter, be seated, read menu, order, eat, pay bill, leave. Once a system recognises "restaurant," it can fill in unstated but expected steps (e.g., infer a menu was read even if the text never says so).

5. Production Rules

Knowledge stated as IF–THEN rules (already introduced as the engine of production systems in Unit 1) — e.g., "IF patient has fever AND rash THEN consider measles."

Comparing the Approaches

ApproachStrengthWeaknessTypical use
LogicalPrecise, provably correct inferenceCan be unwieldy for common-sense knowledgeTheorem proving, formal verification
Semantic networksIntuitive, natural inheritanceAmbiguous semantics for some relations; hard to represent quantifiersTaxonomies, ontologies
FramesGood for structured, attribute-rich objectsInheritance conflicts (multiple parents) can be trickyObject-style domain modelling
ScriptsCaptures expected sequences wellRigid — poor fit for atypical situationsStory/discourse understanding
Production rulesModular, easy to add/explainCan grow unwieldy; rule interactions hard to predict at scaleExpert systems