Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligenceconceptInteractive simulation

Knowledge-Based Reasoning

Reaching new conclusions from a store of facts and rules using logic.

The idea

A knowledge-based agent keeps a knowledge base of sentences in a formal language and asks it questions. An inference procedure checks whether a conclusion necessarily follows (entailment). The strength is that the knowledge is explicit and can be inspected and edited; the weakness is that it needs carefully written knowledge.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

1.¬P ∨ Qgiven2.¬Q ∨ Rgiven3.Pgiven4.¬Rgiven
  • given
  • derived
  • being resolved

Goal: prove R. Resolution proves it by contradiction: assume ¬R is true, add it to the knowledge, and look for a contradiction.

clauses:
4
1/4

Empty clause reached: the query follows from the knowledge base.

Step by step

  1. 1Tell the knowledge base what is known (facts and rules).
  2. 2Ask a question, for example "is the patient at risk?".
  3. 3Run an inference method (forward chaining, backward chaining or resolution).
  4. 4Return the answer together with the facts it relied on.

Where it is used

Expert systems, semantic web reasoning, verification.

Watch out for

Brittle when knowledge is incomplete or uncertain; classic logic cannot express "probably".

Related