Reading preferences
Concept

Knowledge, Rules, and Plans

Represent facts and use rules to reason about actions and goals.

artificial intelligence, knowledge, logic, planning

Describe what is known

Suppose a locked classroom door needs a key. We can write down a fact: the key is on the table. We can also write a rule: if a person has the key, they can open this door. This is a tiny form of knowledge representation: choosing how to describe a situation so a system can reason about it.

Make a plan

The goal is an open door. In this example, taking the key is possible, and opening the door requires the key.

  1. Start: key on table; door locked.
  2. Take the key: key held; door still locked.
  3. Open the door: key held; door open. The goal is met.

See the reasoning

Satisfy a precondition

Track the key and door as actions change facts. This is a prepared demonstration, not live code execution.

Start

A simple two-action plan
  1. KeyOn tableCurrent focus
  2. DoorLocked

Opening requires the key, which is not yet held.

Facts, inference, and uncertainty

Inference applies rules to known facts to derive another conclusion. Planning chooses a sequence of actions whose preconditions can be met and whose effects achieve a goal. A plan depends on its model: if the key is broken or someone moved it, this plan can fail.

Logic can make assumptions explicit and support explanations. It does not automatically supply missing facts or resolve every uncertainty. In many real tasks observations are incomplete, so an agent may need to check the world again and revise its plan instead of assuming every action worked.

Reflect on the concept

Four fixed questions to reinforce the reasoning. Answers are not saved or scored.

1. What is a fact in the key example?
2. What does the example rule require before opening the door?
3. Which sequence can achieve the example goal?
4. What can incomplete knowledge lead to?

References and further reading