O Level Computer Science 2210 · Area 1 · Computer systems

Artificial intelligence in computer systems

Artificial intelligence is the simulation of intelligent behaviour by a computer, and it rests on three ideas: a collection of data with rules for using it, the ability to reason with those rules, and the ability to learn and adapt. The syllabus then asks how such systems actually work, through expert systems and machine learning. Marks are lost by claiming that the computer understands or thinks, and by muddling who supplies the rules in an expert system compared with machine learning.

Not started

Syllabus coverage

  • Understand what is meant by artificial intelligence as a branch of computer science dealing with the simulation of intelligent behaviours by computers
  • Describe the main characteristics of AI as a collection of data and the rules for using that data
  • Describe the ability to reason as a characteristic of AI
  • Describe the ability to learn and adapt as a characteristic that AI can include
  • Explain the basic operation and components of an expert system: knowledge base, rule base, inference engine and interface
  • Explain the basic operation of machine learning, in which a program automatically adapts its own processes and/or data

Part of the O Level Computer Science syllabus 2210.

How an AI system simulates a decisionAI is a collection of data plus the rules for using it, with the ability to reason.Some systems also learn and adapt, which is the part that is optional in the syllabus.datathe examples it has seenruleshow to use the datareasoningapplies the rules to the datadecisiona recommendation or actionlearning: the outcome is fed back so the rules or data change
An AI system shown as a flow: a data store and a set of rules feed a reasoning engine, which produces a decision or conclusion, with a learning loop carrying the outcomes back into the data store so that later decisions are based on the updated data.

What artificial intelligence means

Artificial intelligence (AI) is a branch of computer science dealing with the simulation of intelligent behaviours by computers. The word that carries the meaning is simulation. The computer is not conscious and does not understand the subject in the way a person does; it processes data using rules, and the result is behaviour that looks intelligent to the person using it.

That distinction is worth holding on to because it answers a lot of exam questions. An AI system that recognises a face in a photograph is not seeing a person; it is comparing patterns in the image with patterns derived from data. A system that recommends a film is not understanding taste; it is applying rules to data about what similar viewers watched.

AI is used where writing a fixed list of instructions would be impractical: recognising speech or images, translating between languages, filtering unwanted messages, spotting an unusual transaction, or supporting a diagnosis. In each case the system works from data and rules rather than from a step-by-step procedure written for every possible case.

Write 'simulation of intelligent behaviour', not 'the computer thinks'. The definition is marked as a definition, and adding that it thinks contradicts it.

Characteristic 1: a collection of data and the rules for using it

The first characteristic of AI is that it is a collection of data and the rules for using that data. Both halves are needed. The data is the knowledge the system has: facts, examples, records, measurements. The rules say what to do with that data: which facts to combine, in what order, and what conclusion follows.

Data without rules is a pile of records that nothing acts on. Rules without data have nothing to apply themselves to. An AI system is the pair together, and the quality of its output depends on both: incomplete data gives a poorly informed system, and badly written rules give a system that reasons its way to the wrong answer confidently.

The rules may be written by a person, as they are in an expert system, or derived from the data itself, as they are in machine learning. Either way, the pairing of data and rules is what the system works from.

Characteristic 2: the ability to reason

The second characteristic is the ability to reason: the system can draw conclusions from the data and the rules, rather than simply looking up a stored answer.

Reasoning means combining what is known with what has been observed to reach something that was not stored in advance. A system that holds the rule 'if the temperature is above this value and the pressure is rising, then the vessel is at risk' can, given those readings, conclude that this vessel is at risk — a conclusion that exists nowhere in its data until it is drawn.

This is why reasoning is more than searching. A database can return a record that matches a query; a reasoning system can work through a chain of rules, where the conclusion of one becomes the input to the next, and arrive at a decision about a case it has not seen before. Expert systems do exactly this, which is why the inference engine is the part that applies the rules rather than the part that stores them.

  • A collection of data and the rules for using that data.
  • The ability to reason: drawing conclusions from the data and rules rather than looking an answer up.
  • The ability to learn and adapt, which some AI systems have: changing their own processes or data as more information arrives.

