IGCSE Computer Science Worksheet:
Artificial Intelligence - Expert Systems and
Machine Learning
Candidate Name: Katleho Moroke
Centre Number: 0580
Candidate Number: 2424
Consider
a machine learning system used by a robot to navigate mazes, as
described
in the example where it learns from dead ends and successful paths. a)
Identify which type of machine learning this example best represents and
explain why. (3 marks)
Type: Reinforcement learning
Explanation:
This example best represents reinforcement learning because the robot learns by
interacting with its environment (the maze). It tries different paths and receives feedback
based on its actions: successful paths are rewarded, while dead ends act as negative
feedback. Over time, the robot uses this trial-and-error process to improve its navigation
strategy and choose paths that are more likely to lead to success.
b) Describe how the robot "learns" in this
scenario, including the role of data. (4 marks)
The robot learns through trial and error as it moves through the maze. Each action it
takes (such as choosing a direction at a junction) produces data about the outcome, for
example whether it reaches a dead end or moves closer to the exit.
This data is stored by the system, often as rewards or penalties linked to specific
actions or paths. Successful routes generate positive feedback, while dead ends
generate negative feedback. Over many attempts, the robot analyses this accumulated
data to adjust its decision-making, favoring actions with higher rewards. As more data is
collected, the robot’s navigation becomes more accurate and efficient.
c) Suggest one advantage and one disadvantage of using
machine learning for this robot compared to programming it with fixed
rules. (4
marks)
Advantage:
Machine learning allows the robot to adapt and improve over time. Instead of following
fixed rules, the robot can learn from experience and adjust its behaviour when it
encounters new or different maze layouts. This makes it more flexible and effective in
unfamiliar environments.
Disadvantage:
Machine learning can be unpredictable and less reliable at first. The robot may make
many mistakes during training, such as repeatedly entering dead ends, and its
decisions may be harder to understand or debug compared to clear, fixed rules written
by a programmer.
Outline
the steps involved in setting up an expert system for identifying chemical
compounds. Include references to all main components. (8 marks)
The steps involved in setting up an expert system for identifying chemical compounds
are:
1. Knowledge acquisition
Chemists and domain experts provide knowledge about chemical compounds,
such as properties, reactions, spectra, and identification rules.
2. Knowledge base creation
The acquired knowledge is stored in the knowledge base, typically as rules (IF–
THEN statements), facts, or chemical property data.
3. Inference engine setup
The inference engine is designed to apply logical reasoning (e.g. forward or
backward chaining) to the rules in the knowledge base to draw conclusions.
4. User interface design
A user interface is created to allow users (e.g. lab technicians or chemists) to
input data such as test results, molecular weights, or spectra.
5. Explanation facility
An explanation system is included so the expert system can justify its
conclusions, explaining which rules were used and why a compound was
identified.
6. Database / working memory
A working memory stores the current case data entered by the user during a
consultation.
7. Testing and validation
The system is tested using known chemical compounds to ensure the reasoning
and results are accurate and reliable.
8. Maintenance and updates
The knowledge base is updated regularly to include new compounds, revised
rules, and corrected errors to keep the system accurate.
Compare
expert systems and machine learning in terms of their ability to handle
new, unseen situations. Provide reasons for any differences. (5 marks)
Expert systems and machine learning systems differ significantly in how well they
handle new, unseen situations.
Expert systems rely on a fixed knowledge base of rules created by human
experts. They perform well only within the situations those rules were designed
for. When faced with a new or unexpected case that is not covered by existing
rules, the system may fail or give incorrect advice. They cannot adapt unless a
human updates the knowledge base.
Machine learning systems can generalise from data they have been trained on.
This allows them to handle new, unseen situations more effectively by identifying
patterns and making predictions based on similarities to previous examples.
They can also improve over time as more data is collected.
Reason for the difference:
Expert systems are rule-based and static, while machine learning systems are data-
driven and adaptive, enabling learning and generalisation beyond explicitly programmed
knowledge.
Section C: Extended Response Questions (20 marks) answer both
questions in this section.
A
company wants to develop an AI system to predict customer churn (when
customers stop using their service). Discuss whether an expert system or
a
machine learning system would be more appropriate. Include
advantages,
disadvantages, and at least two differences between the two approaches
in
your answer. (10 marks)
A machine learning system would generally be more appropriate than an expert system
for predicting customer churn, although both approaches have strengths and
weaknesses.
Machine learning system
Advantages:
Can analyse large amounts of customer data (usage patterns, payments, support
calls) and detect complex patterns linked to churn.
Can adapt and improve over time as new customer data becomes available.
Better at handling changing customer behaviour and market conditions.
Disadvantages:
Can be difficult to explain decisions, especially with complex models.
Requires large, high-quality datasets and may be costly to develop and maintain.
Expert system
Advantages:
Decisions are transparent and explainable, as they are based on clear IF–THEN
rules.
Easier to understand and justify to managers or regulators.
Disadvantages:
Requires human experts to define all churn-related rules, which is time-
consuming and may miss subtle patterns.
Poor at handling new or unexpected behaviour, as it cannot learn automatically.
Differences between the two approaches:
1. Learning method:
o Expert systems use predefined rules.
o Machine learning systems learn from data.
2. Adaptability:
o Expert systems are static unless manually updated.
o Machine learning systems can adapt and improve automatically.
3. Handling complexity:
o Expert systems struggle with complex, high-dimensional data.
o Machine learning systems handle complex patterns effectively.
Conclusion:
A machine learning system is better at predicting when customers might leave because
people’s behavior is complicated and changes over time. The system can learn patterns
that humans might not notice and can change its predictions as customer behavior
changes. This makes it more useful than an expert system for this job.
Evaluate
the impact of using machine learning in applications like facial
recognition. Consider ethical issues, advantages, and potential
disadvantages. Provide examples to support your points. (10 marks)
Impact of Using Machine Learning in Facial Recognition
Machine learning has a big impact on facial recognition systems, which are used in
places like phone security, airports, and police work. These systems can be very
helpful, but they also cause ethical problems and have some disadvantages.
Advantages:
One advantage of machine learning in facial recognition is that it is fast and accurate.
Computers can scan and compare faces much quicker than humans. For example,
many smartphones use facial recognition to unlock the phone easily and keep personal
information safe. In airports, facial recognition can help speed up passport checks and
improve security.
Ethical Issues:
A major ethical issue is privacy. Facial recognition systems often collect people’s face
data without asking for permission. For example, cameras in public places can track
people without them knowing, which can feel like an invasion of privacy. Another issue
is bias. If the system is trained using limited data, it may not recognize all people
equally. For instance, some systems make more mistakes when identifying women or
people from certain ethnic groups.
Disadvantages:
Facial recognition can also be misused. Governments or organizations could use it to
watch people too closely or control them. There is also a risk of mistakes. If the system
identifies the wrong person, an innocent person could get into trouble. For example,
there have been cases where people were wrongly arrested because of facial
recognition errors. Also, if face data is hacked, it is very serious because you cannot
change your face like a password.
Conclusion:
In conclusion, machine learning makes facial recognition useful and convenient, but it
also brings problems like privacy loss, bias, and misuse. To reduce these risks, rules
and careful use of the technology are important.