Welcome to Artificial Intelligence (AI)!

Hello future Computer Scientist! This chapter is all about one of the most exciting and fastest-growing areas of technology: Artificial Intelligence. Don't worry if it sounds complicated—we'll break down how computers can simulate human thinking step-by-step.

You will learn the fundamental ideas behind creating systems that can reason, solve problems, and even learn from experience. These concepts are at the heart of the automated technologies we see everywhere today!


6.3 Artificial Intelligence

What is Artificial Intelligence (AI)? (6.3.1)

Simply put, Artificial Intelligence (AI) is the branch of computer science dedicated to making computers behave intelligently.

Imagine teaching a machine to think, understand, and make decisions, just like a person. That is the goal of AI.

Formal Definition:

  • AI is a branch of computer science dealing with the simulation of intelligent behaviours by computers.

Think of a voice assistant like Siri or Alexa. When you ask it a question, it simulates the human intelligence needed to understand your request and provide a relevant answer.

Quick Review: Key Idea

AI aims to give machines the ability to show behaviours that, if performed by a human, we would consider intelligent.


Main Characteristics of AI Systems (6.3.2)

For a computer system to exhibit intelligent behaviour, it needs several core abilities. The syllabus focuses on three key characteristics:

1. Collection of Data and Rules

An AI system cannot "think" unless it has knowledge to work with. This knowledge comes in two forms:

  • Data: Facts, figures, observations, and examples collected over time (e.g., photos of cats and dogs).
  • Rules: Logical statements or instructions about how to use that data (e.g., IF the image has pointed ears THEN it is likely a dog).

Analogy: This is like giving a student a textbook (the data) and the instructions on how to interpret and use the formulas inside (the rules).

2. Ability to Reason

Reasoning is the ability to draw logical conclusions based on the data and rules available to the system. It involves using the rules to process new information.

  • How it works: The system takes input, checks it against its rule base, and produces a rational output or decision.

Example: A system sees a new image (input data). It reasons: "The object is red (fact) AND it is round (fact) AND it has seeds (fact). My rule base says objects with these facts are apples. Conclusion: It is an apple."

3. Ability to Learn and Adapt

This is arguably the most human-like trait. An intelligent system should be able to improve itself over time without being explicitly reprogrammed.

  • Learn: Absorbing new data or experiences.
  • Adapt: Changing its own rules or internal processes based on what it has learned.

Did you know? This ability is the foundation of Machine Learning, which we cover next. If an AI diagnoses a patient wrongly, and the doctor inputs the correct diagnosis, the AI must adapt its rules to avoid that mistake in the future.


Simulating Intelligent Behaviour (6.3.3)

The syllabus requires you to understand two specific methods used to simulate intelligent behaviour:

  1. Expert Systems
  2. Machine Learning

We need to explain the basic operation and components of both.


1. Expert Systems

Expert systems are AI programs designed to solve complex problems and make decisions that would normally require a highly trained human specialist or expert.

Example Use Cases: Medical diagnosis, searching for minerals, or troubleshooting complex machinery faults.

The operation of an expert system relies on four core components:

Components of an Expert System (K.R.I.I.)

Memory Aid: K.R.I.I. helps you remember the four parts: Knowledge Base, Rule Base, Inference Engine, Interface.

1. Knowledge Base (KB)

  • This stores all the factual data about the specific domain.
  • Example: In a medical expert system, the KB contains facts about diseases, patient symptoms, and chemical reactions of drugs.

2. Rule Base (RB)

  • This stores the rules and logic provided by human experts, often in the form of IF...THEN statements.
  • These rules dictate how the facts in the KB should be interpreted to reach a conclusion.
  • Example Rule: IF (temperature > 37°C) AND (rash present) THEN Suggest: Measles.

3. Inference Engine (IE)

  • The Inference Engine is the core "brain" of the system.
  • Its role is to apply the rules in the Rule Base to the data in the Knowledge Base (and the new data input by the user) to draw conclusions or make recommendations (reasoning).

4. User Interface (UI)

  • This is the screen or platform that allows the user (e.g., a junior doctor) to input data (e.g., patient symptoms) and receive the output (the suggested diagnosis).
How an Expert System Operates (Step-by-Step)
  1. A user inputs initial facts or symptoms via the Interface.
  2. The Inference Engine takes these inputs.
  3. The Inference Engine searches through the Rule Base to find rules that match the input facts.
  4. It uses the general facts in the Knowledge Base to support or contradict potential conclusions.
  5. The system cycles through the rules until it finds the best possible conclusion (the reasoning stage).
  6. The suggested conclusion (e.g., "The fault is a broken fuse") is presented back to the user via the Interface.

2. Machine Learning (ML)

Machine Learning is a subset of AI where systems are designed to learn from data rather than being explicitly programmed for every single task.

Definition of Machine Learning (6.3.3)

Machine Learning is when a program has the ability to automatically adapt its own processes and/or data based on new inputs and experiences.

Don't worry if this seems tricky at first! Let’s use a simple example:

Analogy: The Spam Filter

  1. Traditional Program: A programmer writes a specific rule: IF email contains "free money" THEN mark as spam.
  2. Machine Learning Program: The system is given 1 million emails (Data). It starts by guessing which are spam.
  3. Learning: When you manually mark a tricky email as "Not Spam," the ML program looks at the features of that email (words, sender, length) and adapts its internal processes so that it is less likely to mark similar emails as spam in the future.

The key difference is that the ML system changes its own logic based on feedback, achieving the ability to learn and adapt required of intelligent systems.

Key Takeaways for Machine Learning
  • ML is about adaptation.
  • The program learns patterns from vast amounts of data.
  • It is used when writing explicit rules is too difficult (e.g., identifying a face in a photo—it’s impossible to write rules for every combination of pixels).

Quick Chapter Review

AI Summary:

  • AI simulates intelligent behaviour using computers.
  • Key characteristics include the ability to use data/rules, reason, and learn/adapt.

Expert Systems:

  • Mimic a human expert in a narrow field (e.g., diagnosis).
  • Components: Knowledge Base (facts), Rule Base (logic), Inference Engine (applies rules), Interface (user interaction).

Machine Learning:

  • Programs automatically change their processes or data to improve performance based on experience.
  • Used for complex tasks like image recognition or predicting trends.