6.3 Artificial intelligence (AI)
Artificial intelligence is concerned with computers simulating intelligent human behaviour. For this topic, you need to understand the main characteristics of AI, recognise different categories of AI, and explain how expert systems and machine learning work.
What you need to understand
The textbook treats AI as a combination of rules and data with the ability to reason, learn and adapt. Do not confuse AI with robotics: many robots simply repeat programmed physical tasks, while AI can exist entirely as software. In exam questions, identify what information the system uses, how it processes that information, and how the system learns or reaches a conclusion.
Introduction
Artificial intelligence (AI) is a branch of computer science concerned with simulating intelligent human behaviour using a computer. The source links this to the cognitive functions of the human brain: the mental processes used to gain knowledge and understanding through thought, experience and the senses.
AI systems can be measured against human abilities such as reasoning, speech and sight. The aim is not simply to carry out a fixed sequence of instructions, but to use data and rules in ways that imitate aspects of intelligent behaviour.
Characteristics of AI
The source describes AI as a collection of rules and data combined with the ability to reason, learn and adapt to external stimuli.
Narrow AI
A machine performs better than a human at one specific task.
General AI
A machine performs at a level similar to a human when doing a specific task.
Strong AI
A machine performs better than a human in many tasks.
Reasoning, learning and adaptation
Reasoning means drawing conclusions from given data or situations. The textbook uses deductive reasoning as an example: correct facts are built into rules, and those rules are then applied to other problems.
An AI system can improve by carrying out a sequence of steps, learning from the result and applying what it has learned when it meets the same or a new situation. This allows it to adapt to its surroundings. AI can also identify patterns in large amounts of data and use those patterns to make predictions.
Examples of AI
- News generation: producing news content from live data feeds.
- Smart home devices: recognising spoken commands, processing them and producing an appropriate response; responses can become more sophisticated through repeated learning.
- Chatbots: interacting through typed or spoken messages and producing responses using information available to the system.
- Autonomous cars: using AI as part of the system that interprets changing conditions and supports decisions.
- Facial-expression recognition: identifying facial landmarks, such as eyebrow and mouth positions, and combining them to map expressions to emotions such as anger, fear, joy or surprise.


AI systems
The textbook concentrates on two AI systems: expert systems and machine learning.
Expert system
A computer system that imitates the decision-making of a human expert by using stored knowledge and inference rules.
Machine learning
Training a computer with sample data so it can make predictions about new, unseen data without being specifically programmed for every new case.
Expert systems
An expert system is designed to mimic human knowledge and experience. It uses stored knowledge together with inference to solve a problem or answer a question that would normally require a human expert.
For example, in medical diagnosis the system can ask a sequence of questions about symptoms. Each answer affects the next question. The system compares the answers with its stored knowledge, applies rules, reaches a possible diagnosis and can provide suggested actions. The source also notes that an expert system may give a probability showing how confident it is in its conclusion.
Examples of expert-system applications
- Oil and mineral prospecting.
- Diagnosis of illness.
- Fault diagnosis in mechanical and electronic equipment.
- Tax and financial calculations.
- Strategy games such as chess.
- Logistics, such as finding efficient delivery routes.
- Identification of plants, animals and chemical or biological compounds.
Advantages and disadvantages
| Advantages | Disadvantages |
|---|---|
| Can provide a high level of expertise and high accuracy. | Users may need considerable training to use the system correctly. |
| Produces consistent results. | Setup and maintenance can be expensive. |
| Can store very large quantities of facts and ideas. | Responses may feel impersonal or inappropriate in some medical situations. |
| Can produce traceable logical solutions and diagnoses. | The result is only as good as the facts and information stored in the system. |
| Can combine knowledge from several areas of expertise. | Users may wrongly assume the system can never be wrong. |
| Usually gives a much faster response than waiting for a human expert. | |
| Can provide unbiased analysis of the stored facts and give a probability for a proposed conclusion. |
Structure of an expert system

