Skip to the page
Year 11 · Computer Science · Autumn 2 – mid-December · Automated and emerging technologies; Paper 1 practice

Artificial intelligence and expert systems

What this lesson covers

6.3 Artificial intelligence (AI)

Cambridge IGCSE Computer Science 0478 · Topic 6: Automated and emerging technologies · Paper 1

You will learn to

  • Explain what artificial intelligence (AI) is.
  • Describe the main characteristics of AI: data and rules, reasoning, and learning and adapting.
  • Describe the four parts of an expert system and how they work together.
  • Explain what machine learning is, with one example and one limit.

Success criteria

  • I can draw and label the knowledge base, rule base, inference engine and interface.
  • I can describe what the inference engine does with the rules and the facts.
  • I can explain how machine learning is different from following fixed rules.
The syllabus points for this section
  • Explain what artificial intelligence is.
  • Describe the main characteristics of AI.
  • Describe the four parts of an expert system and how they work together.
  • Explain what machine learning is, with an example.

Key words

Say each word, then read what it means. Every one is in the glossary too.

Set value
The target value stored in the system that sensor readings are compared with.
Artificial intelligence (AI)
The simulation of intelligent behaviour by a computer.
Expert system
An AI system that uses facts and rules to give expert-like advice in one subject.
Knowledge base
The part of an expert system that stores facts about the subject.
Rule base
The part of an expert system that stores IF … THEN rules for using the facts.
Inference engine
The part of an expert system that applies the rules to the facts to reach a conclusion.
Interface
The part of an expert system that asks the user questions and shows conclusions and reasons.
Machine learning
AI in which the program adapts its own processes or data by learning from examples.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

What AI is and its characteristics

Artificial intelligence (AI) is a branch of computer science that deals with the simulation of intelligent behaviour by computers. The computer behaves in a way we would call clever if a person did it.

AI has three main characteristics.

1. The collection of data and the rules for using that data. The system stores facts and rules about how to use them.

2. The ability to reason. It can use its rules and data to reach a conclusion or make a decision.

3. It can learn and adapt. Some AI systems change their own rules or data as they get new experience.

e.g.Example
A sat-nav app collects live traffic data (data), applies rules about speed and distance (rules), works out the fastest route (reasoning), and changes the route when a road is blocked (adapting).
!Watch out

Not every AI system can learn. An expert system reasons with fixed rules. Machine learning is the kind that learns and adapts.

Expert systems: the four parts

An expert system is an AI program that copies the knowledge and decisions of a human expert in one subject, such as a doctor or a car mechanic.

It has four parts. Cambridge expects all four.

PartWhat it does
Knowledge baseA database of facts about the subject, collected from human experts
Rule baseA set of rules, usually IF … THEN …, that say how to use the facts to reach conclusions
Inference engineThe part that reasons: it applies the rules in the rule base to the facts in the knowledge base and to the user's answers, to reach a conclusion
InterfaceHow the user communicates with the system: it asks questions, takes the user's answers, and shows the conclusions and the reasons for them
e.g.Example
A car fault-finding expert system: Knowledge base: "A flat battery stops the engine turning over." Rule base: IF engine does not turn over AND lights are dim THEN battery is probably flat. Interface asks: "Does the engine turn over?" User: No. "Are the lights dim?" User: Yes. Inference engine applies the rule and concludes: battery is probably flat (90% likely). Interface shows the conclusion and explains which answers led to it.
?Why?

Keeping facts (knowledge base) apart from the logic (rule base) means experts can add new facts or rules without rewriting the program.

How an expert system reaches a conclusion

Try the expert toy. It finds out why a laptop will not start. Answer its Yes or No questions. When a rule fires, read How I decided to see which rules the inference engine used.

The system often gives a probability or confidence with each answer, for example "75% likely". It can also explain its reasoning, which helps the user trust it.

Uses include medical diagnosis, car and machine fault finding, mineral prospecting, financial planning and plant identification.

AdvantagesDisadvantages
Gives consistent answers with no bad daysOnly as good as the facts and rules put in
Fast, available 24/7 and in many places at onceHas no common sense; cannot handle cases outside its rules
Stores the knowledge of several expertsExpensive to build; experts' time is costly
Can explain how it reached its conclusionUsers may trust it too much and stop thinking for themselves

There is something to try for this step in the IGCSE library.

Machine learning

Machine learning is a type of AI where the program adapts its own processes and/or data as it is used. It is not given every rule by a programmer.

It is given lots of example data. It finds patterns in that data and builds its own way of making decisions.

As it gets more data and feedback, it changes itself and becomes more accurate.

e.g.Example
An email spam filter: 1. It is shown thousands of emails already marked "spam" or "not spam". 2. It finds patterns, such as certain words or senders, that appear in spam. 3. It uses those patterns to sort new emails. 4. When you mark a missed email as spam, it adapts and improves. Other examples: video and music recommendations, face recognition on a phone, translation apps.
?Why?

Some problems are too complex to write every rule by hand. It is easier to let the program learn the rules from examples.

!Watch out

Expert system versus machine learning: an expert system's rules are written by people and stay the same. A machine learning system changes its own rules from data.

Study it

Open the study page and go one step at a time.

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.