Characteristic 3: the ability to learn and adapt

The third characteristic is that AI can include the ability to learn and adapt. The syllabus says 'can include' deliberately: not every AI system learns. An expert system applies the same rules until a person changes them; a machine learning system changes itself.

A system that learns adapts its own processes or its own data as it receives more information. Its behaviour is not fixed at what the programmer first wrote. Fed more examples, it adjusts the patterns it uses, so its performance on the task changes with use — usually improving, though it can also learn a bad pattern if the data is poor.

Adaptation is what allows an AI system to cope with a world that does not stay still. A system that filters unwanted messages has to keep up with new kinds of message; one that recognises speech has to cope with new accents and vocabulary. Neither could be done by a person writing out every rule in advance.

CharacteristicWhat it meansWhat it looks like in practice
Data and the rules for using itThe system works from a body of data plus the rules that say how to use itFacts and examples stored by the system, with rules for combining them
The ability to reasonIt draws conclusions from the data and rules rather than looking up an answerFollowing a chain of rules from the readings it has been given to a conclusion
The ability to learn and adaptSome systems change their own processes or data as more information arrivesA system that adjusts the patterns it uses after being given more examples
'Can include' is part of the definition. Saying that all AI learns is a common error; an expert system does not learn until a person changes its rules.

Expert systems: components and operation

An expert system is an AI system that reproduces the decision-making of a human expert in a particular subject. The syllabus limits the components to four.

The knowledge base holds the facts and data about the subject, put there by the human expert. The rule base holds the rules for using that knowledge, written as conditions: if this is true, then that follows. The inference engine applies the rules to the facts and to the information the user supplies, working through them to reach a conclusion and asking for more information where a rule needs it. The interface is how the user describes the problem, answers the questions the system asks, and sees the conclusion and the reasoning behind it.

Operating one is a conversation. The user gives the symptoms or facts through the interface. The inference engine matches those facts against the conditions in the rule base, using the knowledge base for the subject knowledge, and may ask further questions where a rule cannot yet fire. It continues until it reaches a conclusion, then presents that conclusion with the chain of reasoning that produced it, so the user can judge whether to accept it.

Expert systems are used where expert knowledge is scarce, expensive or worth capturing: supporting a diagnosis, finding the fault in a piece of equipment, or advising which product suits a customer's needs. Their strength is that they can explain their reasoning; their weakness is that they know only what they were given, and they do not learn from their mistakes.

ComponentWhat it holds or does
Knowledge baseThe facts and data about the subject, supplied by the human expert
Rule baseThe rules for using that knowledge, written as conditions such as if this is true then that follows
Inference engineApplies the rules to the facts and to the information from the user, asks for more information where needed and reaches a conclusion
InterfaceLets the user describe the problem, answer the system's questions and see the conclusion and the reasoning behind it
Four components, four jobs. If you can say what each one holds and what it does with it, you can answer almost any expert system question.

Machine learning

Machine learning is when a program has the ability to automatically adapt its own processes and/or data. Instead of being given every rule by a person, it is given data, and it finds the patterns in that data for itself. As more data arrives, it adjusts, so its behaviour changes with use.

The difference in operation is where the rules come from. In an expert system a human writes the rules and the system applies them; in machine learning the data is supplied and the program derives the patterns, adjusting its own processes or data as it goes. That is why a machine learning system can deal with tasks nobody could write rules for — telling a cat from a dog in a photograph, or recognising a spoken word in a noisy room.

Learning is not the same as being correct. A system trained on poor or unrepresentative data learns the wrong pattern and applies it consistently, and it can be confident while being wrong. It also cannot explain itself in the way an expert system can: it can show what it concluded, but the chain of reasoning inside the learned patterns is not laid out as rules a person can read.

