UNIHIVE

Study Hub UNIPORT CSC 494

CSC 494 · Introduction to Artificial Intelligence

Knowledge representation and knowledge-based systems

Ways to represent knowledge: rules, semantic networks, frames, scripts, ontologies, and handling uncertainty.

Our notes

2 min read

What knowledge representation is

Choosing a form in which facts, rules and relationships are stored so a program can reason with them. A good scheme is expressive, efficient to reason with, easy to understand and modify.

Kinds of knowledge

Declarative (facts), procedural (how to), meta-knowledge (knowledge about knowledge), heuristic (rules of thumb), common sense.

Schemes

SchemeDescriptionExample
Logicpropositional or first-order sentences∀x Bird(x) ⇒ HasFeathers(x)
Production rulesIF condition THEN actionIF temperature > 38 AND cough THEN suspect infection
Semantic networksnodes (concepts) joined by labelled links (is-a, has-part)Canary is-a Bird; Bird has-part Wings
Framesstructured records with slots and values, default values and inheritanceFrame Car: wheels 4, fuel petrol (default)
Scriptsstereotyped sequences of events"eating at a restaurant": enter, order, eat, pay, leave
Ontologiesformal shared vocabularies of concepts and relationsmedical terminologies, web ontologies
Knowledge graphslarge networks of entities and relationssearch engine facts panels

Inheritance

In semantic networks and frames, properties flow down is-a links: if Bird can fly and Canary is-a Bird, Canary can fly. Exceptions override defaults (Penguin is-a Bird but cannot fly).

Reasoning with uncertainty

Real knowledge is often uncertain.

  • Probability and Bayes' rule: P(H | E) = P(E | H) P(H) / P(E).
  • Certainty factors (MYCIN, next topic).
  • Fuzzy logic: degrees of truth between 0 and 1 ("temperature is high to degree 0.7").
  • Bayesian networks: graphs of variables with conditional probabilities.

Worked example: Bayes' rule

A disease affects 1% of people. A test detects 90% of cases (sensitivity) but gives a positive result in 5% of healthy people.

  • P(positive) = 0.01 × 0.9 + 0.99 × 0.05 = 0.009 + 0.0495 = 0.0585.
  • P(disease | positive) = 0.009 / 0.0585 = 0.154 (about 15%).

Most positives are false positives because the disease is rare: a key lesson for diagnostic systems.

Knowledge-based systems

Programs that separate a knowledge base from an inference engine, so knowledge can be updated without rewriting the program. Expert systems are the main example.

Exams usually ask

  • Describe and compare semantic networks, frames and production rules.
  • Explain inheritance and exceptions.
  • Apply Bayes' rule to a diagnosis problem.

Common mistake

Confusing P(E | H) with P(H | E). A test that is 90% sensitive does not mean a positive result is 90% likely to be right.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 494 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.