[Want to read the post on Questions first? It’s here]
Expert systems use logic-based rules to make conclusions in a given domain. Offering these conclusions in the form of ‘answers’ to questions makes it easy for users to navigate through the system’s knowledge base without having to worry about rules and logic. Answers are also the key to an expert system’s actions.
Answers into actions
Answers do 2 important things for an expert system.
First, they enable the system to reason about a problem in the domain. In turn, this reasoning takes the form of output provided to users in response to input.
Second, they help the system take action – to make the reasoning happen. In a rule-based expert system, these answers cause rules to “fire”. It’s the firing of these rules that makes the system do things.
As explained earlier, the answers represent the consequent to the antecedent provided in the form of a question. They are modeled in a conditional “If…, then…” structure.
Let’s do a thought experiment.
- Imagine you’re an expert firefighter. You’re standing at the end of a long hallway next to a cabinet that contains a fire hose and a first aid kit.
- Suddenly you hear someone shouting “Help! Help!”
- You cup your hands to your mouth and shout “What’s wrong?”
- The other person says “There’s a fire burning here!”
- You shout “Is anyone hurt?”
- The other person shouts “No!”
- You grab the fire hose next to you.
- You grab the hose, leave the first aid kit, and run down the hall.
- You get to where the other person’s standing and see there are 3 black doors and 3 white doors.
- You ask the person “Behind which colour door is the fire?”
- The other person says “It’s behind one of the white doors”.
- You ask “Which door? The 1st, 2nd or 3rd?”
- The other person say’s “It’s the 3rd”.
- You turn on the hose and rush through the 3rd door with the hose…
This sequence uses questions to gather input from the person who needs help. You’re the expert who needs input from this person before you can help. The answers help you decide that it’s a type of problem you can help with. They also help you decide which tools to bring, and where to take them.
If you’re actually a robot firefighter, your actions in our thought experiment could be based on a set of rules. Each answer to your question caused you to ask another question – and to take some other actions. But it was the user’s input in the form of answers that caused your robot firefighter rules to fire for each action.
The rules in your system that cause you to take action might look like this:
Restricting answers
With a few exceptions, rules will likely be restricted to a certain set of answers – like multiple choice. The system needs some way to know what to do.
It’s up to knowledge engineers to build the rules, based on input from subject matter experts in the domain covered by the system’s knowledge base.