Expert systemMachine learning
Where the knowledge comes fromA human expert supplies the facts and writes the rulesData is supplied and the program finds the patterns in it
ComponentsKnowledge base, rule base, inference engine and interfaceA program that adapts its own processes and/or data
How a conclusion is reachedThe inference engine applies the rules to the facts and to the user's answersThe program applies the patterns it has derived from the data
What changes over timeLittle: the rules change only when a person changes themThe program adapts itself as more data arrives
Can it explain its reasoning?Yes: it can show the rules that were appliedNot in the form of readable rules; the patterns are internal
Typical useSupporting a diagnosis, diagnosing a fault, advising on a productRecognising faces or speech, filtering unwanted messages, spotting unusual activity
One question separates the two: who supplies the rules? A human expert, and the system applies them, or the data, and the program derives them. Say that and you have the comparison.

What AI systems can and cannot do

It is worth being clear about the limits, because questions often ask you to evaluate an AI system rather than describe one.

An AI system is only as good as its data and rules. Incomplete or biased data produces a system that makes confident but unfair or wrong decisions, and the fault is hard to see because the system gives no sign of doubt. An expert system cannot handle a case outside its rules, and it will not notice that the case is unusual. A learning system can improve with use, but it can also learn from its own mistakes and reinforce them.

AI also brings questions that a purely technical answer misses: who is responsible when a system makes a wrong decision, whether a decision can be explained to the person affected, and what happens to the people whose work the system takes over. A good evaluation answer names a benefit, a limitation and a condition under which the system should be trusted.

Key terms you must be able to define

Artificial intelligence (AI)
A branch of computer science dealing with the simulation of intelligent behaviours by computers.
Simulation
Imitating a behaviour without being it: an AI system produces behaviour that looks intelligent by processing data with rules, rather than understanding it as a person would.
Reasoning
Drawing conclusions from data and rules, rather than looking up a stored answer.
Learning and adapting
The ability of some AI systems to change their own processes or their own data as they receive more information, so their behaviour changes with use.
Expert system
An AI system that reproduces the decision-making of a human expert in a particular subject, using a knowledge base, a rule base, an inference engine and an interface.
Knowledge base
The part of an expert system holding the facts and data about the subject, supplied by the human expert.
Rule base
The part of an expert system holding the rules for using the knowledge, written as conditions such as if this is true then that follows.
Inference engine
The part of an expert system that applies the rules to the facts and to the information from the user, asking for more where a rule needs it, in order to reach a conclusion.
Interface
The part of an expert system through which the user describes the problem, answers the system's questions and sees the conclusion and its reasoning.
Machine learning
AI in which a program has the ability to automatically adapt its own processes and/or data, deriving patterns from the data it is given and improving as more data is supplied.

In context

2210 sets its questions inside systems a student already uses - a school network, a phone, a supermarket till, a vending machine, a website. These show how the theory is applied to a context you have not seen before, then you answer for the system you are given.

An expert system supporting a diagnosis

A patient's symptoms are entered through the interface. The inference engine takes each symptom and matches it against the conditions in the rule base, drawing on the knowledge base of medical facts, and asks for further information where a rule cannot yet be applied. It reaches a suggested diagnosis and shows the chain of rules that led there, so the clinician can see why and decide whether to accept it. The system does not learn from the case; if the rules are wrong, a person has to change them.

Filtering unwanted messages

A filter is given a large collection of messages already marked as wanted or unwanted. It derives the patterns that distinguish them and applies those patterns to new messages, adjusting as more messages are marked. Nobody wrote a rule for every phrase that makes a message unwanted, which is why this is machine learning rather than an expert system. Its weakness is that it learns from the examples it is given: if those examples are unrepresentative, it will filter the wrong things.

Fault-finding in equipment