User interface
The method by which the user communicates with the expert system. The interaction may use dialogue boxes, prompts or other input methods. Questions are often Yes/No and depend on previous responses.
Inference engine
The main processing element. It gathers information from the user, searches the knowledge base for relevant data and applies inference rules from the rules base to reach a conclusion.
Knowledge base
A repository of facts about an area of expertise. The source describes it as a collection of objects and their attributes.
Rules base
A set of inference rules used by the inference engine. These rules commonly use logical IF … THEN … statements to connect facts and draw conclusions.
Explanation system
Shows the reasoning behind the system’s conclusion or recommendation. The textbook notes that the explanation system is shown in the figure but is not explicitly required by the syllabus.
Objects, attributes and inference rules
The knowledge base can store objects together with attributes that describe them. A sequence of answers can narrow down which object matches the evidence. The rules base then provides logical rules such as:
Setting up an expert system
- Gather information from human experts or reliable written sources.
- Create and populate the knowledge base.
- Create the rules base containing inference rules.
- Set up the inference engine that applies the rules and makes reasoned conclusions.
- Develop the user interface so the user and system can communicate.
- Test the system with cases whose outcomes are already known, compare the results and make any necessary changes.
Example: medical diagnosis

The input screen gathers symptoms by asking questions. The inference engine compares the responses with the knowledge base and applies the rules base. Once a match is found, the system can give the probable diagnosis, possible treatment or next steps. The output may be text or images, and the user can ask for more information to narrow the result.
Machine learning

Machine learning is a sub-set of AI in which algorithms are trained using examples and learn from past experience. After training, the system can make predictions or decisions using new data. A major strength is the ability to process and analyse very large, complex data sets much faster than a person could.
Search engines learning from previous results

A search engine can treat a result as successful when the user finds the required page near the top of the results, and less successful when the user must continue to later pages. By learning from previous searches, the search engine can improve which results it places first.
AI compared with machine learning
| Artificial intelligence | Machine learning |
|---|---|
| Represents simulated intelligence in machines. | Gets machines to make decisions by learning from data rather than being specifically programmed for every case. |
| Aims to build machines capable of behaving or thinking in human-like ways. | Aims to train systems from acquired data so they can solve new problems. |
Example 1: categorising email as spam
- Collect data about emails, such as message content, headers and sender information.
- Clean the data by removing unnecessary items such as common stop words and punctuation.
- Identify useful patterns, for example words that frequently occur in spam messages.
- Train a model using a data set of emails already known to be spam or not spam.
- Evaluate, fine-tune and then test the model using live messages.
Example 2: recognising a user’s buying history
The textbook describes collaborative filtering: the system compares the buying behaviour of customers. If two customers have made similar choices, the system can use those similarities to recommend an item one customer bought to the other customer. The same general idea can be used when generating a music playlist from previous preferences.
Example 3: detecting fraudulent activity

- Data collection: gather customer and transaction data, for example through a survey or web scraping.
- Data cleaning: remove redundant or poor-quality data that could lead to unreliable predictions.
- Exploration and analysis: identify the useful patterns and features in the data.
- Building a model: train the algorithm using real examples of purchasing behaviour.
- Model evaluation: test the model with known data and known outcomes, then modify it if it does not meet the required criteria.
After training, the system can flag unusual behaviour that differs from a customer’s normal pattern and may indicate fraud.

Figure 6.28 appears in the end-of-topic activity and reinforces how expert-system questions can branch according to earlier answers.
Extension: deep learning
The textbook includes this as an A Level extension, rather than a core IGCSE requirement. Deep learning is a sub-set of machine learning that organises algorithms into layers to form an artificial neural network. The network contains an input layer, one or more hidden layers and an output layer. The hidden layers process the input before it reaches the output.


Artificial neural networks can be useful for complex visual tasks. The source gives face or object recognition as examples, where a system can analyse image pixels and learn patterns associated with an object. Large amounts of data are used to train the model. Known labelled data is then used for testing, and the network is adjusted until it gives sufficiently reliable outputs.

Machine learning compared with deep learning
| Machine learning | Deep learning |
|---|---|
| Uses algorithms to make decisions based on past data. | Uses algorithms arranged as an artificial neural network. |
| Usually needs less training data than deep learning, although the amount can still be large. | Typically requires very large training data sets. |
| Well suited to some classification tasks, such as spam email. | Well suited to very complex non-linear tasks, such as visual processing. |
| Can solve a problem using separate modules that are later combined. | Can solve a problem from beginning to end as one system. |
| May require less computing power for simpler tasks. | Requires a large amount of computing power. |
| Testing can take a long time. | The textbook states testing can take much less time. |
| Rules can make it clearer why each stage of a model was created. | The system’s own internal reasoning may be difficult to explain, creating a “black box”. |