Knowledge is more than data. It is organised information that can be used to solve problems, and a system must have it in a form that a program can use.
Data, Information and Knowledge
Data is raw facts, such as the number 38. Information is data with meaning, such as a body temperature of 38 degrees. Knowledge is information that is organised and can be used to decide, such as the rule that a temperature above 37.5 degrees suggests a fever. Knowledge allows a system to go beyond what is stated and to reach new conclusions.
Types of Knowledge
Declarative knowledge states facts, such as Delhi is the capital of India. Procedural knowledge states how to do things, such as the steps to solve an equation. Meta-knowledge is knowledge about knowledge, such as which rule is the most reliable. Heuristic knowledge is rules of thumb from experience. Structural knowledge describes relations between concepts, such as a kind-of or part-of relation. Domain knowledge is specific to a subject, and common-sense knowledge is the general knowledge that people have about the world, which is hard for machines to hold.
Definition: Knowledge representation. The study of how to store knowledge about the world in a form that a computer can use to reason and to solve problems.
Properties of a Good Representation
A good scheme has representational adequacy, the ability to represent all the knowledge needed, inferential adequacy, the ability to derive new knowledge, inferential efficiency, the ability to do so quickly, and acquisitional efficiency, the ease of adding new knowledge. No single scheme is best on all four, so different schemes are used for different problems.
Inferencing
Inference is the process of deriving new facts from known facts. A rule of inference says that if some premises are true, then a conclusion must be true. Modus ponens says that if P is true and P implies Q, then Q is true. Modus tollens says that if P implies Q and Q is false, then P is false. Hypothetical syllogism says that if P implies Q and Q implies R, then P implies R. Resolution is a general rule used by theorem provers. Inference runs in two directions. Forward chaining starts from the known facts and applies rules to reach new facts, and is data-driven. Backward chaining starts from a goal and looks for rules and facts that prove it, and is goal-driven.
Table 2.1: Types of knowledge
| Type | Meaning | Example |
|---|---|---|
| Declarative | Facts | Water boils at 100 C |
| Procedural | How to do something | Steps of long division |
| Meta-knowledge | Knowledge about knowledge | Rule 3 is more reliable |
| Heuristic | Rule of thumb | Try the cheapest option first |
Example 2.1: Applying modus ponens
Problem: Given: if it rains, the ground is wet. It is raining. What follows? Then, given: the ground is not wet. What follows from the first rule?
Solution:
- Let P be it rains, and Q be the ground is wet. We have P implies Q, and P is true.
- By modus ponens, Q is true, so the ground is wet.
- If Q is false, by modus tollens P is false.
Result: First, the ground is wet. Second, it is not raining.
rules = [({"rain"}, "wet")]
facts = {"rain"}
changed = True
while changed:
changed = False
for cond, concl in rules:
if cond <= facts and concl not in facts:
facts.add(concl)
changed = True
print(sorted(facts))
Output
['rain', 'wet']
Common mistakes
- Confusing modus ponens, which affirms the premise, with the fallacy of affirming the conclusion.
- Thinking that data, information and knowledge are the same.
- Using forward chaining when there is a single goal and many facts, which wastes effort.
Key takeaways
- Knowledge is organised information that can be used.
- The types are declarative, procedural, meta, heuristic and structural.
- Modus ponens: from P and P implies Q, infer Q.
- Forward chaining is data-driven and backward chaining is goal-driven.
Practice questions
- What is knowledge representation?
- State modus ponens.
- Distinguish forward and backward chaining.
Answers to the practice questions
- Storing knowledge in a form that a computer can use to reason and solve problems.
- If P is true and P implies Q, then Q is true.
- Forward chaining works from facts to conclusions, backward chaining works from a goal back to facts.
Sources
- Official BCA syllabus Artificial Intelligence and Expert Systems, course code 25BCA405DS02, Unit II