A technician describes what a machine is doing through the interface. The inference engine works through the rule base — if the pressure is low and the temperature is high, then the valve is suspect — and asks for further readings until it can name the likely fault. Because the knowledge base holds what the manufacturer's engineers know, the system can guide a less experienced technician. It can only consider faults that were anticipated when the rules were written.

A self-driving shuttle

The shuttle combines sensors with an AI system: camera and distance readings are processed to recognise lanes, signs, pedestrians and obstacles, and the system decides whether to continue, slow or stop. Some of that recognition is learned from large amounts of example images rather than written as rules. Its advantage is that it never becomes tired or distracted; its limits are that an unusual situation may be misread, and that a wrong decision is carried out at once, with a person unable to intervene in time.

Recommending what to watch next

A service records what each viewer has watched and how they rated it, then derives patterns linking one viewer's choices to those of others. The system reasons from those patterns to a suggestion for a programme the viewer has not seen. It adapts as viewing continues, which is its learning characteristic; but it can also narrow a viewer's choices, because it keeps recommending more of what they have already watched.

Flashcards

Click a card to flip it. Mark honestly — the tracker uses this.

Q1What is artificial intelligence?
A branch of computer science dealing with the simulation of intelligent behaviours by computers.
Q2What are the three main characteristics of AI?
A collection of data and the rules for using that data; the ability to reason; and the ability to learn and adapt, which not every AI system has.
Q3What does 'ability to reason' mean in AI?
The system draws conclusions from the data and the rules it holds, rather than simply looking up a stored answer.
Q4What does it mean for an AI system to learn and adapt?
It changes its own processes or its own data as it receives more information, so its behaviour changes with use.
Q5Name the four components of an expert system.
Knowledge base, rule base, inference engine and interface.
Q6What does the knowledge base hold?
The facts and data about the subject, supplied by the human expert.
Q7What does the rule base hold?
The rules for using the knowledge, written as conditions such as if this is true then that follows.
Q8What does the inference engine do?
It applies the rules to the facts and to the information from the user, asking for more information where a rule needs it, in order to reach a conclusion.
Q9What is the interface for in an expert system?
It lets the user describe the problem, answer the system's questions and see the conclusion together with the reasoning behind it.
Q10What is machine learning?
AI in which a program has the ability to automatically adapt its own processes and/or data, finding patterns in the data it is given.
Q11State one difference between an expert system and machine learning.
In an expert system a human expert writes the rules and the system applies them; in machine learning the program derives the patterns from data and adapts itself.
Q12Why is an AI system described as a simulation?
Because it produces behaviour that looks intelligent by processing data with rules, without understanding the subject as a person would.
0 of 12 marked as known

Exam-style questions

7 questions, 25 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.

StateAO11 mark
State what is meant by artificial intelligence (AI).

Mark scheme — tick each point you actually made

Examiner tip: Use the word simulation. Saying that the computer thinks or understands contradicts the definition and loses the mark.
DescribeAO13 marks
Describe the main characteristics of artificial intelligence.

Mark scheme — tick each point you actually made

Examiner tip: Three characteristics, three marks, in the syllabus's own terms. The phrase 'can include' matters for the third, because not every AI system learns.
ExplainAO24 marks
An expert system is used to help diagnose faults in machinery. Explain how the expert system reaches a diagnosis, referring to its components.

Mark scheme — tick each point you actually made

Examiner tip: Name the component and say what it does, every time. Four components with four jobs is four marks; four names with no jobs is one.
ExplainAO24 marks
A company uses a machine learning system to sort photographs into those that show damage and those that do not. Explain how this system differs from an expert system doing the same job.

Mark scheme — tick each point you actually made

Examiner tip: Make the comparison explicit: who supplies the rules, and what changes over time. Two descriptions with no contrast between them earn half marks.
EvaluateAO35 marks
A hospital is considering using an AI system to help interpret scan images and flag those that may need urgent attention. Evaluate the advantages and disadvantages of doing this.

Mark scheme — tick each point you actually made

Examiner tip: An evaluate answer needs a benefit, a limitation and a condition. Naming responsibility and the need for a human decision is what turns a description into an evaluation.
DescribeAO26 marks
A warehouse uses an AI system to predict how many staff will be needed on each shift, based on previous orders. Describe the characteristics of AI that this system shows, and describe one way in which its predictions could be wrong.

Mark scheme — tick each point you actually made

Examiner tip: The second half of the question is not an afterthought. Two or three marks are for explaining why a data-driven prediction fails, so give reasons rooted in the data rather than saying 'computers make mistakes'.
IdentifyAO12 marks
Identify the component of an expert system that holds the rules for using the knowledge, and the component that applies those rules to reach a conclusion.

Mark scheme — tick each point you actually made

Examiner tip: Two components, two marks. Do not describe the interface or the knowledge base when the question names the two it wants.

Exam technique for this topic

  • Define AI with the syllabus wording: a branch of computer science dealing with the simulation of intelligent behaviours by computers. The word simulation is the mark.
  • For the characteristics, give all three in the syllabus's terms: a collection of data and the rules for using it, the ability to reason, and the ability to learn and adapt. Note that learning is something AI 'can include', not something every AI system does.
  • For an expert system, name all four components and give each one's job: knowledge base, rule base, inference engine, interface. Marks are per component, not per sentence.
  • Separate expert systems from machine learning by who supplies the rules. A human expert writes them in an expert system; the program derives them from data in machine learning.
  • In an evaluate question, do not end with 'it depends'. Say under what conditions the system should be trusted, and name a limitation that a technical fix cannot remove.

Why students lose marks here

A student wroteA student wrote: 'AI is a computer that can think for itself and understand what it is doing.'
Why it loses marksThe syllabus definition is about the simulation of intelligent behaviour. The computer processes data using rules; it does not understand the subject in the way a person does, and describing it as thinking contradicts the definition you are being asked for.
The answer that scoresArtificial intelligence is a branch of computer science dealing with the simulation of intelligent behaviours by computers. Its characteristics are a collection of data and the rules for using that data, the ability to reason, and the ability to learn and adapt. The behaviour may appear intelligent, but it comes from processing data with rules.
A student wroteA student wrote: 'An expert system learns from each case, so it gets better the more it is used.'
Why it loses marksThis confuses the two AI systems in the syllabus. An expert system applies rules written by a human expert and does not change them itself; it is machine learning that adapts its own processes or data.
The answer that scoresAn expert system reaches a conclusion by applying the rules in its rule base, using the knowledge base and the information supplied by the user through the interface. Its rules change only when a person changes them. Machine learning is the case in which a program automatically adapts its own processes and/or data as it receives more data.
A student wroteA student wrote: 'The inference engine stores the rules and the knowledge base does the reasoning.'
Why it loses marksThe jobs are swapped. The knowledge base and the rule base store; the inference engine is the part that applies the rules to the facts. An answer that gives the right four names with the wrong jobs earns little.
The answer that scoresThe knowledge base holds the facts and data about the subject and the rule base holds the rules for using them, both supplied by the human expert. The inference engine applies the rules to those facts and to the information from the user in order to reach a conclusion, and the interface is how the user asks and answers questions and sees the result.
A student wroteA student wrote: 'A system that learns will always become more accurate the longer it runs.'
Why it loses marksLearning is adaptation, not guaranteed improvement. A system trained on poor or unrepresentative data learns the wrong patterns and applies them consistently, and one that learns from its own output can reinforce its own mistakes.
The answer that scoresMachine learning means the program adapts its own processes or data as more data arrives, so its behaviour changes with use. Whether it improves depends on the quality and representativeness of that data; poor data produces a system that is confidently wrong, and there is no readable rule set to inspect for the error.

Where this fits in O Level Computer Science 2210

This page is one topic of Cambridge O Level Computer Science 2210. O Level Computer Science 2210 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Computer Science 2210 syllabus page.